This bugfix addresses issue #333.
It introduces some behavior changes: (!)
If the user adds duplicate JFactories to the same factory set, JANA will throw an exception rather than silently destroying the second copy. This is necessary because otherwise JANA can't enforce the integrity of JMultifactories.
If the user includes the same plugin twice in the plugins parameter, it only gets loaded once.
The user-provided plugins parameter no longer clobbers the projects' default plugins specified via JApplication::AddPlugin. Rather, the project's default plugins are loaded first, and any additional user plugins specified by the plugins parameter are loaded afterwards.
JPluginLoader now throws an exception if the user provides a plugin name that is really a path. This is because the logic for ensuring that plugins get loaded exactly once becomes extremely hairy when we account for plugin name conflicts that are off the search path. Consider the example jana -Pplugins=MyPlugin,other/plugin/dir/MyPlugin.so -Pjana:plugin_path=normal/plugin/dir where MyPlugin.so can be found in both places. We aren't doing the users any favors by letting them get into this mess, and we are better off with a plugin loader that is easier to reason about.
This bugfix addresses issue #333. It introduces some behavior changes: (!)
plugins
parameter, it only gets loaded once.plugins
parameter no longer clobbers the projects' default plugins specified viaJApplication::AddPlugin
. Rather, the project's default plugins are loaded first, and any additional user plugins specified by theplugins
parameter are loaded afterwards.jana -Pplugins=MyPlugin,other/plugin/dir/MyPlugin.so -Pjana:plugin_path=normal/plugin/dir
whereMyPlugin.so
can be found in both places. We aren't doing the users any favors by letting them get into this mess, and we are better off with a plugin loader that is easier to reason about.