-
-
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
Lombok, Eclipse and JDK10 fails when using the var keyword #1676
Comments
I'm also seeing this. I presume that because JDK 10 also has a "var" this is somehow clashing with the Lombok "var" feature. I suspect we will need a release of Lombok that does not contain the "var" feature for JDK 10 onwards? If guess I could do build a custom build of Lombok that does not contain "var" feature... Any clues as the difficulty before I dive in? |
I have the same problem. I'm using the latest release of Eclipse Oxygen. If I put lombok on eclipse, "var" doesn't work. In another issues of lombok project, people said that using lombok edge (https://projectlombok.org/download-edge) would fix. Even with the referred version of lombok, I can't use "var". |
Did you remove import |
Yep, there is no trace of Lombok in any import. Here is some sample code:
In eclipse the "var" has a error on it which says: |
Same in Intellij IDEA. Since a "full JDK 10 supported" had been anounced, I have migrated to JAVA 10 and removed all |
The new 1.6.22 release seems to have fixed this. At least it did for me on Eclipse. |
I'll give it a shot. Is an IntelliJ user here other than me, who can confirm the issue? |
Still not working on Eclipse Oxygen.3a for me. Same problem as before. |
Same problem in Visual Studio Code with Lombok version 1.16.22. If you are using "import lombok.var" VSCode thinks that code is fine but Gradle doesn't build it. If you aren't using import VSCode thinks that code has errors, but Gradle build it without problems. |
Looks like a plugin(s) problem to me. I propose to change title of the issue to: |
Is this commit related to fixing this issue? |
Is there any progress on resolving the issue? |
Not progress yet, we do not know why if the import is not present the IDEs give errors. |
Did someone test this in an IDE without lombok installed? |
According to https://www.kevinhooke.com/2018/03/25/taking-a-look-at-java-10-with-eclipse-oxygen-3-with-not-much-success/ this does not work at all. |
Hmm, on the other hand https://www.kevinhooke.com/2018/03/26/update-java-10-with-eclipse-oxygen-3a-4-7-3a-rc2-working/ seems to get it working. |
We fixed it for Eclipse. for IntelliJ or VSCode, please register issues in their projects. |
Roel, it looks like your patch reacts to the presence of the import lombok.var. Pretty cool. I was expecting some patch that just detected JDK 10+ and just disabled the feature. This is cool because (I think) it says "if the import is there, apply Lombok". |
Hello, may I ask about this issue: how it has been resolved if it's been resolved? With the latest Eclipse Java EE IDE for Web Developers Version: 2018-09 and the latest lombok 1.18.2 I am still getting this error when the Eclipse's JVM is instrumented with |
With current version of Lombok (1.18.2) and VS Code everything work like charm when you are using Java 8, Java 9, Java 10 or Java 11. Haven't tested with Java 12 EA yet ;) VS Code and Eclipse are using similar technologies for Java so i am quite sure that everything works with latest Eclipse as well especially if configured right. With VS Code i am using following configuration: { Best, Eero. |
....
Thanks for coming back to me on this. However, with with lombok.jar being @ 1.18.2, latest Eclipse for Java EE developers and JDK11 being OpenJDK there is still:
If the instrumentation of the JVM with lombok.jar is removed everything works fine. |
With the very latest patch of Eclipse Java EE IDE for Web Developers, Version: 2018-09 (4.9.0) for Java 11 it has begun to work. |
If using the 'var' keyword in Eclipse with Lombok and JDK10 I get the following error in Eclipse:
'var' is not allowed here
Using the latest Edge build of Lombok: version: 1.16.21 (2018-04-23 21:43:58 UTC)
If I remove Lombok it works.
The text was updated successfully, but these errors were encountered: