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

Provide a mechanism for disabling toolchain registration when using bzlmod. #2818

Closed
konkers opened this issue Aug 28, 2024 · 1 comment
Closed

Comments

@konkers
Copy link
Contributor

konkers commented Aug 28, 2024

Some projects want to vendor and tightly control their toolchains. With rules_rust always registering toolchains when used through blzmod, it is easy to misconfigure a project's toolchain configuration and accidentally fallback on the rules_rust toolchains without knowing. Providing a way to explicitly disable the rules_rust toolchains would turn this case into and error instead of a silent fallback.

konkers added a commit to konkers/rules_rust that referenced this issue Aug 28, 2024
konkers added a commit to konkers/rules_rust that referenced this issue Aug 28, 2024
@konkers
Copy link
Contributor Author

konkers commented Aug 28, 2024

#2819 Implements a mechanism for inhibiting the registration of default rust toolchains. It does not address:

  • proto toolchain
  • prost toolchain
  • bindgen toolchain
  • host_tools repository
  • cargo_bazel_bootstrap repository

proto, prost, and bindgen toolchains are directly referenced instead of going through an extension. They would probably need to follow the same pattern as rust_toolchains to allow for disabling their registration.

The host_tools and cargo_bazel_bootstrap repositories are a bit trickier as rules_rust references these repos internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant