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

fix: Don't require downstream users to register Python toolchains. #34

Merged

Conversation

rickeylev
Copy link
Contributor

The Python toolchains are only needed for dev purposes (doc generation).

Unfortunately, Bazel doesn't provide an easy way to mark a register_toolchains() call as dev-only. To work around this, we use an extension to create a repository whose contents depend on if its the root module or not. If its the root module, it means we're the rules_testing module and its the dev-dependency case, so write a build file with the real toolchains. If its not the root module, then its not the dev-dependency case, so write an empty build file.

Fixes #33

@rickeylev rickeylev force-pushed the fix.register.toolchains branch 4 times, most recently from 45471ea to 4b2e552 Compare April 27, 2023 23:47
The Python toolchains are only needed for dev purposes (doc generation).

Unfortunately, Bazel doesn't provide an easy way to mark a
register_toolchains() call as dev-only. To work around this, we use an
extension to create a repository whose contents depend on if its the
root module or not. If its the root module, it means we're the
rules_testing module and its the dev-dependency case, so write a
build file with the real toolchains. If its not the root module, then
its not the dev-dependency case, so write an empty build file.

Fixes bazelbuild#33
@copybara-service copybara-service bot merged commit e817e25 into bazelbuild:master May 2, 2023
@rickeylev rickeylev deleted the fix.register.toolchains branch May 2, 2023 19:13
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

Successfully merging this pull request may close these issues.

0.0.5 release breaks downstream users due to register_toolchain call
1 participant