Support repo mapping for bazel runfiles.#1847
Support repo mapping for bazel runfiles.#1847matts1 wants to merge 2 commits intobazelbuild:mainfrom
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.
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.
@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