-
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
Fix corner cases in Bash runfiles library #16945
Conversation
@Wyverald Could you review? FYI @meteorcloudy |
21c9f95
to
e61f458
Compare
e61f458
to
47cd403
Compare
f7d0158
to
46bdc3a
Compare
I don't understand the CI failure yet. |
Looks okay to me, pending failures. @ahumesky any Android comments? |
Seems fishy... why shouldn't it be found? I have a couple questions about this PR:
|
It looks like only a few tests declare
These are going away, I am just (ab)using CI to debug issues on Windows.
No, the incantation has remained compatible with the new version 3 of the runfiles library. |
46bdc3a
to
d013c6c
Compare
Downstream test for this change: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2775 |
@meteorcloudy is the original author of the runfiles macro so I think he's the most qualified to give the final review here. No concerns from the Android side for me, as long as all the existing tests pass in presubmit. |
Due to tests not actually verifying the exit code of rlocation calls, a few special cases were not handled correctly. In particular, absolute paths still went through regular rlocation lookup and could fail there even after the absolute path had been printed to stdout. Also adds a missing newline in the (very rare) case that a manifest entry is found, but doesn't point to an existing file (e.g. if it is an unresolved symlink), and `rlocation` is not used with command substitution, but some other mechanism that doesn't strip trailing newlines. The tests now assert the expected exit code (== 0 or != 0). Fixes bazelbuild#16933
d013c6c
to
027ac02
Compare
@meteorcloudy Looks like presubmit failed due to CI overload. I amended without changes to rerun the pipeline. |
@bazel-io flag |
Downstream test results look good: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2775#_ |
Due to tests not actually verifying the exit code of rlocation calls, a few special cases were not handled correctly. In particular, absolute paths still went through regular rlocation lookup and could fail there even after the absolute path had been printed to stdout. Also adds a missing newline in the (very rare) case that a manifest entry is found, but doesn't point to an existing file (e.g. if it is an unresolved symlink), and `rlocation` is not used with command substitution, but some other mechanism that doesn't strip trailing newlines. The tests now assert the expected exit code (== 0 or != 0). Fixes bazelbuild#16933 Closes bazelbuild#16945. PiperOrigin-RevId: 494609104 Change-Id: I30333219176a61bda51f08c2c6bc927ce653d681
Due to tests not actually verifying the exit code of rlocation calls, a few special cases were not handled correctly. In particular, absolute paths still went through regular rlocation lookup and could fail there even after the absolute path had been printed to stdout. Also adds a missing newline in the (very rare) case that a manifest entry is found, but doesn't point to an existing file (e.g. if it is an unresolved symlink), and `rlocation` is not used with command substitution, but some other mechanism that doesn't strip trailing newlines. The tests now assert the expected exit code (== 0 or != 0). Fixes #16933 Closes #16945. PiperOrigin-RevId: 494609104 Change-Id: I30333219176a61bda51f08c2c6bc927ce653d681
Due to tests not actually verifying the exit code of rlocation calls, a few special cases were not handled correctly. In particular, absolute paths still went through regular rlocation lookup and could fail there even after the absolute path had been printed to stdout.
Also adds a missing newline in the (very rare) case that a manifest entry is found, but doesn't point to an existing file (e.g. if it is an unresolved symlink), and
rlocation
is not used with command substitution, but some other mechanism that doesn't strip trailing newlines.The tests now assert the expected exit code (== 0 or != 0).
Fixes #16933