You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/02/03 21:49:15 UTC

[GitHub] [netbeans] jlahoda opened a new pull request #2727: [NETBEANS-5322] Removing IndexedClassDecl.

jlahoda opened a new pull request #2727:
URL: https://github.com/apache/netbeans/pull/2727


   Please see:
   https://issues.apache.org/jira/browse/NETBEANS-5322
   for the problem description
   
   The issue is that when Trees.getScope() is called, for vanilla javac, it will assign new anonymous innerclass names to any anonymous innerclasses it encounters, and then drops them to revert back to the original state. But, with nb-javac, we use IndexedClassDecl to keep the anonymous innerclass names stable, and hence the real anonymous innerclasses are dropped at the end of getScope().
   
   On one hand, this could be solved in nb-javac, but I believe we want (or must) avoid the tricks with IndexedClassDecl. These were done mostly for debugger, which needs to know the binary names of classes at least to set breakpoints at correct places. getScope() has been improved significantly and I hope it is good enough for the debugger, so my proposal here is to try to find out if things are working sufficiently OK without IndexedClassDecl by removing it.
   
   (Note IndexedClassDecl does not do much without nb-javac, so this should, I believe, only be really relevant when running with nb-javac.)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on pull request #2727: [NETBEANS-5322] Removing IndexedClassDecl.

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on pull request #2727:
URL: https://github.com/apache/netbeans/pull/2727#issuecomment-890515733


   I'm now running Compile-on-Save with vanilla javac in my working IDE, and I frequently see the following stack trace in the IDE log/notifications:
   
   ```
   java.lang.NoSuchMethodException: com.sun.tools.javac.comp.Enter.unenter(com.sun.tools.javac.tree.JCTree$JCCompilationUnit, com.sun.tools.javac.tree.JCTree)
   	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2475)
   	at org.netbeans.api.java.source.TreeUtilities.unenter(TreeUtilities.java:927)
   	at org.netbeans.api.java.source.TreeUtilities.attributeTree(TreeUtilities.java:916)
   	at org.netbeans.api.java.source.TreeUtilities.attributeTree(TreeUtilities.java:845)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:502)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:477)
   	at org.netbeans.modules.java.source.parsing.MimeTask.run(MimeTask.java:60)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
   	at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:357)
   	at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:340)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
   	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.TaskProcessor.runUserTask(TaskProcessor.java:178)
   	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:311)
   	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:431)
   	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.resolve(DeclarativeHintsParser.java:477)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.access$000(DeclarativeHintsParser.java:83)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseCondition(DeclarativeHintsParser.java:311)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseConditions(DeclarativeHintsParser.java:258)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseRule(DeclarativeHintsParser.java:215)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseInput(DeclarativeHintsParser.java:184)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.access$200(DeclarativeHintsParser.java:90)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.parse(DeclarativeHintsParser.java:395)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHints(DeclarativeHintRegistry.java:263)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHintFile(DeclarativeHintRegistry.java:239)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.readHints(DeclarativeHintRegistry.java:128)
   	at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.computeHints(DeclarativeHintRegistry.java:111)
   	at org.netbeans.modules.java.hints.spiimpl.RulesManagerImpl.readHints(RulesManagerImpl.java:139)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:133)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:128)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:65)
   	at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
   	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)
   ```
   (Also reported in https://issues.apache.org/jira/browse/NETBEANS-5896 )
   
   I think this is printed from the code that was introduced in this PR. Not sure what specific issues it might cause, other than the annoyance of the notification.
   
   Thanks for your work on robustness in the nb-javac and vanilla javac areas!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] geertjanw merged pull request #2727: [NETBEANS-5322] Removing IndexedClassDecl.

Posted by GitBox <gi...@apache.org>.
geertjanw merged pull request #2727:
URL: https://github.com/apache/netbeans/pull/2727


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists