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

Lombok works with IntelliJ but not Maven against a Java 6 library, when built on a Mac #1396

Open
gregturn opened this Issue May 19, 2017 · 3 comments

Comments

Projects
None yet
1 participant
@gregturn

gregturn commented May 19, 2017

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.

https://github.com/spring-projects/spring-hateoas/tree/rebase/affordances

...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.

Thoughts?

@gregturn

This comment has been minimized.

Show comment
Hide comment
@gregturn

gregturn May 19, 2017

If there was some debugging I could enable to see what Lombok is up to, that would help generate more information.

gregturn commented May 19, 2017

If there was some debugging I could enable to see what Lombok is up to, that would help generate more information.

@gregturn

This comment has been minimized.

Show comment
Hide comment
@gregturn

gregturn May 19, 2017

When I delete all my test classes (which have many Lombok-powered POJOs) + a chunk of the new functionality, the build suddenly works. Fiddling with maven-compiler-plugin's memory settings to see if there is some threshold where things start working again.

gregturn commented May 19, 2017

When I delete all my test classes (which have many Lombok-powered POJOs) + a chunk of the new functionality, the build suddenly works. Fiddling with maven-compiler-plugin's memory settings to see if there is some threshold where things start working again.

@gregturn

This comment has been minimized.

Show comment
Hide comment
@gregturn

gregturn May 20, 2017

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?

gregturn commented May 20, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment