-
-
Notifications
You must be signed in to change notification settings - Fork 630
chore: cleanup bazel flags related to bazel 6 or below #3282
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. We had quite a bit of compatibility code for Bazel 6. Thanks for cleaning house!
# Because this file isn't bundled with Bazel, so we have to conditionally | ||
# check for this flag. | ||
# TODO: Remove this once all supported Balze versions have this flag. | ||
# TODO: Remove this once all supported Blaze versions have this flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed.
48af9b2
to
f2e3791
Compare
So it is failing due to And the rc is soft failing, I need to check what is going on. |
37a384f
to
33f7c91
Compare
OK, did the scrub again, now much more methodically and incrementally, lets see how the CI behaves now. Locally the failing tests are passing. |
PTAL, did more cleanup and updated the PR description. |
|
||
# buildifier: disable=native-python | ||
_py_binary_impl = _starlark_py_binary if config.enable_pystar else native.py_binary | ||
_py_binary_impl = _starlark_py_binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind the loaded py_binary symbol to _py_binary_impl
config.enable_pystar or config.BuiltinPyCcLinkParamsProvider == None | ||
) else config.BuiltinPyCcLinkParamsProvider | ||
) | ||
PyCcLinkParamsInfo = _starlark_PyCcLinkParamsInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
load("//python/private:reexports.bzl", "BuiltinPyInfo") | ||
|
||
PyInfo = _starlark_PyInfo if config.enable_pystar or BuiltinPyInfo == None else BuiltinPyInfo | ||
PyInfo = _starlark_PyInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
|
||
# buildifier: disable=native-python | ||
_py_library_impl = _starlark_py_library if config.enable_pystar else native.py_library | ||
_py_library_impl = _starlark_py_library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
|
||
# buildifier: disable=native-python | ||
_py_runtime_impl = _starlark_py_runtime if IS_BAZEL_6_OR_HIGHER else native.py_runtime | ||
_py_runtime_impl = _starlark_py_runtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
load("//python/private:reexports.bzl", "BuiltinPyRuntimeInfo") | ||
|
||
PyRuntimeInfo = _starlark_PyRuntimeInfo if config.enable_pystar else BuiltinPyRuntimeInfo | ||
PyRuntimeInfo = _starlark_PyRuntimeInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
load("//python/private:util.bzl", "IS_BAZEL_6_OR_HIGHER") | ||
|
||
_py_runtime_pair = _starlark_impl if IS_BAZEL_6_OR_HIGHER else _bazel_tools_impl | ||
_py_runtime_pair = _starlark_impl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
|
||
# buildifier: disable=native-python | ||
_py_test_impl = _starlark_py_test if config.enable_pystar else native.py_test | ||
_py_test_impl = _starlark_py_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can rebind loaded symbol name
Just some nits that can be addressed later. Thanks for this! Feels good to see all that pystar compatibility code die ☠️ 🫗 |
A followup to #3282 to finish up the cleanup and remove the unnecessary `starlark` usage in naming.
Summary:
support spaces in filenames and the file becomes redundant.