-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
refactor: rework toolchain registration for WORKSPACE and bzlmod users #597
Conversation
5f80dc5
to
a9ff6ca
Compare
61b5ff2
to
1366976
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to completely stop registering toolchains. Our goal is just to make sure that users don't download unnecessary binaries, and are able to override our toolchain with whatever one they choose, right?
https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md#registering-go-sdks suggests we should be able to see how they avoid registration taking precedence over users.
72f09bf
to
34d9117
Compare
Updated. Under bzlmod, continue autoregistering toolchains as this does not interfere with the ability for someone to override a toolchain in the root module (see https://bazelbuild.slack.com/archives/C014RARENH0/p1696893626545609). Toolchains can be selectively overridden at different versions. For WORKSPACE users, added an Made |
7db1f57
to
e85d62f
Compare
Stop automatically registering all of the toolchains in bazel-lib for WORKSPACE users. Make it easier to override toolchain versions under bzlmod.
Closes #593.
Type of change
For changes visible to end-users
aspect_bazel_lib_register_toolchains
macro or call theregister_xyz_toolchain
macros individually. See Release for snippets.ext
into a differed module extension namedhost
.Test plan