-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Java 19 #3264
Comments
Hello, |
There's a draft PR for this |
It's undone and frozen. |
Is the project dead? Or I should send some support money to get this fixed or something? I want to use JDK 19 to be able to use virtual threads, but this unfortunately blocks me entirely. (I use SneakyThrows at 100+ places lol.) |
I am also here because SneakyThrows does not compile on java 19... I think it is worth at least pulling down the branches with the pr's (projectlombok/lombok.patcher#11 and #3251), pushing to maven local and seeing if that works. i think #3251 is actually doing too much, there should just be a simple pr that bumps the patcher version after pr11 gets merged (if that accomplishes what i think it might, and restore all the base functionality like sneakythrows in java 19) |
@rzwitserloot, ping? |
the lombok.patcher pr.11 built and compiled, but it looks like it is an odd version, so that requires making it even for a release (iirc how lombok versioning works, but the version referenced in lombok proper is 44, so I changed but after renaming the files manually, and manually creating a pom file, it works! and switching back to the published version (.24), it gives this error
Here is a repo where you can try the same (after publishing to maven local) - https://github.com/alexanderankin/lombok-maven-local-reproducer seems like it is just a matter of running the release. edit: so to summarize, all that is needed to restore basic functionality is to upgrade the asm dep version, which can be accomplished in the lombok.patcher. |
I uploaded a pre-built version of the linked PR: lombok-jdk19-20221010.zip It would be really helpful if you can test it with JDK19 and especially some of the new language features. I have no time to do all that myself at the moment. I know that it is annoying that there is no new release but everyone who works on the project does it in his spare time. |
I've updated my repo to install this new version from @Rawi01 into the maven local repository in alexanderankin/lombok-maven-local-reproducer#1 |
That's fine and absolutely understandable. I just wanted to know what's up because I saw next to zero responses on the issues in the past couple of weeks. I have a pretty big project. Will try compiling it with the provided JAR. |
@Rawi01 Thanks for the JAR, it works well. I was able to compile the project with it, tests ran just fine and the apps start as expected. I'll do more testing soon but as for now, it looks good! |
@alexanderankin temporary solution task downloadLombok() {
inputs.property('lombokSrc', 'https://github.com/projectlombok/lombok/files/9745621/lombok-jdk19-20221010.zip')
outputs.files file("$buildDir/lombok.zip")
doLast {
ant.get(src: inputs.properties.lombokSrc, dest: tasks.downloadLombok.outputs.files.singleFile)
}
}
task installLombok(type: Sync, dependsOn: tasks.downloadLombok) { task ->
def extractDir = file("${buildDir}/ext-libs")
outputs.files fileTree(extractDir) {
include "**/*.jar"
builtBy task
}
from zipTree(tasks.downloadLombok.outputs.files.singleFile)
into extractDir
}
dependencies {
compileOnly files({ tasks.installLombok.outputs.files })
annotationProcessor files({ tasks.installLombok.outputs.files })
} |
Thanks for testing, I marked my PR as ready |
Thanks for the job! The build of the PR is failing. I guess that's why it is not merged yet. |
any ETA on this? |
So... we're waiting on this: which is dependent on the lombok patcher being updated, by this: which... doesn't seem to have any blockers, other than someone with write access to be merge it and kick off things, I guess. |
Update: To get Java 19 support, this needs to be merged: Which is blocked by the Which is blocked/not-wanting-to-merge-yet, because the |
Any ETA? This one is open for almost 2.5 months. The java release cycle is 6 months so at this pace by the time it will be fixed, JDK 20 will be out already. I'm using Rawi's jar from a local repo of my project. It works but is still super sketchy, to be honest. :/ |
I think its just two maintainers on this project, so i would expect it to be handled at the next lts release, thats about 1.5 years apart. |
So I'll need to provide my own patch to jump to JDK 20 in the future? Ouch. |
@Rawi01 thanks! |
@bademux
|
@rspilker, hi, could you maybe promote this issue somehow? |
I did something similar, but I committed the JAR into my repo:
I don't want to let my build process depend on GitHub. But that's just me and my boring enterprisy thinking. |
@laxika |
@bademux Damn, you got me! |
@laxika That's a good point. I will update my project like this. |
@laxika I did it as you suggested. This is much better than pulling stuff from GitHub. Thank you, I am not that familiar with Gradle. It works well but there's a problem with my IDE (IntelliJ Idea). It doesn't recognize Lombok and highlights all Lombok annotations etc. as errors, even though the code compiles and runs without any problems. I polished the dependencies further, so now it's
Everything works well now. The code compiles and runs and Idea is happy. |
@MCakrt Do you use the latest IntelliJ Idea? It works for me with the latest one. :/ Nice that you found a fix though! |
@laxika I was using the previous version when I wrote the comment. I have upgraded Idea after that. |
I wouldn't commit a jar to my git repository. That's not reallt "enterprise thinking. Enterprise thinking would be to clone the repo to your enterprise and use git submodules to use lombok in you project. |
And why woud that be? There is a reason why Java updates every 6 months, and there is a reason why every enterprise should too. |
Is there any chance that this support will be added any time soon? I'm considerin de-lomboking my projects over this. Java 19 has been out for months now nd Java 20 will be released within 3 months. |
Actually in an enterprise environment companies use their own maven repository (Artifactory for example). You would fork the lombok repo and deploy your own code into your own repo. To be honest, I just ment that line as a joke. It was a crappy one, I see. :) |
I think it is not a world-scale problem for us if lombok doesn't update with non lts versions. Actually using non lts is offen considered as risky for enterprise. But for me it is very dangerous signal that maintainers are silent for months. If the silence will continue after release of java 20, I think somebody should fork repo. |
@SimSonic wrote:
Yup, we didn't feel all that much stress about 19 for that reason. Various awesome PRs - thanks, @Rawi01 :) - have been merged, and JDK19 support has been added. You can now download the edge release and give it a spin! We'll ship this as official release, assuming nobody finds major problems with it, within a week. Feedback welcome! |
Great! Thanks a lot!
|
Yaaaay! Thanks a lot for picking this issue up! |
It seems like https://projectlombok.org/edge-releases repository doesn't work. I've got this error during Maven build:
|
Hmm, possibly the edge release via maven has been broken since we moved the website to a new location. I know that in both maven and grade you can use a local jar, I think you need to mark it A fix for the edge release might take another week. |
Turns out our switch to new hosting is slightly more complex than we signed up for. We'll try to get the release out the door ASAP but would prefer not to kludge it together with a bunch of error-prone manual upload actions. Status so far: ✅ Making the JDK19- compatible artefact (lombok 1.18.26) The 4 crosses aren't particularly difficult to fix; primary blocker is that we need to find a simple way to send objects into S3 buckets (well, cloudflare R2, but it's API compatible) automatically from the buildscripts. We'll try to get this all done this week. |
I suppose this should not be very hard with their docs for aws cli and aws cli in docker image... |
I'm beginning to think Java 20 might be released first. |
Everything ok @rzwitserloot? Any new ETA? Obviously I hold some bias, since I really want the JDK 19 support, but it's quite frustrating to not receive a release nor an update, for quite a while 👀 😢 |
Thanks a lot, lombok 1.18.26 form mavencentral works correctly with java 19. |
Omg, it's out! Thanks @rzwitserloot for publishing it! |
1.18.24:
I believe there should be just little changes to support new class file version 63.
Thanks.
The text was updated successfully, but these errors were encountered: