netbeans
netbeans copied to clipboard
Upgrade to nb-javac from JDK 23, build 26
A draft for now, but if/when tests are OK with this version of javac, I think we should include it. (And, eventually, upgrade to a newer version when it becomes available, of course.)
goodbye string templates, lets hope they will be back at some point in future.
This is something we should mention on the download page since it might be surprising for users that NB 23 won't know about STs anymore even when the project is on JDK 21.
goodbye string templates, lets hope they will be back at some point in future.
This is something we should mention on the download page since it might be surprising for users that NB 23 won't know about STs anymore even when the project is on JDK 21.
Agreed. Although I don't see anything we could reasonably technically do to mitigate the situation.
Although I don't see anything we could reasonably technically do to mitigate the situation.
agreed. String templates were API+language and implemented in java.base and jdk.compiler. So even when we would create a frankenstein nb-javac and partially revert https://github.com/openjdk/jdk/pull/18688 it would create problems.
We also don't know how the next version of string templates will look like or when it will arrive - as soon it is available it would break the JDK 21 templates anyway. (preview features are locked to the JDK version for a reason - otherwise the JDK would have to provide multiple implementations of the same feature)
This is the simplest approach, so +1 from me. Thanks for working on this!
@lahodaj would you mind finalizing this? While looking into the JSF modules in the NetBeans codebase I also got exceptions from the ThisEscapeAnalyser and I have some hopes, that they are fixed by the update of nb-javac. I would test this one, but the referenced binaries seem not to have been released and thus were not promoted to central, so the nb-javac release has to be respun.
Build a local test version of nb-javac and build netbeans with this applied: build.patch.txt
First impression is good, I plan to run with it the next week.
The plan is to finalize with a new (currently up-to-date) javac. Ideally, sometime during this week, I think. Thanks for the comments!
this PR would have to bump the two 22 values to 23-ea for the java hints job like we did in past a few times:
https://github.com/apache/netbeans/blob/76e1f35de7a67b9dbba66d59be6840a81fd4ae8a/.github/workflows/main.yml#L1465-L1468
this would allow us to merge https://github.com/apache/netbeans/pull/7525 without having to wait for the nb-javac changes.
The nb-javac binary download has been updated to JDK 23 build 30, as uploaded to Maven central, I think I've fixed all the comments so far. So I think this is ready for review now. Thanks!
Thanks! I'll merge if there's a clean test run.
had to restart the platform batch2 and groovy jobs, but the failures look like normal flakiness unrelated to nb-javac. Should be green in a few minutes.