Skip to content

Commit

Permalink
Explicitly specify protobuf 27.2, repin maven deps
Browse files Browse the repository at this point in the history
Resolves these warnings:

```txt
DEBUG: .../external/rules_jvm_external~/private/extensions/maven.bzl:154:14:
  The maven repository 'maven' is used in two different bazel modules,
  originally in 'com_engflow_bazel_invocation_analyzer'
  and now in 'protobuf'

DEBUG: .../external/rules_jvm_external~/private/extensions/maven.bzl:154:14:
  The maven repository 'maven' is used in two different bazel modules,
  originally in 'com_engflow_bazel_invocation_analyzer'
  and now in 'protobuf'

DEBUG: .../external/rules_jvm_external~/coursier.bzl:593:18:
    Found duplicate artifact versions
    com.google.code.gson:gson has multiple versions 2.11.0, 2.8.9
    com.google.guava:guava has multiple versions 33.2.1-jre, 31.1-jre
    com.google.truth:truth has multiple versions 1.4.3, 1.1.2
    org.mockito:mockito-core has multiple versions 5.12.0, 4.3.1
Please remove duplicate artifacts from the artifact list so you do not
get unexpected artifact versions
```

See also:

- Duplicate maven repositories when importing bazel_deps that use
  maven.install
  bazel-contrib/rules_jvm_external#916

- Using maven as the repo name causes duplicate warnings when using
  bzlmod
  protocolbuffers/protobuf#16839

- MODULE.bazel doesn't define @maven repository
  protocolbuffers/protobuf#17176

- Stop including extra artifacts on maven.install()
  bazel-contrib/rules_jvm_external#1168

- Use a custom name for the maven repository (maven_protobuf)
  protocolbuffers/protobuf#17190
  • Loading branch information
mbland committed Jul 2, 2024
1 parent abe3871 commit ad2385a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 84 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ bazel_dep(name = "buildifier_prebuilt", version = "6.4.0")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_jvm_external", version = "5.3")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "protobuf", version = "27.2")

# =========================================
# Java dependencies
Expand Down
66 changes: 18 additions & 48 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 2 additions & 36 deletions maven_install.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
{
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": 342765507,
"__RESOLVED_ARTIFACTS_HASH": 1160254299,
"conflict_resolution": {
"com.google.code.gson:gson:2.8.9": "com.google.code.gson:gson:2.11.0",
"com.google.errorprone:error_prone_annotations:2.3.2": "com.google.errorprone:error_prone_annotations:2.28.0",
"com.google.guava:guava:31.1-jre": "com.google.guava:guava:33.2.1-jre",
"com.google.j2objc:j2objc-annotations:1.3": "com.google.j2objc:j2objc-annotations:3.0.0",
"com.google.truth:truth:1.1.2": "com.google.truth:truth:1.4.3",
"org.mockito:mockito-core:4.3.1": "org.mockito:mockito-core:5.12.0"
},
"__INPUT_ARTIFACTS_HASH": -1317769858,
"__RESOLVED_ARTIFACTS_HASH": 2075160190,
"artifacts": {
"com.google.auto.value:auto-value-annotations": {
"shasums": {
Expand Down Expand Up @@ -60,13 +52,6 @@
},
"version": "33.2.1-jre"
},
"com.google.guava:guava-testlib": {
"shasums": {
"jar": "aadc71b10d5c3ac474dd16be84cfb18d257e584d1e0a59f8cab64ef4376226ce",
"sources": "7149659f8966197dcd91a42183349f862d3973f8e65efe6d03e678464fa13bfd"
},
"version": "31.1-jre"
},
"com.google.guava:listenablefuture": {
"shasums": {
"jar": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99",
Expand Down Expand Up @@ -181,14 +166,6 @@
"com.google.j2objc:j2objc-annotations",
"org.checkerframework:checker-qual"
],
"com.google.guava:guava-testlib": [
"com.google.code.findbugs:jsr305",
"com.google.errorprone:error_prone_annotations",
"com.google.guava:guava",
"com.google.j2objc:j2objc-annotations",
"junit:junit",
"org.checkerframework:checker-qual"
],
"com.google.truth.extensions:truth-java8-extension": [
"com.google.truth:truth",
"org.jspecify:jspecify"
Expand Down Expand Up @@ -271,15 +248,6 @@
"com.google.common.xml",
"com.google.thirdparty.publicsuffix"
],
"com.google.guava:guava-testlib": [
"com.google.common.collect.testing",
"com.google.common.collect.testing.features",
"com.google.common.collect.testing.google",
"com.google.common.collect.testing.testers",
"com.google.common.escape.testing",
"com.google.common.testing",
"com.google.common.util.concurrent.testing"
],
"com.google.j2objc:j2objc-annotations": [
"com.google.j2objc.annotations"
],
Expand Down Expand Up @@ -508,8 +476,6 @@
"com.google.guava:failureaccess",
"com.google.guava:failureaccess:jar:sources",
"com.google.guava:guava",
"com.google.guava:guava-testlib",
"com.google.guava:guava-testlib:jar:sources",
"com.google.guava:guava:jar:sources",
"com.google.guava:listenablefuture",
"com.google.j2objc:j2objc-annotations",
Expand Down

0 comments on commit ad2385a

Please sign in to comment.