Skip to content

fix: Give a best-effort guess if repos are the same - #117

Merged
Ahajha merged 1 commit into
mainfrom
trotta/fix-give-a-best-effort-guess-if-repos-are-the-same
Nov 16, 2026
Merged

Ahajha merged 1 commit into
mainfrom
trotta/fix-give-a-best-effort-guess-if-repos-are-the-same

Conversation

@Ahajha

@Ahajha Ahajha commented Nov 16, 2026

Copy link
Copy Markdown
Member

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.

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
Ahajha requested a review from a team as a code owner November 16, 2026 07:52
@Ahajha
Ahajha enabled auto-merge (squash) November 16, 2026 07:55
@Ahajha
Ahajha merged commit 11d2897 into main Nov 16, 2026
24 of 25 checks passed
@Ahajha
Ahajha deleted the trotta/fix-give-a-best-effort-guess-if-repos-are-the-same branch November 16, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant