-
Notifications
You must be signed in to change notification settings - Fork 424
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
Support repo mapping for bazel runfiles. #1847
base: main
Are you sure you want to change the base?
Conversation
@scentini What do I need to do to get this reviewed? |
Hi @matts1 unfortunately I have not yet found the time to review the PR; however there seem to be some failures on CI, could you please take care of those? |
c1d831b
to
b751d9e
Compare
I fixed the clippy errors that were causing the failures, but there still appears to be two failures which I believe are unrelated to my code. |
With bazel 6 + bzlmod, bazel creates a "repo mapping" file. Note that this can be a problem even if rules_rust doesn't support bzlmod, as it can occur if a bzlmod repo includes rules_rust in its WORKSPACE.bazel file. Discussion detailed at https://groups.google.com/g/bazel-discuss/c/DsVivJhU7Bw
let mut components = path.components(); | ||
if let Some(std::path::Component::Normal(target_local)) = components.next() { | ||
if let Some(target_local) = target_local.to_str() { | ||
let current_canonical = self.current_repository(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're looking at this PR with @Wyverald, and all seems fine apart from this line; we concluded that the implementation of current_repository()
is currently incorrect. We'll first need to tackle that, because it causes the next couple of lines to be wrong as well. I'll file a separate issue to describe the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scentini Has current_repository
been fixed? If not, could you link to the bug that was filed so I can know when it is fixed.
This is a copy of bazelbuild#1847. Submitting to our fork because it's unlikely to be submitted soon. BUG=None TEST=portage/tools/run_tests.sh Change-Id: I1076582fb709a9eb8f1b3713507926a56c531575
#2566 is the latest attempt |
Should this be closed ? |
yes, this was fixed in #2566 |
With bazel 6 + bzlmod, bazel creates a "repo mapping" file. Note that this can be a problem even if rules_rust doesn't support bzlmod, as it can occur if a bzlmod repo includes rules_rust in its WORKSPACE.bazel file.
Discussion detailed at https://groups.google.com/g/bazel-discuss/c/DsVivJhU7Bw