GateNLP / gate-core

The GATE Embedded core API and GATE Developer application
GNU Lesser General Public License v3.0
75 stars 29 forks source link

What version of a plugin is recommended #69

Closed greenwoodma closed 5 years ago

greenwoodma commented 5 years ago

We have a default list of plugins for each version of gate-core but no easy way via the API (other than manually iterating over all known plugins) to find which version of a plugin is being recommended.

I can see two possible ways of doing this:

  1. add a method to the CreoleRegister where you can ask for the default version. This would allow us to handle all plugin types but would be a bit messy as you'd need to provide a Plugin instance, and you would in turn have to specify a version.
  2. add a static method on Plugin.Maven that given the group and artifact would return the recommended version if the plugin was known
greenwoodma commented 5 years ago

After more thought and discussion we've decided not to offer this as part of the API as under normal API conditions it wouldn't work anyway.

The default list of plugins is only downloaded by the GUI so the API on it's own won't know what the answer is. To get it to work it would have to download the list, and if it couldn't then if you were relying on the answer you would have to terminate. This would essentially mean, for example, you couldn't run GCP offline and have it check for a plugin version.

Also it would be a terrible idea from the point of reproducability to allow API code to silently switch plugin versions. In fact it completely negates the point of introducing versioning altogether.