Upgraded to Java 7 and Delombok now gives me a VerifyError

230 views
Skip to first unread message

Anthony Whitford

unread,
Oct 26, 2013, 12:40:59 PM10/26/13
to project...@googlegroups.com
I upgraded my laptop to Mac OS X 10.9, and so had to upgrade to Java 7 Update 45 in the process (previously running Java 6 Update 51, I think).

Now my use of delombok from Version 1.12.2 is failing with the error:

[ERROR] Failed to execute goal org.projectlombok:lombok-maven-plugin:1.12.2.1-SNAPSHOT:delombok (delombok) on project test-maven-lombok: Execution delombok of goal org.projectlombok:lombok-maven-plugin:1.12.2.1-SNAPSHOT:delombok failed: An API incompatibility was encountered while executing org.projectlombok:lombok-maven-plugin:1.12.2.1-SNAPSHOT:delombok: java.lang.VerifyError: Bad type on operand stack
[ERROR] Exception Details:
[ERROR] Location:
[ERROR] lombok/delombok/Delombok.delombok()Z @222: invokevirtual
[ERROR] Reason:
[ERROR] Type 'com/sun/tools/javac/comp/Todo' (current frame, stack[2]) is not assignable to 'com/sun/tools/javac/util/ListBuffer'
[ERROR] Current Frame:
[ERROR] bci: @222
[ERROR] flags: { }
[ERROR] locals: { 'lombok/delombok/Delombok', 'lombok/javac/LombokOptions', 'lombok/javac/CommentCatcher', 'com/sun/tools/javac/main/JavaCompiler', 'java/util/List', 'java/util/Map', 'com/sun/tools/javac/main/JavaCompiler' }
[ERROR] stack: { 'com/sun/tools/javac/main/JavaCompiler', 'com/sun/tools/javac/main/JavaCompiler', 'com/sun/tools/javac/comp/Todo' }


Is this a known issue?  Is there a workaround?  Or is this a bug?

Reinier Zwitserloot

unread,
Oct 26, 2013, 5:33:33 PM10/26/13
to project-lombok
Sounds like a real problem; in all sources we can find, 'Todo' extends 'ListBuffer'. Unfortunately, a casual glance at the delombok method does not find any place where a Todo is on the stack but a ListBuffer is required.

I've downloaded j7u45 for mac and tried to delombok a very simple example (with @Getter), and this does NOT reproduce the problem.

Any chance I can convince you to give me a simple singular source file that reliably triggers this bug when delomboking?


 --Reinier Zwitserloot


--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reinier Zwitserloot

unread,
Oct 26, 2013, 5:37:19 PM10/26/13
to project-lombok
line 394 in Delombok.java specifically does some reflection-based gymnastics to solve this very problem, but that code has been in lombok for a while so I'm very confused. are you 100% sure this is v1.12.something? It's a carbon copy of an issue we already solved.

 --Reinier Zwitserloot

Anthony Whitford

unread,
Oct 26, 2013, 5:39:20 PM10/26/13
to project...@googlegroups.com
I stumbled across this simply building my lombok.maven plugin:  https://github.com/awhitford/lombok.maven
You can just clone it and run:  mvn install
You can also see the Travis CI build results:  https://travis-ci.org/awhitford/lombok.maven

Reinier Zwitserloot

unread,
Oct 27, 2013, 5:31:24 PM10/27/13
to project...@googlegroups.com
I cloned your git repository and reran your build. I used the -e switch for some more details; lombok-pg 0.11.3 is on the classpath before delombok and it contains a bug we fixed a long time ago. I don't know enough about mvn to know how to get lombok-pg off the classpath (or such that lombok itself takes precedence), but that seems to be the problem.
Reply all
Reply to author
Forward
0 new messages