-
Notifications
You must be signed in to change notification settings - Fork 18k
build: adopt Go 1.22 as bootstrap toolchain for Go 1.24 #64751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This issue is currently labeled as early-in-cycle for Go 1.24. |
This comment was marked as resolved.
This comment was marked as resolved.
There's an order we'll need to follow for this. First, the builders need to be configured to start using Go 1.22 as the bootstrap. I'll be working on this part. I'll likely target Go 1.22.6 (to be out soon) as the initial concrete bootstrap version. |
Change https://go.dev/cl/605978 mentions this issue: |
Change https://go.dev/cl/606156 mentions this issue: |
Change https://go.dev/cl/605980 mentions this issue: |
For golang/go#64751. Change-Id: I68b42b295f48a57f7016e8d70f068c7cb3548df8 Reviewed-on: https://go-review.googlesource.com/c/build/+/605978 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
For golang/go#64751. Change-Id: Ib8ba94bafc661bd4142dc2f180254d484ce3efa6 Reviewed-on: https://go-review.googlesource.com/c/build/+/605980 Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
This is a minimal change to start to require the new minimum bootstrap. Taking advantage of the newer bootstap to simplify and improve code is left to be done in separate CLs. For #64751. Change-Id: I1d4f883fae3026354a199174d51e79a36cd2dc53 Reviewed-on: https://go-review.googlesource.com/c/go/+/606156 LUCI-TryBot-Result: Go LUCI <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Change https://go.dev/cl/607315 mentions this issue: |
Now that Go 1.22.6 is the minimum bootstrap toolchain (cf. CL 606156), the fallback implementation for Go versions <1.21 can be dropped. For #61180 For #64751 Change-Id: Idfeca0a6e9f490e1ab0f308ead372612402923ea Reviewed-on: https://go-review.googlesource.com/c/go/+/607315 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Commit-Queue: Tobias Klauser <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Tobias Klauser <[email protected]>
Change https://go.dev/cl/604799 mentions this issue: |
The commands to build the bootstrap toolchains and go commands are run from modules created by two bootstrap go.mod files: one is used when building toolchain1 and go_bootstrap, and the other is used for toolchain2 and toolchain3, and the final build. Currently the first has a go directive specifying go 1.20, and the second one does not have a go directive at all. This affects the default GODEBUG setting when building the final toolchain: the default GODEBUG value is based on the go version of the go.mod file, and when the go.mod file does not have a version it defaults to go1.16. We should set the go directive on the bootstrap used for the second half of the builds to use the current go verison from the std's go.mod file (which is the same as the version on cmd's go.mod file). The go.mod file used for the initial bootstrap should have a go directive with the minimum version of the toolchain required for bootstrapping. That version is the current version - 2 rounded down to an even number. For #64751 Fixes #68797 Change-Id: Ibdddf4bc36dc963291979d603c4f3fc55264f65b Reviewed-on: https://go-review.googlesource.com/c/go/+/604799 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Change https://go.dev/cl/607821 mentions this issue: |
The $HOME/sdk/go1.17 and $HOME/go1.17 paths were initially added as places to look for a bootstrap toolchain to make.{bash,bat,rc} scripts and in cmd/dist (CL 370274). Those two go1.17 directories have since been updated in the make scripts to go1.20.6 (CL 512275) and later on to go1.22.6 (CL 606156), but the same list in cmd/dist was missed. Fix the inconsistency now. But maybe cmd/dist doesn't need to maintain this logic, if it's required to be invoked via one of the make scripts, since they're responsible for setting GOROOT_BOOTSTRAP? For #64751. Change-Id: I0988005c559014791363138f2f722cc1f9a78bcf Reviewed-on: https://go-review.googlesource.com/c/go/+/607821 Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
The builders are updated to provide a go1.22.6 bootstrap, and cmd/dist is updated to require it. This is still open (but no longer a release blocker—that aspect of this issue is complete) to track any remaining opportunities in the Go tree to take advantage of the updated bootstrap requirement. |
release note say: But master can now also bootstrap with 1.22.2. |
The new bootstrap toolchain allows us to use the built-in clear. Updates golang#64751
Change https://go.dev/cl/610516 mentions this issue: |
Change https://go.dev/cl/610775 mentions this issue: |
CL 402595 used notsha256 to prevent the compiler from depending on cgo-based implementations of sha1 and sha256. However, since CL 454836, cmd is built with CGO_ENABLED=0, which will disable boringcrypto. Thus all usages of notsha256 is not necessary anymore. Updates #51940 Updates #64751 Change-Id: I503090f7a2efb5723e8a79523b143dc7cdb4edd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/610596 Auto-Submit: Cuong Manh Le <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Keith Randall <[email protected]>
CL 402595 changes all usages of 20 bytes hash to 32 bytes hash by using notsha256. However, since CL 454836, notsha256 is not necessary anymore, so this CL reverts those changes to 20 bytes hash using cmd/internal/hash package. Updates #51940 Updates #64751 Change-Id: Icb08d5a0d8032a3c4d050ff7b2298d31c483b88b Reviewed-on: https://go-review.googlesource.com/c/go/+/610597 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]>
CL 402595 changes all usages of 16 bytes hash to 32 bytes hash by using notsha256. However, since CL 454836, notsha256 is not necessary anymore, so this CL reverts those changes to 16 bytes hash using cmd/internal/hash package. Updates #51940 Updates #64751 Change-Id: Ic015468ca4a49d0c3b1fb9fdbed93fddef3c838f Reviewed-on: https://go-review.googlesource.com/c/go/+/610598 Auto-Submit: Cuong Manh Le <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
All of its usages were removed in CL 610596. Updates #51940 Updates #64751 Change-Id: I72a0ea4bd44a2f671e032bffa1facf84822a90f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/610599 Auto-Submit: Cuong Manh Le <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]>
Change https://go.dev/cl/610601 mentions this issue: |
Change https://go.dev/cl/610603 mentions this issue: |
Change https://go.dev/cl/610602 mentions this issue: |
Now that we're bootstrapping from a toolchain that has the slices package. Updates #64751 Change-Id: Id50d76de05e353ef06d64b47ad6400b2b7572205 Reviewed-on: https://go-review.googlesource.com/c/go/+/610775 Auto-Submit: Cuong Manh Le <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
Change https://go.dev/cl/610855 mentions this issue: |
Change https://go.dev/cl/611095 mentions this issue: |
Now that we're bootstrapping from a toolchain that has the slices package. Updates #64751 Change-Id: I3227e55f87e033dae63a2d1712b7f9373fe49731 Reviewed-on: https://go-review.googlesource.com/c/go/+/610603 Reviewed-by: Robert Griesemer <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
Now that Go 1.22.6 is the minimum bootstrap toolchain (cf. CL 606156), the slices package (introduced in Go 1.21) can be used in packages built using the bootstrap toolchain. For #64751 Change-Id: Ife0daa37c0982d9ec1afab07b9d40a1dfee9b7d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/610575 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Now that we're bootstrapping from a toolchain that has the slices package. Updates #64751 Change-Id: I2e63d95577d058670d3dc75bd45d6e050c6f0e25 Reviewed-on: https://go-review.googlesource.com/c/go/+/610601 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Now that we're bootstrapping from a toolchain that has the slices package. Updates #64751 Change-Id: I876ec6d261466344faf33f8c5cda229dd1e4185f Reviewed-on: https://go-review.googlesource.com/c/go/+/610602 Auto-Submit: Cuong Manh Le <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
The new bootstrap toolchain allows us to use the built-in clear. Updates #64751 Change-Id: Ic363e1059f34c46eaa4267c0b40a4ed8d5b3961b GitHub-Last-Rev: 46ca735 GitHub-Pull-Request: #69253 Reviewed-on: https://go-review.googlesource.com/c/go/+/610516 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
Now that Go 1.22.6 is the minimum bootstrap toolchain (cf. CL 606156), the slices package (introduced in Go 1.21) can be used in packages built using the bootstrap toolchain. For #64751 Change-Id: I0115213da4b1f0a1fa0ef7ad34456fbf52e00fae Reviewed-on: https://go-review.googlesource.com/c/go/+/611095 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Change https://go.dev/cl/612316 mentions this issue: |
Now that Go 1.22.6 is the minimum bootstrap toolchain (cf. CL 606156), the slices package (introduced in Go 1.21) can be used in packages built using the bootstrap toolchain. For #64751 Change-Id: Ib36f39016f57c5e110f78a85ca9c806d91356024 Reviewed-on: https://go-review.googlesource.com/c/go/+/612316 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
The go1.24 release notes say that go1.22.6 is the minimum bootstraps required, the go team also use go1.22.6 bootstraps in testing, so if there's a problem with using an older version, automated testing won't uncover it. Now enforce this in dist to avoid release notes that do not match reality, which can be confusing. For #64751 Change-Id: Icd2f8a47b2bbb2d7c3dab9be9a228f43b9630063 GitHub-Last-Rev: 425cd7f GitHub-Pull-Request: #69168 Reviewed-on: https://go-review.googlesource.com/c/go/+/609762 Reviewed-by: David Chase <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
This is done. |
This is the tracking issue for the Go 1.24 iteration of proposal #54265.
The text was updated successfully, but these errors were encountered: