Closed krzyk closed 2 years ago
The latest version of AspectJ is 1.9.7, supporting Java 16, see release notes.
This plugin cannot support a version higher than AspectJ itself. Besides, Java 16 is the latest Java SE release, Java 17+ are only development or preview versions. Why do you think you need Java 17 today, before it is even released? What is your use case?
Well, normally apps start supporting future JDKs earlier, so there won't be a lag after the release.
17 will have RC in 2 weeks, there are no new commits, so it is a good time to prepare for working with it.
I wanted to test my project if it is ready for 17, but it fails early on aspectj, which is a bummer.
But if there is no aspectj right now supportin 17 then we need to wait :(
The AspectJ compiler is a fork of the Eclipse compiler, i.e. if AspectJ wants to support new Java features, it needs to do an ugly merge, integrate it with the AspectJ-specific compiler features, create new tests, keep existing ones passing and many more things. The lead developer of AspectJ (Andrew "Andy" Clement) is super busy with his daytime job as a development director at VMware, leading the team creating Spring Boot Native (running on GraalVM). So I did 90% of the work for 1.9.7, upgrading from Java 14 to 15+16, and also trying to keep this plugin up to date. I am still a relative newbie contributor to both projects and also have a daytime job as an agile coach. Actually, I last made money with coding 20 years ago, only doing some OSS development for fun in my sparetime. You see, AspectJ does not have big teams like Oracle, Eclipse, Apache, SpringSource etc.
When next time I feel inclined to merge in the latest changes from ECJ into AspectJ and have a running development version and also get around to upgrade this plugin to Java 17 as a consequence, I can let you know. So let us keep this issue open.
As an alternative, feel free to contribute to AspectJ and provide pull requests. 😉
BTW, which new language features are you testing presently? There does not seem to be a lot of exciting stuff.
Actually I'm not testing new language features, I just like to be on the latest JDK :) For me records where the biggest feature, so I got it in JDK 16. I don't have much need for sealed classes but you know, latest and greatest and fastest JDK is always the current one :)
And it's the one that gets the most bugfixes and is the one that is encouraged by openjdk team.
Not to mention that for those that like LTS term (which is not that accurate for JDK as for other projects), 17 will have LTS from vendors so it is one that will stay longer, just like 11 and 8.
Well, LTS means "long term support", not "ASAP support". I am not in a hurry, just because you prefer to always be on the latest (pre-)release version. It is done when it is done. If you have no better reasons, please simply wait until there are news concerning AspectJ and JDK 17. Thank you.
Sorry, I think you misunderstood me. I don't say you should give me working project, I was just explaining my reasoning why I reported it now and not later.
I frequently do it in projects so they are ready when the release of new java is ready, just this and nothing more.
There are snapshot versions of both AspectJ and this plugin available via Maven, both supporting Java 17-EA, see https://github.com/eclipse/org.aspectj/issues/79#issuecomment-888045708.
Update: AspectJ Maven Plugin 1.13 with Java 17 support has been released. You still need an AspectJ snapshot version, but no longer a snapshot for this plugin, see https://github.com/eclipse/org.aspectj/issues/79#issuecomment-888284841.
I used this plugin on JDK 16 and it was working fine. Now I wanted to test out how my project behaves in JDK 17 and it fails on aspectj-maven-plugin with:
Just as if the source level was < 1.5, which is strange because it is set to 17.
This is my configuration: