Fix Bash runfiles calling repository lookup for directly run scripts#19810
Closed
fmeum wants to merge 2 commits intobazelbuild:masterfrom
Closed
Fix Bash runfiles calling repository lookup for directly run scripts#19810fmeum wants to merge 2 commits intobazelbuild:masterfrom
fmeum wants to merge 2 commits intobazelbuild:masterfrom
Conversation
874fbbe to
5e1423c
Compare
When an `sh_binary` is run directly from `bazel-bin`, its path won't be contained in the manifest and will not match a `bazel-out` regex. Instead, make the path absolute and then match after the `bazel-bin` to extract the binaries repository name.
5e1423c to
5ce7217
Compare
meteorcloudy
approved these changes
Oct 13, 2023
Collaborator
Author
|
@meteorcloudy This doesn't fix the full problem. When invoking the script directly, it also fails to find |
Collaborator
Author
|
@meteorcloudy Looks like an existing test reproduces the problem. I will look into fixing it. |
Collaborator
Author
|
@meteorcloudy Failure is fixed, I simply forgot the |
Collaborator
Author
|
@bazel-io flag |
Collaborator
Author
|
(for 7.0.0) |
Member
|
@bazel-io fork 7.0.0 |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Oct 17, 2023
When an `sh_binary` is run directly from `bazel-bin`, its path won't be contained in the manifest and will not match a `bazel-out` regex. Instead, make the path absolute and then match after the `bazel-bin` to extract the binaries repository name. Also improve the error message when `runfiles_current_repository` can find neither the runfiles manifest nor the runfiles directory. Work towards fixing bazelbuild#19796 (comment) Closes bazelbuild#19810. PiperOrigin-RevId: 574208158 Change-Id: I45d6b503e8f34e13177d57ca64c202640306cfb8
meteorcloudy
pushed a commit
that referenced
this pull request
Oct 18, 2023
…scripts (#19857) When an `sh_binary` is run directly from `bazel-bin`, its path won't be contained in the manifest and will not match a `bazel-out` regex. Instead, make the path absolute and then match after the `bazel-bin` to extract the binaries repository name. Also improve the error message when `runfiles_current_repository` can find neither the runfiles manifest nor the runfiles directory. Work towards fixing #19796 (comment) Closes #19810. Commit 58ce112 PiperOrigin-RevId: 574208158 Change-Id: I45d6b503e8f34e13177d57ca64c202640306cfb8 Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an
sh_binaryis run directly frombazel-bin, its path won't be contained in the manifest and will not match abazel-outregex. Instead, make the path absolute and then match after thebazel-binto extract the binaries repository name.Also improve the error message when
runfiles_current_repositorycan find neither the runfiles manifest nor the runfiles directory.Work towards fixing #19796 (comment)