x/build/internal/installer/{darwinpkg,windowsmsi}: report if GOTOOLCHAIN in environment is set to an older version than one being installed #67378
Labels
Builders
x/build issues (builders, bots, dashboards)
FeatureRequest
Issues asking for a new feature that does not need a proposal.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
When an installer for a certain Go version runs, it can check if the environment is configured such that
go version
would select select an older toolchain than the one being installed, and potentially highlight that to the user. (Another option may be to modifyGOTOOLCHAIN
in environment, either automatically or after prompting, but this might be trickier to get right.)For example, suppose someone installs Go 1.22.0 with an installer, then later upgrades to Go 1.22.1 by setting
go env -w GOTOOLCHAIN=go1.22.1+auto
, then later on uses the installer once again to install a Go 1.22.2 local toolchain. Unless they change theGOTOOLCHAIN
value in the environment, the installer would be a no-op, so it might be a good thing to report to the user, in case it was unintentional on their part.(The macOS installer already has a few checks at https://cs.opensource.google/go/x/build/+/master:internal/installer/darwinpkg/_data/dist.xml;l=17-28;drc=0ce25ffd88baa2eb34517f5c0528e4a79d5e924f.)
Thanks to @hyangah for suggesting this.
The text was updated successfully, but these errors were encountered: