-
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
Do not export rlocation
from test setup
#24256
Conversation
The `rlocation` implementation lacks many of the features of the shell runfiles library, which should be dependend on explicitly instead. When called, `rlocation` will now fail with an error message.
@bazel-io fork 8.0.0 |
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.
Awesome, thanks!
The `rlocation` implementation lacks many of the features of the shell runfiles library, which should be dependend on explicitly instead. When called, `rlocation` will now fail with an error message. Closes bazelbuild#24256. PiperOrigin-RevId: 695241586 Change-Id: I7059c329fd6ca518623d7be8ad3514082097c191
The `rlocation` implementation lacks many of the features of the shell runfiles library, which should be dependend on explicitly instead. When called, `rlocation` will now fail with an error message. Closes #24256. PiperOrigin-RevId: 695241586 Change-Id: I7059c329fd6ca518623d7be8ad3514082097c191 Commit 1312007 Co-authored-by: Fabian Meumertzheim <[email protected]>
@@ -236,6 +234,15 @@ else | |||
TEST_PATH="$(rlocation $TEST_WORKSPACE/$EXE)" | |||
fi | |||
|
|||
# Redefine rlocation to notify users of its removal - it used to be exported. | |||
# TODO: Remove this before Bazel 9. | |||
function rlocation() { |
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 doesn't seem to be compatible with /bin/sh
which caused a test failure at https://buildkite.com/bazel/google-bazel-presubmit/builds/87576#0193afe3-eb2a-49df-b687-13d1be1ce0f7
I can change #!/bin/sh
to #!/usr/bin/env bash
to fix it in pywrap_template.txt, but maybe we should try to make it compatible?
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.
function rlocation() {
caller 0 | {
read LINE SUB FILE
echo >&2 "ERROR: rlocation is no longer implicitly provided by Bazel's test setup, but called from $SUB in line $LINE of $FILE. Please use https://github.com/bazelbuild/rules_shell/blob/main/shell/runfiles/runfiles.bash instead."
exit 1
}
}
seems to work
Addressing #24256 (comment) PiperOrigin-RevId: 704624513 Change-Id: I73ec6559a7a7b2465abd2faae0e687a97ea77db9
Addressing bazelbuild#24256 (comment) PiperOrigin-RevId: 704624513 Change-Id: I73ec6559a7a7b2465abd2faae0e687a97ea77db9
Addressing #24256 (comment) PiperOrigin-RevId: 704624513 Change-Id: I73ec6559a7a7b2465abd2faae0e687a97ea77db9 Commit 9ed06ad Co-authored-by: Googler <[email protected]>
pywrapper_template.txt change was due to #24256 (comment) PiperOrigin-RevId: 705079774 Change-Id: I4acbce5096b87e30add5cba1632fae1eab7627c0
The `rlocation` implementation lacks many of the features of the shell runfiles library, which should be dependend on explicitly instead. When called, `rlocation` will now fail with an error message. Closes bazelbuild#24256. PiperOrigin-RevId: 695241586 Change-Id: I7059c329fd6ca518623d7be8ad3514082097c191
The
rlocation
implementation lacks many of the features of the shell runfiles library, which should be dependend on explicitly instead.When called,
rlocation
will now fail with an error message.