projectlombok / lombok

Very spicy additions to the Java programming language.
https://projectlombok.org/
Other
12.9k stars 2.39k forks source link

[BUG] GWT Build will fail with JSR-308 Error after Upgrade to 1.18.12 #2883

Open MCMicS opened 3 years ago

MCMicS commented 3 years ago

Describe the bug After Upgrade from 1.18.10 to at least 1.18.12 the compilation of GWT modules will fail with JSR 308 Annotation error.

Annotation types that do not specify explicit target element types cannot be applied here

I've tried the newest version (1.18.20) because some fixed ECJ error but this still occurs.

To Reproduce Sample project; https://github.com/MCMicS/gwt-lombok-issue you can switch between the branches for single lombok versions.

in branch delomboked is a test for inner static class (with @Value and @ParametersAreNonnullByDefault) which will also break the compilation

There is also a matrix workflow for 1.18.1.0, 1.18.12 and 1.18.20.

Expected behavior Compilation still works with newer lombok version without delombokes source jars

Version info (please complete the following information):

Additional context Firstly it seems related to #2640. It seems to work if the Lombok annotated Files was within the current project. But it fails if the annotated files are within a jar file. If I use delomboked sources the compilation works again.

Maybe I've forgotten to configure something My first idea was following change: lombok.addNullAnnotations

FEATURE: Tired of being unable to use @javax.annotation.ParametersAreNonnullByDefault or @org.eclipse.jdt.annotation.NonNullByDefault because then the equals method that lombok generates isn't valid? Fret no more; lombok can now add nullity annotations where relevant. Set the flavour of nullity annotation you prefer in your lombok.config. Applies to the return value of toString, withX, chainable setX, static constructors, build, builder, etcetera, and the parameter of equals, canEqual, and the plural form of @Singular marked fields for builder classes. Issue #788

MCMicS commented 2 years ago

is any progress here?

rzwitserloot commented 2 years ago

Feels like a GWT bug that has nothing to do with lombok. It exudes bugginess and lack of care. An error that lists a line number but doesn't list a file or a type? That's a bit daft, no? Or is that just a pasting issue?

Pretty cool you made a reproduction target, maybe we can look at it thursday evening.

MCMicS commented 2 years ago

My first indention was a GWT issue but why this happens after update lombok version.

Maybe a mix issue between lombok and GWT.

But the github action in my sample should demonstrate the difference the lombok versions