-
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
fix(rules): remove rules_python --incompatible_python_disallow_native_rules checking #2327
fix(rules): remove rules_python --incompatible_python_disallow_native_rules checking #2327
Conversation
Should we also close #1645 since we would be testing this? |
This also needs a changelog item. |
Hrm. Bazel 6 doesn't have the flag, so setting it in the bazelrc files is problematic. I think what I'll have to do is set it as part of the CI config. I'll give that a try, but I might drop this from the PR if it ends up being a big pain.
Done |
Figure out a way to get th bazelrcs updated. I changed CI to set |
…_rules checking (bazelbuild#2327) When --incompatible_python_disallow_native_rules is enabled, all the core rules fail with an error that rules_python should be used. This is incorrect, since the rules_python rules are being used. What's happening is bazelbuild#2257 removed the magic migration tag when pystar is enabled, but the code to check the tag was present wasn't removed. This went unnoticed because our CI doesn't set the migration flag. To fix, remove the validation logic entirely. If we're in the rules_python implementation, then there is not need to perform this validation. It was just something copy/pasted from the original code from Bazel itself. Also update the bazelrc to always set --incompatible_python_disallow_native_rules. Fixes bazelbuild#2326 Fixes bazelbuild#1645
When --incompatible_python_disallow_native_rules is enabled, all the core rules fail with
an error that rules_python should be used. This is incorrect, since the rules_python rules
are being used. What's happening is #2257
removed the magic migration tag when pystar is enabled, but the code to check the tag
was present wasn't removed. This went unnoticed because our CI doesn't set the migration
flag.
To fix, remove the validation logic entirely. If we're in the rules_python implementation,
then there is not need to perform this validation. It was just something copy/pasted from
the original code from Bazel itself.
Also update the bazelrc to always set --incompatible_python_disallow_native_rules.
Fixes #2326
Fixes #1645