IDEA 2016.2, Plugin 0.12.16
I have a project with many modules. Some depend on lombok, some don't, and some aren't even Java.
Note also that annotation-processing is a per-module setting, not a project setting.
Only modules that need lombok (and have the dependency) have annotation processing enabled.
Yet I always get the error "Annotation processing seems to be disabled for the project".
This shouldn't be reported as an issue at all, let alone as an error.
Clearly from #263 the plug-in is able to inspect the dependencies for each module to see whether annotation processing is needed.
Plugin 0.13 improves on this to some extend - there is a new check setting allowing you to disable missing lombok dependency. However annotation processing is currently still checked to be enabled for all modules - we have no good way of knowing which one is using it which one doesn't.
I generally don't see an issue with having it globally enabled - as a workaround for now, just enable it as a default for all modules - this should not cause any issues what so ever. I will discuss with @mplushnikov if we should allow something more complex.
Annotation processing is one of the MAIN reasons for many invalid reports - this is why this is an error - plugin can truly not work if annotation processing is disabled yet people do not read documentation.
But there is no default for all modules - they have to be configured separately.
If the module doesn't have a Lombok dependency, i.e. if Lombok annotations aren't on the classpath, having the processor enabled won't do anything anyway.
Can't you just skip the check for modules that don't use Lombok?
If someone tries to use the annotations, but doesn't have the dependency, they'll get standard Java compilation errors, so the plugin doesn't need to be warning about it.
If you're not going to change behaviour, at least change the message so it talks about specific modules instead of the whole project.
I vote for Unix like silence if there is no Lombok dependency in the build file of the project.
Actually, the check is per project, not per module.
However, the fix should be pretty simple - changing LombokPluginProjectValidatorComponent.java line 87 from if (!annotationProcessorsEnabled) { to if (hasLombokDependency && !annotationProcessorsEnabled) {.
the check is per project, not per module
Then that is part of the problem. Dependencies and annotation processors are all per-module settings.
It's not per project also, if the plugin is installed in idea, then it checks all the project. I've some project where i intentionally disabled annotation processing and i don't use lombok on that project. But each time, lombok complains about that which is really annoying. i configured Intellij to block all the notification from lombok to avoid this.
If Lombok plugin has a way to disable per project, that will be good.
It is very irritating to have the error keep popping up on most of my projects. I only need lombok in 1.
@mplushnikov Can this be reopened as I am still seeing it using 0.28-2019.3 on my project. My layout is
- module1
- module2
Parent has a dependencyManagement block which has lombok. Module2 uses lombok and has it in dependencies. Neither parent nor module1 use or have lombok in the dependencies. However I still get the warning even though maven project compiles fine.
Most helpful comment
I vote for Unix like silence if there is no Lombok dependency in the build file of the project.