Skip to content

[BUG] [Regression] NetBeans integration broken in 1.18.16 #2612

Closed
@lprimak

Description

@lprimak

Describe the bug
NetBeans "default" integration fails to process Lombok annotations,
resulting in IDE errors in Lombok projects

To Reproduce
Load a Lombok project into NetBeans IDE and see that it has errors

Expected behavior
Project is error-free

Version info (please complete the following information):
Lombok 1.18.16 and 1.18.14
MacOS, Java 8 (latest)
NetBeans 12 with the latest updates

Additional context
Just upgraded to .16 from .12 and seeing this error

Activity

rspilker

rspilker commented on Oct 15, 2020

@rspilker
Collaborator

I understand you have errors in your code. But I'm not sure if you mean that Lombok silently didn't work, and therefore you have compiler errors since the getters were not generated, or if you suddenly get errors from Lombok code.

Do you have exceptions that occurred?

added
parkedWithout further feedback this bug cannot be processed. If no feedback is provided, we close these.
on Oct 15, 2020
lprimak

lprimak commented on Oct 15, 2020

@lprimak
Author

It looks like NetBeans either fails or not invoking Lombok starting in .14 version.
Because of that, the project is full of errors because none of the Lombok features are invoked anymore.
The code is error-free when compiled in Maven. The errors only show in NetBeans because
the new version of Lombok no longer works nicely with NetBeans 12 when upgrading to version .14

lprimak

lprimak commented on Oct 16, 2020

@lprimak
Author

Screen Shot 2020-10-15 at 8 06 27 PM

In the screenshot above, you can see the errors,
and NetBeans not finding a @Builder-generated code from Lombok,
when everything worked correctly in the .12 version

lprimak

lprimak commented on Oct 16, 2020

@lprimak
Author

Is the above clear? I feel like @rspilker you didn't understand the problem
thanks for checking!

lprimak

lprimak commented on Oct 16, 2020

@lprimak
Author

Screen Shot 2020-10-15 at 8 19 46 PM

Screenshot above is from the .12 version of Lombok with the same project and the same setup.
Once again, maven compiles the project just fine under both .12 and .14 versions barring changes related to #2610

asbachb

asbachb commented on Oct 16, 2020

@asbachb

I guess I'm running into a similar issue but with @Setter annotation. The internal NetBeans (12.1) compiler crashes with the new version:

java.lang.AssertionError
	at com.sun.tools.javac.util.Assert.error(Assert.java:155)
	at com.sun.tools.javac.util.Assert.check(Assert.java:46)
	at com.sun.tools.javac.util.Bits.incl(Bits.java:200)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.initParam(Flow.java:2183)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitMethodDef(Flow.java:2110)
	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:889)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:456)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1679)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitClassDef(Flow.java:2052)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:790)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:456)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1679)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2815)
	at com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2797)
	at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:219)
	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1499)
	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1473)
	at com.sun.tools.javac.api.JavacTaskImpl$1.process(JavacTaskImpl.java:504)
	at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:651)
	at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:507)
[catch] at org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:261)
	at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:361)
	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:275)
	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2750)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$800(RepositoryUpdater.java:2154)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2636)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2634)
	at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2634)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3300)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3255)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$4.run(RepositoryUpdater.java:2127)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2123)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2104)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1500(RepositoryUpdater.java:136)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3255)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3785)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
	at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091)
	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
sephiroth-j

sephiroth-j commented on Oct 18, 2020

@sephiroth-j

same here with NetBeans 12.1 and Lombok 1.18.16 ... same project, simply getter/setter/data annotations, the only change was to update Lombok from 1.18.12 to 1.18.16.

changed the title [-][BUG] [Regression] NetBeans integration broken in 1.18.14[/-] [+][BUG] [Regression] NetBeans integration broken in 1.18.16[/+] on Oct 19, 2020
lprimak

lprimak commented on Oct 19, 2020

@lprimak
Author

Confirmed. Same issue with 1.18.16

Rawi01

Rawi01 commented on Oct 19, 2020

@Rawi01
Collaborator

I just tried this using the latest netbeans and lombok version and a super simple example and it works as expected.
img
Can you share a broken code snippet/project?

asbachb

asbachb commented on Oct 19, 2020

@asbachb

@Rawi01 I guess you need to ensure that you installed and activated "The nb-javac java editing support library" and compile on save is enabled for your project.

Rawi01

Rawi01 commented on Oct 19, 2020

@Rawi01
Collaborator

@asbachb That was the information I was missing, thanks. It should be possible to debug it now.

lprimak

lprimak commented on Oct 19, 2020

@lprimak
Author

Also, if you need a project, you can use this: https://github.com/flowlogix/flowlogix
and change lombok version in https://github.com/flowlogix/flowlogix/blob/master/flowlogix-bom/pom.xml

added a commit that references this issue on Oct 21, 2020

[projectlombok#2612] VarSymbol.adr is required for flow analysis in N…

50 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    parkedWithout further feedback this bug cannot be processed. If no feedback is provided, we close these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sysmat@rspilker@didiez@lprimak@asbachb

        Issue actions

          [BUG] [Regression] NetBeans integration broken in 1.18.16 · Issue #2612 · projectlombok/lombok