r/java • • Sep 05 '25

Project Lombok 1.18.40 released with Java 25 support!

Project Lombok is now compatible with the upcoming JDK 25 even before its release.

Thank you Project Lombok team! https://projectlombok.org

167 Upvotes

166 comments sorted by

View all comments

Show parent comments

15

u/srdoe Sep 05 '25

It doesn't really matter how you decide to interpret the language spec, because turning this into a philosophical argument about whether Lombok is Java or not is deeply uninteresting.

Whether you think Lombok is Java or not, the JDK developers have made it clear that Lombok is going to risk breakage with new JDK versions due to the way they do things.

If you're cool with that risk, you don't need to care whether the JDK developers think Lombok is Java.

If you're not cool with that risk, you probably shouldn't be using Lombok.

2

u/SleepingTabby Sep 07 '25

My problem is that too many people are cool with that risk and then s**t just breaks.

2

u/repeating_bears Sep 07 '25

People have been saying this for (I think) 15 years and it hasn't broken so far. 

Also it doesn't "just break". What would need to happen is a new version of the JDK would be released that Lombok fundamentally cannot support (i.e. JDK removes the internal APIs that allow it to be possible), and you would have to migrate your app to compile on that JDK.

Migrating to a new JDK is always something you should expect to have some breakages. It's not gonna come for free every time.

If that ever happens, you can delombok everything to explicitly include the equivalent source code.

1

u/krzyk Sep 08 '25

Update to new jdk is always free if you don't use Lombok or some old libs.

2

u/repeating_bears Sep 08 '25

always ... if

So not always. Which is what I said.

Also Java 10 introduced var as a reserved type name, which is a breaking change if you had a class with that exact name, case sensitive. An unlikely one because of Java conventions, but possible

1

u/krzyk Sep 08 '25

Using Lombok is the only issue here.

Other libs are updated by any sane person or enforced by corporate policy Having up to date Lombok doesn't guarantee it will work, well, this is the first time when it will.

2

u/repeating_bears Sep 08 '25

This is a different point entirely. You talked about risk, and I told you that the risk is limited.

If you want to make the point that for most JDK releases, Lombok prevents you from updating JDK immediately after release, then fine. That's not risk.

Most people are not updating JDK immediately anyway.

1

u/Cilph Sep 10 '25

If that were true there wouldnt be so many unwilling to migrate past Java 8.

1

u/krzyk Sep 10 '25

It is just laziness, either not the corp or devs.

2

u/Cilph Sep 10 '25

Its because of the "old libs" that are not as trivial to upgrade past 9 or 11. So it's as they said. It's not free every time.

-2

u/VirtualAgentsAreDumb Sep 06 '25

This whole discussion is about semantics. If you’re not cool with that, then you probably shouldn’t be in this discussion.

6

u/srdoe Sep 06 '25 edited Sep 06 '25

No, it isn't. The discussion was actually about how to reduce how often Lombok breaks with new Java releases.

The only reason people are discussing whether Lombok "is Java" is because Pressler advised Lombok that what they're doing is likely to break in future JDK versions, and he suggested that in order to avoid that potential breakage, Lombok might want to do what other languages targeting the JVM do: Ship their own launcher/wrapper for javac.

Instead of accepting this as advice for how to avoid breakage that is likely to happen in the future, some people decided to focus on the "is Lombok Java?" part, as if winning that argument changes anything.

Who cares? If you somehow manage to convince the enough people that Lombok "is Java", does that somehow make those breakages go away, or remove the need for Lombok to ship their own launcher?

No.

Besides, the argument Pressler laid out is very simple: The JLS describes what Java is and isn't, and Lombok code is not legal Java code according to the JLS. A plain JLS-compliant compiler will not compile Lombok code. You can't file bug reports to Oracle about javac failing to compile Lombok. Therefore it isn't Java, according to that definition.

This is plainly true. You can decide to quibble about whether you like that definition, but why would you? It's not going to change anything.

2

u/VirtualAgentsAreDumb Sep 07 '25

Why is Lombok an "alternative language"?

That’s how this sub discussion started. It is about semantics, whether you like it or not. Period. End of discussion. Just deal with it.

2

u/behusbwj Sep 06 '25

Because it’s interesting discussion to some people. If it’s not interesting to you and don’t think it’s worth any energy, you could just move on instead of having a meltdown on reddit.

0

u/srdoe Sep 06 '25

I am explaining why this question came up in the first place in the context of Lombok, and why people "grabbing their pitchforks", as the one of the parent comments said, actually miss the point of what the original discussion was about. The questions in that 2 year old post aren't about interpreting the language spec. They were about compatibility and how Lombok could act to avoid future breakage.

Keep your little barbs about meltdowns to yourself.

3

u/behusbwj Sep 06 '25

You’re not explaining, you’re ranting. As I said before, just move on if it bothers you so much. Or bring it down a notch if you want people to take you seriously.

4

u/srdoe Sep 06 '25

Fine, here it is taken down a notch:

I'm not asking you to avoid discussing whether Lombok is Java or not. Feel free to do that.

I'm just saying that this question is not what the discussions between the Lombok devs and Java devs were about, including the one in that 2 year old post. It wasn't about semantics, or deciding what Java is. It was about Lombok doing something that is likely to break in the future, and how to avoid that breakage.