Skip to content

Overlay the registry MODULE.bazel file on the module repo #26332

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

Closed
wants to merge 10 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Jun 18, 2025

RELNOTES: Modules backed by http_archive or git_repository no longer require a MODULE.bazel file to be contained in the source archive.

Fixes #26217

@fmeum fmeum force-pushed the 26217-module-file branch from 66d4bf1 to c6fb468 Compare June 29, 2025 11:12
@fmeum fmeum force-pushed the 26217-module-file branch from c6fb468 to 450b473 Compare June 29, 2025 11:18
@fmeum fmeum marked this pull request as ready for review June 29, 2025 14:47
@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Jun 29, 2025
@meteorcloudy
Copy link
Member

So even if the source archive already contains a MODULE.bazel, it'll still be overridden by the one from the registry, right? If we do this, we probably have to also backport to both bazel 7 and 8. Even with that, I'm just a bit concerned if we loose up the restriction on BCR side, there might be unexpected problems for users not using latest minor versions of Bazel 7 & 8?

@Wyverald WDYT?

@fmeum
Copy link
Collaborator Author

fmeum commented Jun 30, 2025

Yes, but for existing registry versions we've verified that both agree. That won't necessarily be true for custom registries though.

We could decide to loosen restrictions later, say when Bazel 9 is out.

Copy link
Member

@Wyverald Wyverald left a comment

Choose a reason for hiding this comment

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

very nice!

@fmeum fmeum requested a review from Wyverald July 1, 2025 09:41
@fmeum
Copy link
Collaborator Author

fmeum commented Jul 1, 2025

@bazel-io fork 8.4.0

Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

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

Ah, if we delay the loosing of BCR restriction to Bazel 9, then I have no concern!

@meteorcloudy meteorcloudy added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jul 1, 2025
@copybara-service copybara-service bot closed this in c5a562b Jul 1, 2025
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jul 1, 2025
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request Jul 2, 2025
RELNOTES: Modules backed by `http_archive` or `git_repository` no longer require a MODULE.bazel file to be contained in the source archive.

Fixes bazelbuild#26217

Closes bazelbuild#26332.

PiperOrigin-RevId: 778139801
Change-Id: Ie1d219ce1c219c8bae7657be929e54b9b467abf9
@meteorcloudy meteorcloudy added the potential 7.x cherry-picks Potential cherry-picks for the next 7.x release. We'll consider a new 7.x release if enough issues label Jul 8, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 8, 2025
…26462)

RELNOTES: Modules backed by `http_archive` or `git_repository` no longer
require a MODULE.bazel file to be contained in the source archive.

Fixes #26217

Closes #26332.

PiperOrigin-RevId: 778139801
Change-Id: Ie1d219ce1c219c8bae7657be929e54b9b467abf9

Commit
c5a562b

---------

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@fmeum fmeum deleted the 26217-module-file branch July 15, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential 7.x cherry-picks Potential cherry-picks for the next 7.x release. We'll consider a new 7.x release if enough issues team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modules obtained from registries should fall back to copying MODULE.bazel from the registry
3 participants