-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(PyRuntimeInfo): use builtin PyRuntimeInfo unless pystar is enable…
…d. (#1748) This fixes the bug where the PyRuntimeInfo symbol rules_python exported wasn't matching the provider identity that `py_binary` actually provided. The basic problem was, when pystar is disabled: * PyRuntimeInfo is the rules_python defined provider * py_binary is `native.py_binary`, which provides only the builtin PyRuntimeInfo provider. Thus, when users loaded the rules_python PyRuntimeInfo symbol, it was referring to a provider that the underlying py_binary didn't actually provide. Pystar is always disabled on Bazel 6.4, and enabling it for Bazel 7 will happen eminently. This typically showed up when users had a custom rule with an attribute definition that used the rules_python PyRuntimeInfo. To fix, only use the rules_python define PyRuntimeInfo if pystar is enabled. This ensures the providers the underlying rules are providing match the symbols that rules_python is exported. * Also fixes `py_binary` and `py_test` to also return the builtin PyRuntimeInfo. This should make the transition from the builtin symbols to the rules_python symbols a bit easier. Fixes #1732
- Loading branch information
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters