A failure, great! I didn't expect nb-javac to be bug-free, even it appeared for a long time to be! I didn't even have "Issues" tab enabled in the project.
> https://github.com/JaroslavTulach/nb-javac/blob/263555047a69f18125d52002c4ce76bec796e2e9/make/langtools/netbeans/nb-javac/src/nbjavac/ModuleWrapper.java#L47-L53 Yeah, this line seems to be suboptimal. It can certainly be improved. Do you want to be the first one to [report a bug for nb-javac](https://github.com/JaroslavTulach/nb-javac/issues)? Do you want to improve the [test suite](https://github.com/JaroslavTulach/nb-javac/tree/master/make/langtools/netbeans/nb-javac/test)? I'll be delighted to fix the problem and release new version then! -jt st 22. 4. 2026 v 21:58 odesílatel Matthias Bläsing <[email protected]> napsal: > > Hi, > > a recent PR invoked the nb-javac build of NetBeans. That workflow > should check whether nb-javac is good enough to build netbeans. Turns > out it is not. > > See log here: > https://productionresultssa18.blob.core.windows.net/actions-results/28068a0f-63f5-48b1-a166-ae2eee5c57ef/workflow-job-run-9d019235-65d7-5ef9-b11d-1745e2ca0652/logs/job/job-logs.txt?rsct=text%2Fplain&se=2026-04-22T19%3A52%3A32Z&sig=VFIun0v0phniRMb6ImiuRhJYGK%2FEWoGYjPCrkaPSTT0%3D&ske=2026-04-22T23%3A07%3A46Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2026-04-22T19%3A07%3A46Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2026-04-22T19%3A42%3A27Z&sv=2025-11-05 > > Stacktrace: > > 2026-04-09T17:00:46.6738067Z -do-compile: > 2026-04-09T17:00:46.6908408Z [nb-javac] Compiling 217 source files to > /home/runner/work/netbeans/netbeans/java/java.source.base/build/classes > 2026-04-09T17:00:46.6922576Z [nb-javac] Ignoring source, target and > bootclasspath as release has been set > 2026-04-09T17:00:47.2777146Z [repeat] > /home/runner/work/netbeans/netbeans/java/java.source.base/src/org/netbeans/modules/java/source/indexing/APTUtils.java:1019: > warning: Undocumented format parameter {0} prepend line: # {0} - some text, > 2026-04-09T17:00:47.2779693Z [repeat] > @Messages("ERR_ProcessorException=Annotation processor {0} failed with an > exception: {1}") > 2026-04-09T17:00:47.2780462Z [repeat] ^ > 2026-04-09T17:00:47.2782400Z [repeat] > /home/runner/work/netbeans/netbeans/java/java.source.base/src/org/netbeans/modules/java/source/indexing/APTUtils.java:1019: > warning: Undocumented format parameter {1} prepend line: # {1} - some text, > 2026-04-09T17:00:47.2784892Z [repeat] > @Messages("ERR_ProcessorException=Annotation processor {0} failed with an > exception: {1}") > 2026-04-09T17:00:47.2785831Z [repeat] ^ > 2026-04-09T17:00:47.2786221Z [repeat] 2 warnings > 2026-04-09T17:00:47.2786589Z [repeat] > 2026-04-09T17:00:47.2786889Z [repeat] > 2026-04-09T17:00:47.2787512Z [repeat] An annotation processor threw an > uncaught exception. > 2026-04-09T17:00:47.2788226Z [repeat] Consult the following stack trace > for details. > 2026-04-09T17:00:47.2789405Z [repeat] java.lang.NullPointerException: > Cannot invoke "javax.lang.model.element.ModuleElement.getClass()" because > "module" is null > 2026-04-09T17:00:47.2790844Z [repeat] at > com.sun.tools.javac.model.JavacElements.getTypeElement(JavacElements.java:172) > 2026-04-09T17:00:47.2791972Z [repeat] at > com.sun.tools.javac.model.JavacElements.getTypeElement(JavacElements.java:90) > 2026-04-09T17:00:47.2792879Z [repeat] at > com.sun.tools.javac.processing.JavacRoundEnvironment.annotationToElement(JavacRoundEnvironment.java:274) > 2026-04-09T17:00:47.2793948Z [repeat] at > com.sun.tools.javac.processing.JavacRoundEnvironment.getElementsAnnotatedWith(JavacRoundEnvironment.java:237) > 2026-04-09T17:00:47.2795010Z [repeat] at > org.netbeans.modules.openide.util.NamedServiceProcessor.handleProcess(NamedServiceProcessor.java:153) > 2026-04-09T17:00:47.2795958Z [repeat] at > org.openide.util.lookup.implspi.AbstractServiceProviderProcessor.process(AbstractServiceProviderProcessor.java:103) > 2026-04-09T17:00:47.2796890Z [repeat] at > com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:941) > 2026-04-09T17:00:47.2797959Z [repeat] at > com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:857) > 2026-04-09T17:00:47.2799205Z [repeat] at > com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2100(JavacProcessingEnvironment.java:111) > 2026-04-09T17:00:47.2800074Z [repeat] at > com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1173) > 2026-04-09T17:00:47.2800933Z [repeat] at > com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1286) > 2026-04-09T17:00:47.2801697Z [repeat] at > com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1276) > 2026-04-09T17:00:47.2802315Z [repeat] at > com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:952) > 2026-04-09T17:00:47.2802809Z [repeat] at > com.sun.tools.javac.main.Main.compile(Main.java:307) > > > I looked into the code and to me this looks strange: > > https://github.com/JaroslavTulach/nb-javac/blob/263555047a69f18125d52002c4ce76bec796e2e9/make/langtools/netbeans/nb-javac/src/META-INF/upgrade/nbjavac.hint#L69-L71 > > causes calls to this: > > https://github.com/JaroslavTulach/nb-javac/blob/263555047a69f18125d52002c4ce76bec796e2e9/make/langtools/netbeans/nb-javac/src/nbjavac/ModuleWrapper.java#L47-L53 > > These values are obviously wrong. In our case the right module is the unnamed > module and not `jdk.compiler`. > > What I don't get: NB targets JDK 17/21, even our conservative baseline is 8 > versions beyond when `Class#getModule` was introduced. > > This might point to a deeper problem: We have several cases where people > report strange behavior, semi random parsing/indexing errors and I see > patching that makes no sense to me and is obviously not correct. Maybe at > least some of the problems are caused by a broken javac implementation? > > The claim: > > "It allows to run the latest OpenJDK compiler on older JDKs - as old as JDK8 > while being 1:1 identical with the official javac". > > Seems to me not correct. > > So what to do with this state? Would it make sense to change baseline to > build for the oldest LTS version of Java at a given time? > > Greetings > > Matthias > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
