Repository navigation
Default runfiles to upwards directory as a last fallback - #587
Globegitter wants to merge 3 commits into
Conversation
|
Seems the buildkite tests are very flaky on master also so should be unrelated to my changes. |
|
@gregmagolan any chance to get this merged in or to get some feedback on this? Would love to be able to remove our internal workaround for this. |
|
I would also be happy to add an e2e example that utilises |
|
Something seems fishy here. That bash runfiles init code is copy pasted from We do something similar in with Does that work in your case? |
|
Interesting, so maybe something to raise in the bazel main repo. I have not tried the snippet you posted yet but I am sure it would fix it also. But my point is that this is not obvious in any way, that if I want to depend on a I did open a PR in bazel for this: bazelbuild/bazel#7774 |
|
This Pull Request has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs! |
|
This PR was automatically closed because it went two weeks without a reply since it was labeled "Can Close?" |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When wanting to run the nodejs_binary in a custom
sh_binary, to have some custom setup or run multiple commands for integration tests for example, one just sees the error messageERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bashwhen executing the binary and it is not really obvious as to why the bash runfiles can not be found.After digging further it turns out one has to explicitely set the
RUNFILESenv variable to..and I wonder if it is not possible to make this use-case work out of the box as this is what we expected.simple BUILD file example to illustrate the wrapping:
What is the new behavior?
Defaulting RUNFILES to
..if neitherRUNFILES_MANIFEST_FILEnorRUNFILES_DIRcan be set in any other way.Does this PR introduce a breaking change?
I would expect this to not break any existing usages, as it only adds one further case to try for the runfiles dir. And if it is still not there it will still fail.