-
Notifications
You must be signed in to change notification settings - Fork 42
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
bzlmod: hermetic_cc_toolchain>2.2.0 registers toolchains by default #181
Comments
This was referenced May 31, 2024
Certainly not intended. @linzhp can you have a look? |
adding |
it seam like |
jvolkman
added a commit
that referenced
this issue
Jul 16, 2024
) Mark toolchains registered in this repo as a dev dependency. Users will need to register their own toolchains, like they do in WORKSPACE. Fixes #181.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of 8a1ca91 / #135, the root MODULE.bazel contains a call to
register_toolchains
that causes every zig-cc toolchain to be registered if the module is loaded. This means that when loading hermetic_cc_toolchain using bzlmod, it's not possible to only build a single target using this toolchain, as they will be registered by default and picked up by bazel for all compilation.I believe this to be a bug, as the README specifically lists this as an option.
This could well be a Bazel bug in visibility: I don't think that just loading a module should ever create side-effects like this. Sadly, it still makes it problematic to load hermetic_cc_toolchain via bzlmod.
The text was updated successfully, but these errors were encountered: