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

Correct CARGO_MANIFEST_DIR values for Bazel <3.7.0 #469

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

sitaktif
Copy link
Contributor

Bazel 3.7.0 introduced a change (301b96b223b0c0) in the way it reports
file paths for external packages. This ensures that rules_rust sets the
right value for CARGO_MANIFEST_DIR both for Bazel < 3.7.0 and >= 3.7.0.

Note that if this changed once, it might change again, so the right
thing to do is to use a bazel API to do that work once it's available.

@google-cla google-cla bot added the cla: yes label Oct 30, 2020
Bazel 3.7.0 introduced a change (301b96b223b0c0) in the way it reports
file paths for external packages. This ensures that rules_rust sets the
right value for CARGO_MANIFEST_DIR both for Bazel < 3.7.0 and >= 3.7.0.

Note that if this changed once, it might change again, so the right
thing to do is to use a bazel API to do that work once it's available.
Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

This looks good to me to support multiple versions of bazel in the absence of a stable API to get the exec path of the package directory.

@damienmg do you know if there's an API we've overlooked here, or a supported way to look up the exec path of a package directory? It feels like there should be, if these directories are treated as opaque and subject to change (as we saw in bazel 3.7.0)...

@UebelAndre
Copy link
Collaborator

@damienmg Hey, pinging this PR. Seems pretty important to get in 😅

@damienmg
Copy link
Collaborator

damienmg commented Nov 3, 2020

I am not aware of any API.

Since the breaking change was not marked as breaking that should have been a reason for rollback I guess. It's probably too late now.

@damienmg damienmg merged commit 6766c24 into bazelbuild:master Nov 3, 2020
@sitaktif sitaktif deleted the exec-root-rel-path branch November 4, 2020 10:21
@UebelAndre UebelAndre mentioned this pull request Nov 7, 2020
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.

None yet

4 participants