Skip to content

Commit

Permalink
cmd/dist: add explicit module version to generated go.mod
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
dr2chase committed May 5, 2023
1 parent 06fd1f3 commit 13a59e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/dist/buildtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "/...")
Expand Down

0 comments on commit 13a59e3

Please sign in to comment.