[Proposal] - Migrate Project to Java 21
I would like to propose migrating the project to Java 21. The latest LTS release offers several new features and improvements that could benefit the project. I was wondering if such migration is feasable from technical point?
We use LSP4J inside LSP4IJ https://github.com/redhat-developer/lsp4ij and IntelliJ doesn't require Java 21. For IntelliJ context I think it is a bad idea.
We just went to Java 11 last year in #707 - the discussion leading up to that showed resistance to even consider Java 17 (see conversation in #547).
I am not against ever upgrading, but this is a core library with few dependencies and not much active development. If you can identify what Java 21 features you and the community would benefit from I am willing to discuss further.
Of course our main contributors/consumers would have to be ok with it too, in addition to @angelozerr's comment, xtext is high on that list.
Hmm. We are just about to bump to 17 … Besides that there is no j21 support in xtend gradle without workaround yet
OpenJDK 11 is already EOL, so upgrading to Java 17 makes sense, especially as NetBeans (22+), IntelliJ (2022.3+), and Eclipse (2022-09+) now require it. Jumping to Java 21 for a core library like lsp4j seems premature and would limit adoption.
several new features and improvements that could benefit the project
Which one do you have in mind specifically?
several new features and improvements that could benefit the project
Which one do you have in mind specifically?
@szarnekow Not the OP, but since migrating from Java 11 to 17, I’ve been enjoying enhanced instanceof, switch expressions, records, and text blocks in LSP4E and TM4E. The improved NPE messages with context have been especially helpful, particularly in CI builds.