Repository navigation
fix: Give a best-effort guess if repos are the same - #117
Merged
Ahajha merged 1 commit intoNov 16, 2026
Merged
Conversation
This is a _terrible_ hack. I really hope there's a better way with 8.x. If the main repo uses `@foo//:bar` as a target, using `Label` here tries to resolve `@foo` relative to `@rules_mojo`, which usually would fail to match (I suppose it's super spooky if it doesn't fail). Now, we look at the repo names and as long as one is a subset of the other (avoid things like `+`s or slight `@` vs `@@` mismatches), then we count it. There could be cases this doesn't catch, but if it does we'll handle it then.
Ahajha
enabled auto-merge (squash)
November 16, 2026 07:55
Ahajha
deleted the
trotta/fix-give-a-best-effort-guess-if-repos-are-the-same
branch
November 16, 2026 07:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a terrible hack.
I really hope there's a better way with 8.x. If the main repo uses
@foo//:baras a target, usingLabelhere tries to resolve@foorelative to@rules_mojo, which usually would fail to match (I suppose it's super spooky if it doesn't fail).Now, we look at the repo names and as long as one is a subset of the other (avoid things like
+s or slight@vs@@mismatches), then we count it. There could be cases this doesn't catch, but if it does we'll handle it then.