Skip to content
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

[BUG] Annotation processing broken in Netbeans with latest nbjavac updates #3468

Closed
makiam opened this issue Jul 27, 2023 · 4 comments · Fixed by #3473
Closed

[BUG] Annotation processing broken in Netbeans with latest nbjavac updates #3468

makiam opened this issue Jul 27, 2023 · 4 comments · Fixed by #3473

Comments

@makiam
Copy link

makiam commented Jul 27, 2023

Describe the bug
Annotation processing broken in Netbeans with latest nbjavac updates. Probably this started with latest commits related to JDK 21 NBJavac support apache/netbeans#6234

To Reproduce
I have gradle project opened with Netbeans. And opened java class annotated with Slf4j annotation. No expected logger field is generated. And I see an exception stacktrace in popup over class declaration:
Annotation processor lombok.launch.AnnotationProcessorHider$AnnotationProcessor failed with an exception: qualid
lombok.javac.JavacImportList.getFullyQualifiedNameForSimpleNameNoAliasing(JavacImportList.java:53)
lombok.core.TypeResolver.typeRefToFullyQualifiedName(TypeResolver.java:60)
lombok.javac.HandlerLibrary.handleAnnotation(HandlerLibrary.java:247)
lombok.javac.JavacTransformer$AnnotationVisitor.visitAnnotationOnType(JavacTransformer.java:79)
lombok.javac.JavacNode.traverse(JavacNode.java:132)
lombok.javac.JavacAST.traverseChildren(JavacAST.java:223)
lombok.javac.JavacNode.traverse(JavacNode.java:95)
lombok.javac.JavacAST.traverseChildren(JavacAST.java:223)
lombok.javac.JavacNode.traverse(JavacNode.java:90)
lombok.javac.JavacAST.traverse(JavacAST.java:219)
lombok.javac.JavacTransformer.transform(JavacTransformer.java:63)
lombok.javac.apt.LombokProcessor.process(LombokProcessor.java:324)
lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:187)
lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:241)
lombok.launch.AnnotationProcessorHider$AnnotationProcessor.process(AnnotationProcessor.java:90)
org.netbeans.modules.java.source.indexing.APTUtils$ErrorToleratingProcessor.process(APTUtils.java:982)
com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1007)
com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:923)
com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2300(JavacProcessingEnvironment.java:113)
com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1251)
com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1366)
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1252)
org.netbeans.lib.nbjavac.services.NBJavaCompiler.processAnnotations(NBJavaCompiler.java:64)
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1151)
com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:348)
com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:282)
org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:74...

Expected behavior
working annotation processing

Version info (please complete the following information):

  • Lombok 1.18.+
  • Windows 10. with latest Netbeans build with Java: 18.0.2
@matthiasblaesing
Copy link

I assume, that you mean apache/netbeans#6206, which is targettet for NB20, not NB19, which is currently being released.
Indeed 6206 brings in the javac from JDK21 and thus this is a duplicate #3393.

@matthiasblaesing
Copy link

Using a lombok build based on the branch suggested in #3393 fixes the issue in NetBeans.

@JoshMcCullough
Copy link

I'm seeing this same issue / stacktrace with NetBeans 21 / OpenJDK 17.0.11+9 / Lombok 1.18.22 and 1.18.32.

@matthiasblaesing
Copy link

matthiasblaesing commented May 22, 2024

@JoshMcCullough:

  1. don't highjack issues, you can reproduce it with 1.18.32, the it is a different issue, 1.18.22 is irrelevant, as it is not current
  2. show a minimal reproducer I (and most probably others) won't chase after an issue where you asked for the pain yourself

Edit: A sorry, I though this was an issue raised against NetBeans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants