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 2022/10/27 03:32:30 UTC
[GitHub] [netbeans] timboudreau opened a new pull request, #4868: Fix maven classpath listening
timboudreau opened a new pull request, #4868:
URL: https://github.com/apache/netbeans/pull/4868
I noticed, in a project that generates a lot of classes using annotation processors, that frequently the IDE would not reparse after code generation, and so error markers on code that references generated classes and similar would not be updated.
I tracked it down to this:
The previous code calls `WeakListeners.propertyChange()` *with a lambda*. The lambda will be garbage collected instantaneously and never fire changes, which was exactly the behavior.
On JDK-8, lambdas and method references would hang around a while before being garbage collected - so this code might have looked like it worked originally. On newer JDKs, the lambda will be garbage collected almost as soon as it is allocated, so notifications will never propagate.
I've been running this patch for a month or so without problems.
One slightly questionable thing: There was commented out code to also listen on `proj.getProjectWatcher()`. It seemed harmless, now that the class is implementing `PropertyChangeListener` directly, and the code wanted the same listener implementation, to uncomment it, so I did.
I can definitely verify that it works, because I had to fix in a deadlock in the icon-badging support in my Antlr plugins that could only be triggered by the events that were never fired :-)
--
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] neilcsmith-net commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1293522551
Makes sense. @timboudreau @sdedic please make a call if this should be targeted at NB16 and delivery, and if so, update as necessary - thanks!
--
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] neilcsmith-net commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1293553379
I keep forgetting @timboudreau isn't on the PMC! Still need a call on whether to target this to NB16 though.
The Cleaner documentation is almost the reverse problem.
--
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] timboudreau commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
timboudreau commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1296321061
> would you be interested in becoming a NetBeans committer?
I spent nearly 20 years of my life being **Mr. NetBeans**, so I pretty intentionally did *not* sign up to be one when things moved to Apache.
But yeah, I supposed I could be talked into it.
Re the patch, it would sure be nice for it to be integrated into the next release. It makes a difference in the IDE actually picking up changes from depended-on projects (the telltale that it works is that, with the patch installed, when you edit a parent POM file and change, say, the version of a library, you'll see the *Background scanning of projects* progress bar pop up briefly.
It wouldn't be too hard to detect use of a lambda with WeakListeners (or Lookup.Result, which would also have this problem) from inside Javac. I don't know if we currently have an easy way to write hints that use javac's api directly rather than via Jackpot, but the test is simply "is this a lambda" == "is this one of [list of things that add to a weak set]". Solving it for specific, common cases is probably more important than solving the general case of "added to anything that might get wrapped in a weak reference".
--
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] timboudreau commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
timboudreau commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1308185830
Well, shoot. Really, there is no rebase option from Github's merge UI? It seems a pity to have it held hostage to the original author rebasing it - github emails go to an inbox I don't check all that often.
--
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] neilcsmith-net commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1298258678
Need to get this in to delivery soon to target rc3 so have rebased onto delivery in #4899
Please check everything is as it should be. Once green I'll merge. Thanks!
--
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] neilcsmith-net closed pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
neilcsmith-net closed pull request #4868: Fix maven classpath listening
URL: https://github.com/apache/netbeans/pull/4868
--
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] mbien commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1293537089
interesting discovery. The doc of `Cleaner` has also an extra note on lambdas:
https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/ref/Cleaner.html
would have been good to inspect the codebase with a jackpot script to catch other occurrences but jackpot can't match lambdas yet unfortunately (#4758).
how comes that @timboudreau doesn't has commit rights yet? He wrote half of the code ;)
--
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] mbien commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1294300241
@timboudreau would you be interested in becoming a NetBeans committer? This would unlock more features on github for this repo (being able to restart CI jobs is my favorite :)). We very much think that you should be a committer at the very least given how much code originates from you. If yes we would send an email with more details.
--
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] mbien commented on pull request #4868: Fix maven classpath listening
Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4868:
URL: https://github.com/apache/netbeans/pull/4868#issuecomment-1296325684
@timboudreau I changed this PR to target the delivery branch so that it could potentially get into NB16.
However, you would have to cherry pick this commit on top of the current delivery branch and then force push into this PR again to make this work. Otherwise we have a messed up history.
--
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