Fix MODULE.bazel: remove use_repo entries for repos pub extension does not generate#2
Merged
Conversation
The pub extension only generates pub_fixnum, pub_protobuf, and pub_protoc_plugin (matching the three pub.package(...) calls earlier in MODULE.bazel). The other 22 names in use_repo reference repos that don't exist, which Bazel 8's strict use_repo validation rejects whenever any operation walks the full module graph (e.g. bazel mod graph, IntelliJ Bazel sync). This patch removes the 22 dead entries. It does not change the set of repos actually generated by the extension, so it cannot break any code path that previously worked.
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.
Fixes the strict
use_repovalidation error on Bazel 8 when any operationwalks the full module graph (
bazel mod graph, IntelliJ Bazel sync, etc.):The
pubextension only generatespub_fixnum,pub_protobuf, andpub_protoc_plugin(matching the threepub.package(...)calls earlier inthe file). The other 22 names listed in
use_reporeference repos thatdon't exist, which Bazel 8's stricter validation rejects.
This patch removes those 22 dead entries. It does not change the set of
repos actually generated by the extension, so it cannot break any code
path that previously worked.
Note: the
dart_proto_libraryrule's_path_pkgattribute defaults to@pub_path//:path_files, which is one of the 22 dangling references. Thatrule is therefore unusable as-shipped — but addressing that requires either
adding the missing
pub.package(...)declarations or restructuring howconsumers contribute packages, which is out of scope for this minimal fix.
Reproduced on Bazel 8.4.2.