From 13a59e36c0a224db15cf2e9b59797c1e0103cae7 Mon Sep 17 00:00:00 2001 From: David Chase Date: Fri, 5 May 2023 11:23:29 -0400 Subject: [PATCH] cmd/dist: add explicit module version to generated go.mod This avoids bootstrapping problems with 1.20. Tested w/ 1.19 and 1.20. Change-Id: I0ca9e111719e8c1bcd1a0b53b9f16d9a2d77e836 Reviewed-on: https://go-review.googlesource.com/c/go/+/492982 Run-TryBot: David Chase Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot --- src/cmd/dist/buildtool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index bb36c07663..af3db5f590 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -136,7 +136,7 @@ func bootstrapBuildTools() { xmkdirall(base) // Copy source code into $GOROOT/pkg/bootstrap and rewrite import paths. - writefile("module bootstrap\n", pathf("%s/%s", base, "go.mod"), 0) + writefile("module bootstrap\ngo 1.20\n", pathf("%s/%s", base, "go.mod"), 0) for _, dir := range bootstrapDirs { recurse := strings.HasSuffix(dir, "/...") dir = strings.TrimSuffix(dir, "/...") -- 2.50.0