You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flag incompatible_stop_exporting_language_modules implements a logic allowing to load language specific modules in some places like rules_cc or rules_python to enable a migration phase in which such places re-export the native symbols (what rules_cc and rules_python still do)
This logic is however broken.
Imho this is a problem for performing the refactoring demanded by this incompatibility flag. Users have been used to simply using those globally available symbols for years. Making progress on this will most likely not work without enforcing compliance to this flag in the CI for the core Bazel rules and tools. But, CI enforcement requires the exception logic to work.
Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Tested with Bazel versions [6.4.0, 7.0.0, 7.1.2, rolling]
This error appears: ERROR: .../rules_python/python/private/reexports.bzl:37:17: PyInfo may only be used from one of the following repositories or prefixes: @_builtins//, @bazel_tools//, @rules_python//, tools/build_defs/python. It may be temporarily re-enabled for general use by setting --incompatible_stop_exporting_language_modules=false
Which makes no sense, as we are within rules_python
Which operating system are you running Bazel on?
Linux Mint 21.1
What is the output of bazel info release?
See reproducing steps
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
Issue for this flag does not mention this problem: #19455
Any other information, logs, or outputs that you want to share?
Please note, although rules_python was used to reproduce this issue, it is not limited to this rule set. One can see the same problem with rules_cc.
The text was updated successfully, but these errors were encountered:
Description of the bug:
Flag
incompatible_stop_exporting_language_modules
implements a logic allowing to load language specific modules in some places likerules_cc
orrules_python
to enable a migration phase in which such places re-export the native symbols (whatrules_cc
andrules_python
still do)This logic is however broken.
Imho this is a problem for performing the refactoring demanded by this incompatibility flag. Users have been used to simply using those globally available symbols for years. Making progress on this will most likely not work without enforcing compliance to this flag in the CI for the core Bazel rules and tools. But, CI enforcement requires the exception logic to work.
Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel build --incompatible_stop_exporting_language_modules //python/private:all
6.4.0
,7.0.0
,7.1.2
,rolling
]This error appears:
ERROR: .../rules_python/python/private/reexports.bzl:37:17: PyInfo may only be used from one of the following repositories or prefixes: @_builtins//, @bazel_tools//, @rules_python//, tools/build_defs/python. It may be temporarily re-enabled for general use by setting --incompatible_stop_exporting_language_modules=false
Which makes no sense, as we are within
rules_python
Which operating system are you running Bazel on?
Linux Mint 21.1
What is the output of
bazel info release
?See reproducing steps
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
Issue for this flag does not mention this problem: #19455
Any other information, logs, or outputs that you want to share?
Please note, although rules_python was used to reproduce this issue, it is not limited to this rule set. One can see the same problem with rules_cc.
The text was updated successfully, but these errors were encountered: