Hi! You are right! Unfortunatelly, we do not support hot deploy with lombok. By the way, we support Kotlin. You do not need to use Lombok, if you have Kotlin.
Before Cuba 7.2 hot deployment of lomboked classes was not working (on-the-fly compilation error), but all others classes would, especially when modifying an xml descriptor, which was ok.
Now with 7.2, even modifying an xml descriptor does not trigger hot deployment.
And technically, if Lombok does not work, I guess AutoValue or Immutable neither, or any annotation library that modify java code, right ?
The problem of Lombok can be described in 3 sentences:
You cannot compile your code without Lombok annotations processor with only Java compiler, because you use things that do not exist in Java code, e.g. generated constructors.
IDEs cannot correctly work with āinvisibleā Java methods, constructors and interfaces produced by Lombok. Third-party plugin always required and often makes developer experience worse.
When Java byte code version and language is updated Lombok gets broken and this is an additional dependency in your project that might not update as fast as upstream language.
So generally, Iām avoiding Lombok in my projects. There are many good alternative solutions that do not try to hack/patch existing things: languages (Groovy/Kotlin) or normal annotation processors that do not create invisible declarations, or complete code generation (Jooq, JavaPoet) that produces normal Java code.
Thanks @AlexBudarov, this will help during the time we delombok the project. Good news is that we used it essentially for getter/setters/value classes, but it will take time anyway, and Iām not fixed yet on an alternative.
@michael.renaud just FYI in case you are not aware: Lombok has a mechanism to basically remove the lombok annotations via a dedicated cmd line command: Delombok
Yes iām aware of that but the code produced can be ugly so for some important classes we will apply immediately after the alternative solution I need to decide on. Codebase is big.