Skip to content
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

x/build/internal/installer/{darwinpkg,windowsmsi}: report if GOTOOLCHAIN in environment is set to an older version than one being installed #67378

Open
dmitshur opened this issue May 15, 2024 · 0 comments
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented May 15, 2024

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 modify GOTOOLCHAIN 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 the GOTOOLCHAIN 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.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. FeatureRequest labels May 15, 2024
@dmitshur dmitshur added this to the Unreleased milestone May 15, 2024
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants