Open dws opened 7 months ago
Commit c475a9db0b237f8e2725c35128253a0ae1dd080e introduced a new routine _PyInfo_init in src/main/starlark/builtins_bzl/common/python/providers.bzl which does the following:
_PyInfo_init
src/main/starlark/builtins_bzl/common/python/providers.bzl
"has_py2_only_sources": has_py2_only_sources, "has_py3_only_sources": has_py2_only_sources,
I believe the second line there should be
"has_py3_only_sources": has_py3_only_sources,
so that the value of a has_py3_only_sources parameter to the routine is reflected in its return value.
has_py3_only_sources
Python Rules
BUILD.bazel:
load(":pyinfo.bzl", "pyinfo") pyinfo()
pyinfo.bzl:
def pyinfo(): print("expect True: {}".format(PyInfo(transitive_sources = depset(), has_py3_only_sources = True).has_py3_only_sources))
Under Bazel 6.20, building the above prints expect True: True Under Bazel 7..1.1, building the above prints expect True: False
expect True: True
expect True: False
Ubuntu 20.04
bazel info release
release 7.1.1
development version
(@non-git)
No response
git remote get-url origin; git rev-parse HEAD
Yes. The bad line was introduced in commit c475a9db0b237f8e2725c35128253a0ae1dd080e
@rickeylev FYI
Description of the bug:
Commit c475a9db0b237f8e2725c35128253a0ae1dd080e introduced a new routine
_PyInfo_init
insrc/main/starlark/builtins_bzl/common/python/providers.bzl
which does the following:I believe the second line there should be
so that the value of a
has_py3_only_sources
parameter to the routine is reflected in its return value.Which category does this issue belong to?
Python Rules
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD.bazel:
pyinfo.bzl:
Under Bazel 6.20, building the above prints
expect True: True
Under Bazel 7..1.1, building the above printsexpect True: False
Which operating system are you running Bazel on?
Ubuntu 20.04
What is the output of
bazel info release
?release 7.1.1
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.
Yes. The bad line was introduced in commit c475a9db0b237f8e2725c35128253a0ae1dd080e
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response