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

deps: normalize dependencies #2574

Merged
merged 7 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions api-common-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.24.1</version>
<version>${errorprone.version}</version>
<scope>compile</scope>
</dependency>

Expand All @@ -80,6 +80,11 @@
<version>1.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
<version>${j2objc-annotations.version}</version>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@suztomo We have to declare this dependency here and the version in gapic-generator-java-pom-parent, to resolve a Maven enforcer failure. In addition, it is already declared in third-party-dependencies, do you have a good way to declare this dependency in a centralized place?

Copy link
Member

Choose a reason for hiding this comment

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

Use variables. Follow gRPC's version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are using variables for errorprone and j2objc in

  • gapic-generator-java-pom-parent
  • java-shared-dependencies/third-party-dependencies

</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -125,4 +130,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
4 changes: 3 additions & 1 deletion gapic-generator-java-pom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
<google.auth.version>1.23.0</google.auth.version>
<google.http-client.version>1.44.1</google.http-client.version>
<gson.version>2.10.1</gson.version>
<guava.version>32.1.3-jre</guava.version>
Copy link
Member

Choose a reason for hiding this comment

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

Can you check the release note for Guava 33 for any breaking changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I just did. I did not find any breaking changes

Copy link
Member

Choose a reason for hiding this comment

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

Thank you

<guava.version>33.1.0-jre</guava.version>
<protobuf.version>3.25.2</protobuf.version>
<opentelemetry.version>1.35.0</opentelemetry.version>
<maven.compiler.release>8</maven.compiler.release>
<errorprone.version>2.26.1</errorprone.version>
<j2objc-annotations.version>3.0.0</j2objc-annotations.version>
</properties>

<developers>
Expand Down
2 changes: 1 addition & 1 deletion gapic-generator-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.24.1</version>
<version>${errorprone.version}</version>
</dependency>

<!--
Expand Down
5 changes: 5 additions & 0 deletions java-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotationsa</artifactId>
<version>${errorprone.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
4 changes: 2 additions & 2 deletions java-shared-dependencies/third-party-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<!-- ensure checker-qual version matches what Guava uses -->
<checker-qual.version>3.42.0</checker-qual.version>
<perfmark-api.version>0.27.0</perfmark-api.version>
<j2objc-annotations.version>2.8</j2objc-annotations.version>
Copy link
Member

Choose a reason for hiding this comment

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

Shall we keep this as old version for now, to reduce uncertainty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was necessary as part of updating guava to 33.1.0. Setting it to 2.8 causes:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.4.1:enforce (enforce) on project grpc-google-common-protos: 
[ERROR] Rule 2: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message:
[ERROR] Failed while enforcing RequireUpperBoundDeps. The error(s) are [
[ERROR] Require upper bound dependencies error for com.google.j2objc:j2objc-annotations:2.8 paths to dependency are:
[ERROR] +-com.google.api.grpc:grpc-google-common-protos:2.36.1-SNAPSHOT
[ERROR]   +-com.google.guava:guava:33.1.0-jre
[ERROR]     +-com.google.j2objc:j2objc-annotations:2.8 (managed) <-- com.google.j2objc:j2objc-annotations:3.0.0
[ERROR] ]
[ERROR] -> [Help 1]

Copy link
Member

Choose a reason for hiding this comment

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

OK. Thank you for checking.

<j2objc-annotations.version>3.0.0</j2objc-annotations.version>
<opentelemetry.version>1.36.0</opentelemetry.version>
<flogger.version>0.8</flogger.version>
<arrow.version>15.0.1</arrow.version>
Expand Down Expand Up @@ -184,4 +184,4 @@
</dependency>
</dependencies>
</dependencyManagement>
</project>
</project>
Loading