[bzlmod] Allow suppressing warning about multiple contributing modules.#1393
Merged
shs96c merged 1 commit intobazel-contrib:masterfrom Jul 1, 2025
Merged
Conversation
In some cases it is valid for Bzlmod modules to inject additional dependencies into the default "maven" repository. In such cases the warning is not helpful and it should be possible to suppress it.
shs96c
approved these changes
Jul 1, 2025
Collaborator
shs96c
left a comment
There was a problem hiding this comment.
LGTM. Thank you for adding the list of contributing modules as an attribute on the install tag.
shs96c
added a commit
to jin/rules_jvm_external
that referenced
this pull request
Jul 4, 2025
* master: (39 commits) Fix resolution of Android/AAR artifacts with Gradle resolver (bazel-contrib#1395) fail_if_repin_required is now True by default and minor improvement to failure message (bazel-contrib#1397) Housekeeping before we release 6.8 (bazel-contrib#1384) Add dll, dylib and so types to maven package mappings (bazel-contrib#1392) [bzlmod] Allow suppressing warning about multiple contributing modules. (bazel-contrib#1393) Use the artifact default values when adding them to a struct and add tests for coursier artifacts that have empty versions provided by BOMs and don't inlcude them in outdated (bazel-contrib#1390) Allow package exclusions and inclusions in javadocs (bazel-contrib#1293) Document well-known issues with `bzlmod` (bazel-contrib#1388) Begin documenting the gradle resolver (bazel-contrib#1389) Run gradle regression tests in CI (bazel-contrib#1385) Modify maven_export to allow exporting zip archives (bazel-contrib#1368) Allow root module's override tags to take precedence over the overridees from transitive deps. (bazel-contrib#1381) Ensure root module artifacts and boms take precedence with warnings (bazel-contrib#1373) Update maven-metadata.xml when publishing locally (bazel-contrib#1369) Add support for gradle resolver (bazel-contrib#1357) Prepare for 6.8 release (bazel-contrib#1380) Remove the Windows `kt_jvm_export` example (bazel-contrib#1383) Avoid spurious warnings about poorly formatted artifact coordinates (bazel-contrib#1374) Flip `fail_if_repin_required` to `True` by default (bazel-contrib#1371) Allow the same coordinate to be overridden in different repos (bazel-contrib#1378) ...
This was referenced Jul 8, 2025
copybara-service Bot
pushed a commit
to protocolbuffers/protobuf
that referenced
this pull request
Jul 9, 2025
Fixes #21177 This PR essentially reverts #18641, which claimed > Since protobuf is not contributing to user's JARs This is not true since targets like `@com_google_protobuf//:protobuf_java` are meant to be consumed by other projects, therefore protobuf should not use a private maven install namespace. Otherwise, it leads to duplicated maven jars and classpath conflicts. See #21177 and bazel-contrib/rules_jvm_external#916 (comment) The original warning message caused by multiple modules contributing to `maven` can be suppressed with bazel-contrib/rules_jvm_external#1393, which will be available in rules_jvm_external 6.8. The PR use a repo mapping trick of `use_repo` to keep BUILD files intact, underlying both `protobuf_maven` and `protobuf_maven_dev` points to the universal `maven` install, while targets in `protobuf_maven_dev` are only available while protobuf is the root module and won't propagate to dependents. PiperOrigin-RevId: 781031722
copybara-service Bot
pushed a commit
to protocolbuffers/protobuf
that referenced
this pull request
Jul 9, 2025
Fixes #21177 This PR essentially reverts #18641, which claimed > Since protobuf is not contributing to user's JARs This is not true since targets like `@com_google_protobuf//:protobuf_java` are meant to be consumed by other projects, therefore protobuf should not use a private maven install namespace. Otherwise, it leads to duplicated maven jars and classpath conflicts. See #21177 and bazel-contrib/rules_jvm_external#916 (comment) The original warning message caused by multiple modules contributing to `maven` can be suppressed with bazel-contrib/rules_jvm_external#1393, which will be available in rules_jvm_external 6.8. The PR use a repo mapping trick of `use_repo` to keep BUILD files intact, underlying both `protobuf_maven` and `protobuf_maven_dev` points to the universal `maven` install, while targets in `protobuf_maven_dev` are only available while protobuf is the root module and won't propagate to dependents. PiperOrigin-RevId: 781031722
copybara-service Bot
pushed a commit
to protocolbuffers/protobuf
that referenced
this pull request
Jul 9, 2025
Fixes #21177 This PR essentially reverts #18641, which claimed > Since protobuf is not contributing to user's JARs This is not true since targets like `@com_google_protobuf//:protobuf_java` are meant to be consumed by other projects, therefore protobuf should not use a private maven install namespace. Otherwise, it leads to duplicated maven jars and classpath conflicts. See #21177 and bazel-contrib/rules_jvm_external#916 (comment) The original warning message caused by multiple modules contributing to `maven` can be suppressed with bazel-contrib/rules_jvm_external#1393, which will be available in rules_jvm_external 6.8. The PR use a repo mapping trick of `use_repo` to keep BUILD files intact, underlying both `protobuf_maven` and `protobuf_maven_dev` points to the universal `maven` install, while targets in `protobuf_maven_dev` are only available while protobuf is the root module and won't propagate to dependents. PiperOrigin-RevId: 781031722
copybara-service Bot
pushed a commit
to protocolbuffers/protobuf
that referenced
this pull request
Jul 11, 2025
Fixes #21177 This PR essentially reverts #18641, which claimed > Since protobuf is not contributing to user's JARs This is not true since targets like `@com_google_protobuf//:protobuf_java` are meant to be consumed by other projects, therefore protobuf should not use a private maven install namespace. Otherwise, it leads to duplicated maven jars and classpath conflicts. See #21177 and bazel-contrib/rules_jvm_external#916 (comment) The original warning message caused by multiple modules contributing to `maven` can be suppressed with bazel-contrib/rules_jvm_external#1393, which will be available in rules_jvm_external 6.8. Closes #22544 PiperOrigin-RevId: 782032198
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.
In some cases it is valid for Bzlmod modules to inject additional dependencies into the default "maven" repository. In such cases the warning is not helpful and it should be possible to suppress it.