-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Upgrade to Guava 30.1, which warns on Java 7 #8100
Conversation
This change can have large impact from two aspects: 1. It calls out a _large_ impact on the _few_ Java 7 users. 2. It may have _small_ impact on the _many_ Android users. grpc#4671 tracks gRPC's removal of Java 7 support. We are quite eager to drop Java 7 support as that would allow using new language features like default methods. Guava is also dropping Java 7 support and starting in 30.1 it will warn when used on Java 7. The purpose of the warning is to help discover users that are negatively impacted by dropping Java 7 before it becomes a bigger problem. The Guava logging check was implemented in such a way that there is an optional class that uses Java 8 bytecode. While the class is optional at runtime, the Android build system notices when dexing and fails if Java 8 language featutres are not enabled. We believe this will not be a problem for most Android users, but they may need to add to their build: ``` android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } ``` See also https://github.com/google/guava/releases/tag/v30.1
Does repositories.bzl need to be updated too? It's still on 29.0. |
Yes it does. I'll send out something. |
Is there anything we can or should do to automate this? I know that updating dependencies in gRPC is relatively painful compared to other projects. Thoughts:
|
Most of the pain of upgrading dependencies is due to If you don't have to fight My very-slowly-making-progress goal is to get Gradle into a form where we are no longer using the Once Gradle is in a nice-and-pretty regular shape (e.g., look at plugin management in I'd like to make upgrade dependencies part of the post-release process. But I think we'll need to do that manually. I've hoped multiple times that Gradle would have something built-in that helps, but last I looked at version pinning in Gradle it didn't quite match what we needed. |
All of that is gone. It feels so good. See 0e0bcdf. Bazel is easy now; Gradle is the problem (in part because of Maven). |
This change can have large impact from two aspects:
#4671 tracks gRPC's removal of
Java 7 support. We are quite eager to drop Java 7 support as that would
allow using new language features like default methods. Guava is also
dropping Java 7 support and starting in 30.1 it will warn when used on
Java 7. The purpose of the warning is to help discover users that are
negatively impacted by dropping Java 7 before it becomes a bigger
problem.
The Guava logging check was implemented in such a way that there is an
optional class that uses Java 8 bytecode. While the class is optional at
runtime, the Android build system notices when dexing and fails if
Java 8 language featutres are not enabled. We believe this will not be a
problem for most Android users, but they may need to add to their build:
See also https://github.com/google/guava/releases/tag/v30.1
This came up in #8078. CC @suztomo