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 2018/10/23 06:06:16 UTC

[GitHub] sdedic commented on issue #978: [NETBEANS-1481] Fix handling of eager module fragments (regression netbeans 9.0)

sdedic commented on issue #978: [NETBEANS-1481] Fix handling of eager module fragments (regression netbeans 9.0)
URL: https://github.com/apache/incubator-netbeans/pull/978#issuecomment-432105461
 
 
   The contract of fragments was underspecified, it seems. The original idea (and still a requirement) was to supplement other module's code to satisfy (mostly legacy) dependencies (the `compat8` auto-injected dependencies were the first users of Fragment feature). For this, it is sufficient that autoload fragment loads only on demand. BUT since the hosting module's classloader is actually extended by fragment's contents, delayed load (after a depending module is enabled) causes entire IDE restart, as the classloader may have linked some classes in a different way not having the fragment loaded.
   
   I think it is good to idea to mark fragments `eager` to distinguish between the two cases. So let's have `autoload` fragments to load on demand with a possible IDE restart and `eager` fragments to attach early and prime the system. This also means that 'autoload' fragments may not fail silently (at least log) but `eager` failures should be treated just as other unsatisfied dependencies - this PR fixes that.
   
   `autoload` scenario should also satisfy `nbjavac` case, where the fragment is `OpenIDE-Module-Required`, so triggered by `java.source.nbjavac` module - correct, @jlahoda  ?
   
   So my answers to your questions:
   1. yes, a non-eager/autoload (= manually controlled) fragment should enable its host. 
   2. no, such fragments should be marked `eager`
   
   /cc: @jlahoda 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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