-
Notifications
You must be signed in to change notification settings - Fork 519
Description
Hi,
We have a professional maven Spring Boot project with Lombok annotations that we are usually developing on IntelliJ IDEA Ultimate, and for which we have no issues.
Some of our new team members would preferably use VSCode to work on this project.
For this purpose, I have tried playing with VSCode the past week.
I downloaded all mandatory extension and went for cloning the repository directly with VSCode so that there would be no potential clashes with my folder with intelliJ configuration.
At the end of the importing, I'm stuck with VSCode IntelliCode detecting 3K+ problems due to Lombok annotations not recognized, while "mvn compile" work fine.
I have spent the few last days trying different solutions looking at official documents, GitHub ticket and stackoverflow similar issues, from verifying that mandatory extensions were installed, resetting project after extension install, trying alternative extensions, explicitly mentioning lombok version instead of inheriting... to no avail.
A few minutes ago, though I tried downgrading "Language Support for Java(TM) by Red Hat" to 1.8.0 and something changed: I noticed this new bubble notification:
Once I clicked on it and reloaded the project, the errors start disappearing for the current file, and other files when clicking on errors individually. Once noticing that, I went back to 1.15.0 and the errors re-appeared.
Then, I went back one version each time to identify the first version with the problem:
- 1.15.0: broken -- not recognized, no bubble notification
- 1.14.0: broken -- not recognized, no bubble notification
- 1.13.0: broken -- not recognized, no bubble notification
- 1.12.0: broken -- not recognized, no bubble notification
- 1.11.0: working -- though no bubble notification
Thus, I strongly think there was a regression in 1.12.0 making that lombok cease working for a setup similar to mine or for the other extensions, on a given version, I have
Environment
-
Operating System: MacOS 13.2.1
-
JDK version: 17
-
Visual Studio Code version: Version: 1.75.1 (Universal)
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:34:59.000Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin x64 22.3.0
Sandboxed: No -
Java extension version: 1.15.0
All extensions:
- Debugger for Java 0.48.0
- Extension Pack for Java 0.25.7
- IntelliCode 1.2.30
- IntelliJ IDEA Keybindings 1.5.5
- Language Support for Java(TM) by Red Hat 1.15.0
- Maven for Java 0.40.4
- Project Manager for Java 0.21.1
- Spring Boot dashboard 0.10.1
- Spring Boot Extension Pack 0.2.1
- Spring Boot Tools 1.44.0
- Spring Initializr Java Support 0.11.2
- Test Runner for Java 0.37.1
Steps To Reproduce
- Clone repository
- Watch the importing and auto compilation
Current Result
lombok annotations and related code not recognised, thus also failing compilation
The @CustomLog annotation is not configured; please set lombok.log.custom.declaration in lombok.config.
log cannot be resolved
The method userId() is undefined for the type XXX.YYY (it's a @Getter)
...
Expected Result
No IntelliCode problem detected
Additional Informations
Maven:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
Lombok.config
lombok.data.flagUsage=warning
lombok.accessors.fluent=true
lombok.log.custom.declaration=com.xxx.YYY com.xxx.YYY.forEnclosingClass()
settings.json
{
"java.compile.nullAnalysis.mode": "automatic"
}Note:
- Lombok version (both extension and project) are detected in the
{}tool bar. Alternating them does not do anything - Might be related
target/generated-sources/annotationsis empty - Other annotations (e.g. Spring boot ones) work perfectly
