-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Error with use of $(rlocationpath) in Bazel 8.0.0 #24613
Comments
@bazel-io flag |
I think that this is just one more instance of #23200 and #20038 and #11820. I suggest we go with #11820 (comment). @meteorcloudy It looks like 8.0.1 is planned already for the ignored directories fix, what do you think of including this fix in it as well? |
Yeah, we could include a fix for this problem, but I have little context on this issue, do you know who can help review the change? |
Maybe @comius ? |
@bazel-io fork 8.1.0 |
@bazel-io fork 8.0.1 |
Work towards bazelbuild#11820 Fixes bazelbuild#20038 Fixes bazelbuild#23200 Fixes bazelbuild#24613 RELNOTES: Extra targets provided to `ctx.expand_location` now expand to their executable (if any) instead of resulting in an error if they provide a number of files different from one. RELNOTES[INC]: The `--incompatible_locations_prefers_executable` flag has been added and enabled, which makes it so that `ctx.expand_location` expands `$(locations :x)` to the executable of an extra target `:x` if it provides one and the number of files provided by it is not one. Closes bazelbuild#24690. PiperOrigin-RevId: 713453768 Change-Id: I0d6e052bc70deea029554ab722feb544f9597a23 (cherry picked from commit 457d248)
…24874) Work towards #11820 Fixes #20038 Fixes #23200 Fixes #24613 RELNOTES: Extra targets provided to `ctx.expand_location` now expand to their executable (if any) instead of resulting in an error if they provide a number of files different from one. RELNOTES[INC]: The `--incompatible_locations_prefers_executable` flag has been added and enabled, which makes it so that `ctx.expand_location` expands `$(locations :x)` to the executable of an extra target `:x` if it provides one and the number of files provided by it is not one. Closes #24690. PiperOrigin-RevId: 713453768 Change-Id: I0d6e052bc70deea029554ab722feb544f9597a23 (cherry picked from commit 457d248) Fixes #24646
A fix for this issue has been included in Bazel 8.0.1 RC1. Please test out the release candidate and report any issues as soon as possible. |
Tested just now and rc1 fixes the problem for me. |
Description of the bug:
Some of our targets now throw the following error:
I'll try to provide a minimal reproducer today, but wanted to log this error before Bazel 8 is released.
Edit: I guess the Bazel 8 ship has sailed
Which category does this issue belong to?
Bug/regression
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Clone https://github.com/mortenmj/location_repro and run
build //...
.Build succeeds when running
USE_BAZEL_VERSION=7.4.1 bazel build //...
but fails when runningUSE_BAZEL_VERSION=8.0.0 bazel build //...
On Bazel 7, with rlocationpath, the
TWINE_WRAPPER
env var gets the valuerules_python+/tools/publish/twine
.On Bazel 8, if updating to use rlocationpaths, the value is
rules_python+/tools/publish/_twine rules_python+/tools/publish/rules_python_entry_point_twine.py
.Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 8.0.0
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
b89ec43
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: