-
Notifications
You must be signed in to change notification settings - Fork 745
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
How to use ErrorProne with Lombok: @Value annotations seem disabled? #1185
Comments
Lombok needs to be in the processor path. By default, the processor path is the same as the compilation classpath, so adding Lombok as a project dependency is enough. But as soon as your specify it explicitly (through Specifically, you need to add it as a project dependency so you can use the annotations, and in the |
Thanks, that's very helpful. I have created PRs with suggested doc improvements to help users with similar issues in the future. I am now getting "Compilation Failure" with no error info from Maven, but I will keep digging.
Repro at: https://github.com/RichardBradley/error-prone/tree/00df8f2a7/examples/maven-with-lombok I am using javac 1.8.0_151 on Windows 10 x64 |
I have attempted to run
Rather strangely, it seems that the " If I retry and manually add that arg, then I get this error from javac:
(and indeed, that file does not exist in It looks like Lombok 1.16.10 expects a version of |
It works if you update Lombok to 1.18.4.
|
Yep, that works for me. Thanks very much for your help! |
Adding Lombok path to the annotation processor path in the Errorprone profile to allow both Lombok and Errorprone annotation processing to take place. See google/error-prone#1185
Description of the problem / feature request:
I am trying to use ErrorProne and Lombok together.
Various open issues in this repos suggest that this is possible but perhaps difficult or unsupported?
I have found that using ErrorProne seems to entirely disable the "
@Value
" and "@Data
" and similar Lombok annotations, causing compile errors in code that relies on the getters generated by these annoations.How can I get these two libraries to work together?
Feature requests: what underlying problem are you trying to solve with this feature?
I am trying to use ErrorProne on a codebase that relies on Lombok code-generation annotations.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I have prepared two simple examples based on the "
examples/maven
" example in this repos:The relevant class looks like this:
This fails to build with the following message:
This builds fine
What version of Error Prone are you using?
Latest
master
, 976ab7c (2.3.3-SNAPSHOT
)Have you found anything relevant by searching the web?
Related issues:
@Data
with ErrorProne, closed as dupMany thanks,
Rich
The text was updated successfully, but these errors were encountered: