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

Use non-canonical repo name in hub repo #2491

Merged
merged 3 commits into from
Feb 18, 2024

Conversation

cameron-martin
Copy link
Contributor

@cameron-martin cameron-martin commented Feb 18, 2024

#2461 changed the rendering of the hub repo to use canonical repository names, but incorrectly. Doing so wasn't necessary - instead we just need to do the resolution of the non-canonical label from the perspective of the hub repo rather than the consumer by using the Label constructor.

Fixes #2483

 bazelbuild#2461 changed the rendering of the hub repo to use canonical repository names, but incorrectly. Doing so wasn't necessary - instead we just need to do the resolution of the non-canonical label from the perspective of the hub repo rather than the consumer.

Fixes bazelbuild#2483
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

Thanks! Do you know if there's something we can do to regression test this? To ensure bzlmod works in pre-commit testing?

@cameron-martin
Copy link
Contributor Author

cameron-martin commented Feb 18, 2024

I couldn't immediately think of a way, since this bug only arises due to the difference in canonical repository names for overridden and non overridden repositories. I don't think there's a sensible way of getting a non-overriden repository name in tests. Open to ideas however.

@UebelAndre UebelAndre merged commit 547f6a0 into bazelbuild:main Feb 18, 2024
3 checks passed
@cameron-martin cameron-martin deleted the fix-2483 branch February 18, 2024 21:04
@jondo2010
Copy link
Contributor

I couldn't immediately think of a way, since this bug only arises due to the difference in canonical repository names for overridden and non overridden repositories. I don't think there's a sensible way of getting a non-overriden repository name in tests. Open to ideas however.

Perhaps a test workspace that pulls directly from BCR, instead of overriding to the repository rules_bazel?

@cameron-martin
Copy link
Contributor Author

cameron-martin commented Feb 19, 2024

Then you can only test the latest released version, so can't catch issues before you release.

I guess you could set up a local registry, but that sounds like a lot of hassle.

criemen added a commit to criemen/rules_rust that referenced this pull request Feb 24, 2024
I believe this was an oversight from bazelbuild#2491, that
this is lacking.
github-merge-queue bot pushed a commit that referenced this pull request Feb 24, 2024
I believe this was an oversight from #2491, that this is lacking.
qtica added a commit to qtica/rules_rust that referenced this pull request Apr 1, 2024
I believe this was an oversight from bazelbuild#2491, that this is lacking.
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.

crate_universe broken with bzlmod
3 participants