Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Lombok works with IntelliJ but not Maven against a Java 6 library, when built on a Mac #1396
For the past 24 hours, I have been trying to debug why maven won't build a new branch of our project. This branch has a lot more Lombok-annotated classes, and I can't tell if somehow it's crossed a threshold and caused Lombok to silently crash, resulting in no generated code.
...is the branch that won't build. It generates a long stack of errors principally related to missing symbols (no code generation). However, the master branch of the same project builds fine.
NOTE: Code base is currently on Java 6, with plans in the near future to migrate to Java 8.
What makes this more interesting, is that I have reproduced this failure on three different Mac computers, all using the same version of Java. But we have two separate Linux-based CI servers (Travis and Bamboo), building the exact same code branch just fine.
This hints that some environmental aspect is causing Lombok to topple.
I have tried bumping things up to Lombok 1.16.16, maven-compiler-plugin to 3.6.1, Java to 8, but nothing seems to push stuff in the right direction. However, IntelliJ just hums right along as long as I enable annotation processing.
More info: it appears that in Jackson2HalFormsModule, a class holding over a dozen static nested classes, if I break out ONE static nested class, suddenly works again. Not sure what is going on.
I moved half of the nested classes to another enclosing class, and the other half to another (HalForms Serializers and HalFormsDeserializers).
This implies that there is some hidden resource getting tapped out when it comes to parsing or annotation processing. Because a parallel class, Jackson2HalModule, has about eight static nested classes, and does fine. Additionally, I tried to delombok everything to find the breaking point, and almost got everything done. Yet it wasn't enough. So this implies that the annotation processor may be getting stuck somehow on TOO MANY static nested classes, when scanning for annotations on a single class.
This implies there is some hidden index counter in the annotation scanner that can't handle a dozen static nested classes. On a Mac. (Seems to work in Linux). Thoughts?