Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3807 Loading/Unloading of Optional Dependencies

closed-fixed
Dale Anson
5
2013-06-25
2013-06-11
Alan Ezust
No

If a plugin Y has an optional dependency on X, and X is unloaded, then Y should also be unloaded.
Later, if Y is activated, and then X should be activated first.

Activator and Reloader should also behave consistently to this.

Discussion

1 2 > >> (Page 1 of 2)
  • Dale Anson
    Dale Anson
    2013-06-11

    • assigned_to: nobody --> daleanson
     
  • Dale Anson
    Dale Anson
    2013-06-11

    Fixed in revision 23051 in jEdit. I didn't do anything with Activator.

     
  • Dale Anson
    Dale Anson
    2013-06-11

    • status: open --> closed-fixed
     
  • I think it would have been better to fix plugins, only a few of them use optional dependencies don't you think ?

     
  • Dale Anson
    Dale Anson
    2013-06-12

    How would you fix the plugins? This appears to be a classloader issue, so I'm not sure what you would fix in the plugins?

    I think this is only half of the solution -- for example, TaskList has an optional dependency on ProjectViewer. If PV is unloaded, there is no reason for TaskList to also be unloaded. It should be reloaded so that the classloaders are cleaned up. Later, if PV is activated, then TaskList should be reloaded to keep the classloaders straight.

     
  • Dale Anson
    Dale Anson
    2013-06-12

    • status: closed-fixed --> open
     
  • Dale Anson
    Dale Anson
    2013-06-12

    Reopening this since we're still discussing solutions.

     
  • Eric Le Lay
    Eric Le Lay
    2013-06-12

    I'm in favor of changing core and force-reloading dependent plugins (what has been implemented by Dale), because:
    - (practical) it makes the program more robust, when dependents forget to remove so random reference deep down in their code
    - (personal preference) it is the duty of core to implement the dependencies and the duty of the plugins to declare the dependencies

     
  • Dale Anson
    Dale Anson
    2013-06-12

    Just an update, I have the loading/reloading working well on my local and I believe this is what we are all looking for. As an example, suppose ProjectViewer and Lucene are both loaded when jEdit starts. Lucene has an optional dependency on PV. The user decides to unload PV. In this case, both PV and Lucene are unloaded, then Lucene is reloaded, so Lucene continues to work as expected. Next the user decides to load PV, goes to Plugin Manager, and checks the box for PV. PV is loaded, Plugin Manager checks installed plugins and reloads those with an optional dependency on PV, in this example, Lucene is reloaded. Now both PV and Lucene work as expected.

    What's left to do is to check for dependent plugins and ask if they should also be loaded, so expanding the example, ProjectViewer and SVN are both loaded when jEdit starts. SVN has a hard dependency on PV. The user decides to unload PV, and SVN is also unloaded. Next the user decides to load PV. SVN is still installed, so Plugin Manager will ask if SVN should also be loaded.

     
1 2 > >> (Page 1 of 2)