jtulach opened a new pull request, #4795: URL: https://github.com/apache/netbeans/pull/4795
This PR is a practical follow up of a [discussion recently held](https://lists.apache.org/thread/z0fx3b2vrjx2rqlf07mfr493tqnmc51b) on NetBeans public forums. The discussion was based on my [Admire Kotlin, Adhere to Java](https://www.youtube.com/watch?v=ua-8ySwFgqg) talk that highlights some of the benefits of Kotlin and describes that one doesn't have to use Kotlin to get the same benefits. In particular these two benefits are subject of this pull request: > - language specification independent of the JDK > - compiler version specified as part of project build script This pull request achieves both goals by using [nb-javac](https://cwiki.apache.org/confluence/display/NETBEANS/Overview%3A+nb-javac) to compile NetBeans code base. Not everything is ready right now, but similar benefits (as for using [nb-javac](https://cwiki.apache.org/confluence/display/NETBEANS/Overview%3A+nb-javac) internally in the IDE) apply: With this change, it doesn't matter what JDK one uses to build NetBeans. Even if there is some future JDK that drops `-release 8` support in `javac`, it doesn't matter, as the `nb-javac` compiler version 19.0.0 is _part of the build script_. Not only the _fixture_ of compiler is beneficial for reproducing the past builds, it is also beneficial for accessing the future: `ant -f java/java.disco/ clean build` now works on any JDK (not just JDK11+ as is the current `master` state). This may not seem like a huge benefit, but think about modules using JDK17 or even JDK19+ APIs (read [run on JDK8, use JDK11 APIs!](http://wiki.apidesign.org/wiki/AlternativeImplementation) for details) which conditionally unlocks access to all modern JDK features! Not everything is ideal yet. This PR is a work in progress. It is offered for review & experiments. Further changes will be needed to address various CI failures and remove temporary hacks (like disabling `-Werror`). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
