Skip to content
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 jq path in :pin runnable #454

Merged
merged 1 commit into from
Sep 9, 2020
Merged

Conversation

alexeagle
Copy link
Contributor

Problem reported on #426

The build typically takes place in the user's workspace, so using
$(location) (or more correctly, $(rootpath)) gives an undesirable
"external/" leading segment. This would be useful if the binary being
run is in the users workspace, but we know our binary is in the same
workspace defining the BUILD file.

This change also uses the runfiles helper since I think that's required
to make this work on Windows, though I only tested on Mac.

@alexeagle
Copy link
Contributor Author

Hmm, CI failure is just

subprocess.CalledProcessError: Command '['set -e\nbazel run @unpinned_regression_testing//:pin\nbazel run @unpinned_maven_install_in_custom_location//:pin\nbazel run @duplicate_artifacts_test//:pin']' returned non-zero exit status 1.

I ran those locally on Mac and all three bazel run commands succeed 

@alexeagle
Copy link
Contributor Author

ping @jin @shs96c

@alexeagle
Copy link
Contributor Author

update: the problem is only observable under --nolegacy_external_runfiles

@alexeagle
Copy link
Contributor Author

See bazelbuild/bazel#9306 where the rollout of that incompatible change is stalled maybe?

@shs96c
Copy link
Collaborator

shs96c commented Sep 9, 2020

Discussed with @alexeagle on the Slack. Looks like his change has just been pushed.

It currently relies on the legacy_external_runfiles behavior where Bazel makes
two copies of the program, at both
pin.runfiles/unpinned_maven/jq and  pin.runfiles/user_repo/external/unpinned_maven/jq

Problem reported on bazel-contrib#426
Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants