-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Documentation should prefer specifying annotation processor paths #773
Comments
Coincidentally, I updated the AutoService docs in this way just a few days ago. My immediate motivation there was an additional advantage of using the annotation-processor path: As soon as you set one annotation-processor path in your project (for example, for Error Prone, even though that's a plugin rather than a true(?) annotation processor), javac requires you to do them all that way. (It's also nice to be able to avoid |
Can we just do the same thing for all the auto* projects? |
I think we should. I'm not sure that AutoFactory has separate annotation and processor artifacts yet, so that would be step 1 for it. |
OK, so this issue can cover that whole effort. |
…auto-value for Maven and Gradle. Fixes #773. RELNOTES=Document that `<annotationProcessorPaths>` is the preferred way to use auto-value for Maven and Gradle. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=275036598
…auto-value for Maven and Gradle. Fixes #773. RELNOTES=Document that `<annotationProcessorPaths>` is the preferred way to use auto-value for Maven and Gradle. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=275036598
Also, filed GoogleCloudPlatform/cloud-opensource-java#986 to see if it's worth recommending this pattern in our best practices. |
https://github.com/google/auto/blob/master/value/userguide/index.md#in-pomxml first suggests to use
<provided>true</provided>
on the Maven dependency, and then suggests configuring<annotationProcessorPaths>
as an alternative.We should switch the priority of those (for all artifacts). Using
<provided>true</provided>
puts the annotation processor and its dependencies on the compile-time and runtime classpath, and could lead to linkage errors at runtime (e.g., googleapis/java-core#46).The text was updated successfully, but these errors were encountered: