-
Notifications
You must be signed in to change notification settings - Fork 21
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
Errors in workspace until opening all source files with lombok annotations #23
Comments
I'm experiencing the same issue. I wonder if there would be a way to load lombok extension before the redhat.java extension. Perhaps something like this could help: microsoft/vscode#46846 |
Having the same issue. When will it be resolved? |
Which Java version are you using? It happens using Maven or Gradle? |
I'm using java version "1.8.0_212" and Gradle 5.4.1. |
openjdk version "12.0.1" 2019-04-16 |
Also happening for me with openjdk version "12.0.1" 2019-04-16 Using Maven On Windows 10 |
This may be a solution: https://github.com/redhat-developer/vscode-java/wiki/Lombok-support At least for me, adding "-Xbootclasspath/a:/path/to/lombok.jar" to the java.jdt.ls.vmargs made VSCode properly load everything. |
Adding For large projects with many classes, this makes vscode practically unusable for me. |
It‘s same to me.I added The solution is removing the |
Thank you @GKilm, your suggestion to delete the |
Similar:
Adding |
Same issue here. |
It seems like that three projects has loading in my workspace before installing the Lombok plugin. I remove it and add it back again, this problem is vanished. |
Please make sure you’re using the latest version of Lombok in your Pom or gradle file to avoid conflicts with the plugin |
I had this problem too, all the Java files using Lombok used to give the same error (i.e. The method setXXX is undefined for the type YYY). I never had a
This fixed it - I'll leave my specs below anyway so that anyone can try to replicate the environment and see if it works out for them too. EDIT: I noticed that placing the @GabrielBB maybe you could export Lombok version in $ ./gradlew --version
------------------------------------------------------------
Gradle 6.3-rc-4
------------------------------------------------------------
Build time: 2020-03-20 05:39:45 UTC
Revision: 507eaa2e999827ec256a700ffc413c5e92a9e69d
Kotlin: 1.3.70
Groovy: 2.5.10
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 13.0.2 (Oracle Corporation 13.0.2+8)
OS: Linux 5.3.0-42-generic amd64 |
Based on @GKilm suggestion to delete the
After that I opened VS Code and the lombok issues where gone. Then I closed and opened again 5x times to make sure, and the issue didn't come back. |
This works just great for me! |
I tried this but as soon as I compiled the project using maven, the lombok errors were back. |
It's been almost a year, no fix yet? What I have to do every time I compile the project is to go to the pom.xml file and remove the scope from the lombok dependency, save the file, add the scope again. The errors disappear. This is a very hacky solution and we shouldn't have to mess around to get it to work.
|
Opening a project that has several files using lombok annotations will result in many errors displayed in the "Problems" tab.
Clicking on one of the errors, which opens the file will resolve the errors for that file. Once each file with lombok annotations was opened, the "Problems" tab does not show errors anymore.
Unfortunately, closing VC Code and reopening the project brings all errors back.
The text was updated successfully, but these errors were encountered: