question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when using lombok

See original GitHub issue

[provide a description of the issue]

Environment
  • Operating System: Windows 11
  • JDK version: 17
  • Visual Studio Code version: 1.62.3
  • Java extension version:1.3.0
Steps To Reproduce
  1. Clone https://github.com/Oualitsen/demo-lambok-vscode-issue
  2. Open it in vscode with lombok extention installed.

in most of the time it works fine with lombok but when some base classes are annotated with @FieldNameConstants super classes will not recognize it. (take a look at the screen shots) 1 2

The project compiles and runs fine but the editor shows some errors
I first thought this was the lombok extension issue but I found out (after checking out the lombok extension code) that it has nothing to do with the extension. I in fact uninstalled vscode-java and and installed netbeans language server and the errors were gone.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
snjezacommented, Feb 2, 2022

I did add all the required properties and the warnings were not the problem for me. As I said, this issue can only be reproduced using lombok and I am sure you are using it. I of course did clean the workspace directory (long before opening this issue).

I can reproduce the issue when opening UserBase.java or Client.java. It is an eclipse upstream issue.

0reactions
snjezacommented, Feb 3, 2022

It is an eclipse a lombok upstream issue.

You can try the following workaround:

diff --git a/src/main/java/lombok.config b/src/main/java/lombok.config
new file mode 100644
index 0000000..5979bfc
--- /dev/null
+++ b/src/main/java/lombok.config
@@ -0,0 +1 @@
+lombok.addSuppressWarnings = false
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't compile project when I'm using Lombok under IntelliJ IDEA
I have fixed it in IDEA 12 by setting check box Enable annotation processing in: Settings -> Compiler -> Annotation Processors. For IDEA...
Read more >
Cannot find Symbol error while using Lombok Annotations.
I am getting below error while using the lombok. cannot find symbol [ERROR] symbol: method builder() [ERROR] symbol: getXXXXXX() below are ...
Read more >
Using Lombok with IntelliJ causes compiler error “cannot ...
This blog post is about a compiler error I stumbled about when using the Java library Lombok in conjunction with the IDE IntelliJ....
Read more >
Setting up Lombok with Eclipse and Intellij - Baeldung
Learn how to set up Lombok with popular IDEs. ... generates code only during compilation, the IDE highlights errors in raw source code:....
Read more >
Lombok Changelog
IMPROBABLE BREAKING CHANGE: When using ecj to compile java code with @Builder or @SuperBuilder in it, and a builder setter method was generated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found