OpenCDSS / cdss-app-tstool-main

Colorado's Decision Support Systems (CDSS) TSTool application main program
GNU General Public License v3.0
1 stars 1 forks source link

Plugins - handle plugin versions for TSTool versions #238

Open smalers opened 1 year ago

smalers commented 1 year ago

Subject of the issue

Need to warn when multiple versions of the same plugin are loaded. This can happen because the user forgets to remove the old plugin version jar file. The Commands(Plugin) menu will generally list the same menu twice, which is a clue and might be the easiest way to check for duplicates.

Environment

smalers commented 1 year ago

Actually, with some recent changes, there needs to be more granularity to handle plugin versions for different TSTool versions. Technical considerations include:

  1. Need a way to indicate in plugin metadata (META-INF or other) which version of TSTool is required for plugin compatibility. Then only compatible plugins will be loaded.
  2. Currently the plugins folder is globally searched regardless of which TSTool version is run and the plugin folder tends to have a generic name such as owf-tstool-aws-plugin, under which resides the plugin jar file and its dependencies. If the TSTool plugin loader is smart enough to know which plugins are compatible with the current version, then multiple versions of a plugin can exist, such as owf-tstool-aws-plugin-1.2.3. Then there would be no need to remove or move old plugins, other than normal housekeeping to save disk space. This would allow old versions of TSTool to work with old versions of plugins.
  3. The above would also remove the need for a plugins-old/ folder and related documentation.
  4. A plugin manager could handle all of the details.
  5. Old versions of TSTool would have an issue because the code would not understand new conventions. However, most people that are using plugins tend to update the software regularly.

Until something is implemented, there is risk that incompatible plugins will generate errors or simply not run.