-
Notifications
You must be signed in to change notification settings - Fork 543
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
Intermediate modules that register the same python version as rules_python's default prevent identifying default toolchain #1638
Labels
Comments
It's late so I gotta pack it in. I think to fix this, the logic needs to do two things:
|
rickeylev
added a commit
to rickeylev/rules_python
that referenced
this issue
Dec 20, 2023
…thon's default This fixes a bug where, if a module tries to register a non-default toolchain with the same version as rules_python's default toolchain, an error would occur. This happened because the earlier (non-default) toolchain caused the later (default) toolchain to be entirely skipped, and then no default toolchain would be seen. This most affects intermediary modules that need to register a toolchain, but can't specify a default one. To fix, just skip creating and registering the duplicate toolchain, but still check its default-ness to determine if it's the default toolchain. Fixes bazelbuild#1638
rickeylev
added a commit
to rickeylev/rules_python
that referenced
this issue
Dec 20, 2023
…thon's default This fixes a bug where, if a module tries to register a non-default toolchain with the same version as rules_python's default toolchain, an error would occur. This happened because the earlier (non-default) toolchain caused the later (default) toolchain to be entirely skipped, and then no default toolchain would be seen. This most affects intermediary modules that need to register a toolchain, but can't specify a default one. To fix, just skip creating and registering the duplicate toolchain, but still check its default-ness to determine if it's the default toolchain. Fixes bazelbuild#1638
rickeylev
added a commit
to rickeylev/rules_python
that referenced
this issue
Dec 20, 2023
…thon's default This fixes a bug where, if a module tries to register a non-default toolchain with the same version as rules_python's default toolchain, an error would occur. This happened because the earlier (non-default) toolchain caused the later (default) toolchain to be entirely skipped, and then no default toolchain would be seen. This most affects intermediary modules that need to register a toolchain, but can't specify a default one. To fix, just skip creating and registering the duplicate toolchain, but still check its default-ness to determine if it's the default toolchain. Fixes bazelbuild#1638
rickeylev
added a commit
to rickeylev/rules_python
that referenced
this issue
Jan 3, 2024
…thon's default This fixes a bug where, if a module tries to register a non-default toolchain with the same version as rules_python's default toolchain, an error would occur. This happened because the earlier (non-default) toolchain caused the later (default) toolchain to be entirely skipped, and then no default toolchain would be seen. This most affects intermediary modules that need to register a toolchain, but can't specify a default one. To fix, just skip creating and registering the duplicate toolchain, but still check its default-ness to determine if it's the default toolchain. Fixes bazelbuild#1638
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 3, 2024
…thon's default (#1642) This fixes a bug where, if a module tries to register a non-default toolchain with the same version as rules_python's default toolchain, an error would occur. This happened because the earlier (non-default) toolchain caused the later (default) toolchain to be entirely skipped, and then no default toolchain would be seen. This most affects intermediary modules that need to register a toolchain, but can't specify a default one. To fix, just skip creating and registering the duplicate toolchain, but still check its default-ness to determine if it's the default toolchain. Fixes #1638
cpsauer
added a commit
to hedronvision/bazel-compile-commands-extractor
that referenced
this issue
Jan 8, 2024
Avoids rules_python internal clash Works around bazelbuild/rules_python#1638 until the next rules_python is released Should fix #157
ngiloq6
added a commit
to ngiloq6/bazel-compile-commands-extractor
that referenced
this issue
Aug 17, 2024
Avoids rules_python internal clash Works around bazelbuild/rules_python#1638 until the next rules_python is released Should fix hedronvision/bazel-compile-commands-extractor#157
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐞 bug report
Affected Rule
python.toolchain
Is this a regression?
Exists as far back as 0.25.0, not sure before that.
Description
If an intermediate module registers the same python version as rules_python's default, then it prevents a default toolchain from being identified.
🔬 Minimal Reproduction
The basic repro is to have an earlier module register the same version as what rules_python sets as the default.
The error/output is:
Anything else relevant?
Blocking rules_proto_grpc getting onto bcr, but also would affect other intermediate modules
The text was updated successfully, but these errors were encountered: