-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
errorprone cannot be considered optional #2681
Comments
The full text from the release notes is this:
Perhaps it could be worded a bit better, but to me this does explicitly say that the dependency is not optional. |
Yeah, no idea who wrote that or why |
Sorry, yes it was worded a bit misleading. What I meant by "can be considered optional" was:
|
I updated the release notes by copying the text from @Marcono1234's comment more or less verbatim. I think anyway that most users should not really care. There isn't in general an expectation that you will always be able to build Gson or a project using Gson using only the dependencies that you happen to have in your local Maven repository. Gson is unusual in that it doesn't have any other non-test dependencies, but we've never guaranteed that. |
Gson version
2.11.0
Java / Android version
Java v21.0.3
Used tools
Gradle v8.7 with a verification-metadata.xml
Maven v3.9.6
Description
Gradle fails to build my project which depends on gson v2.11.0. Maven fails to build my project which depends on gson v2.11.0.
Expected behavior
I expected compiler warnings at most, as per "This dependency can be considered optional, but if missing it might lead to compiler warnings."
Actual behavior
Maven and gradle both fail to build my project due to errorprone being unavailable.
Reproduction steps
Step 1: Update a project's dependency from gson 2.10.1 to 2.11.0
Step 2: Attempt to build with maven or gradle without giving the build tool access to error_prone_annotations-2.27.0.jar
Exception stack trace
'gradle build' with error_prone_annotations-2.27.0.jar but without dependency hashes:
gradle build --offline
with dependency hashes but without error_prone_annotations-2.27.0.jar:Maven without error_prone_annotations-2.27.0.jar (disconnected from the internet and the dependency is not in the local .m2 repository):
Failed to collect dependencies at com.google.code.gson:gson:jar:2.11.0 -> com.google.errorprone:error_prone_annotations:jar:2.27.0
The text was updated successfully, but these errors were encountered: