Skip to content
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

[BUG] @Accessors(chain = true, fluent = true) with fluent=true no longer behaving as it used on lombok 1.18.30 #3788

Open
momomo opened this issue Nov 23, 2024 · 4 comments
Labels
documentation Addressing this item primarily involves writing docs / updating the website

Comments

@momomo
Copy link

momomo commented Nov 23, 2024

@Accessors(chain = true, fluent = true) @Setter public static final class Params {
        private Strings.Pad  pad        = Strings.Pad.RIGHT;
        private int          separation = 1;
        private CharSequence spacer     = " ";
        private CharSequence newline    = Strings.NEWLINE;
}

Update to JDK 23 and the above with fluent is no longer working.

In the same module and file down the class I have:

new Tabled(new Params().pad(Strings.Pad.LEFT).separation(2)

And it complains about pad method not existing.

I dropped fluent and changed the name to setPad and then it compiles.

Now I probably have to do this all over my code.

Not straightforward. Not nice.

@momomo
Copy link
Author

momomo commented Nov 23, 2024

Btw, it works from within intellij no complains but not from terminal running maven.

@momomo
Copy link
Author

momomo commented Nov 23, 2024

Actually the issue occurs even without fluent. The @Setter is not working either it seems. At least not when updating maven dependencies. I am now on lombok 1.18.36

@momomo
Copy link
Author

momomo commented Nov 23, 2024

Turns out I need now to add:

<annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.36</version> </path> </annotationProcessorPaths>

under the <configuration> of the maven-compiler-plugin

@Rawi01
Copy link
Collaborator

Rawi01 commented Nov 24, 2024

Since Java 23 you have to list all annotation processors (as you did) or set -proc:full as compiler flag.

@Rawi01 Rawi01 added the documentation Addressing this item primarily involves writing docs / updating the website label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Addressing this item primarily involves writing docs / updating the website
Projects
None yet
Development

No branches or pull requests

2 participants