pluginLoaded
Hi ,
This issue is about loading plugins and checking with the pluginLoaded function.
All this is relevant for a raspi (and maybe *nix in common)
1.:itoms pluginloader does not differentiate between debug/release builds
using a debug build you can also load old and lying around release-build plugins, since their names are not the same (-d for debug) and vice versa
2.:they nameing conventions are not consistent across systems.
a pluginLoaded(“somePlotLibName”) returns true for debug builds and release builds on windows, but not on *nix, since their names are more like “libsomePlotLibName” and the trailing d is relevant also.
Would it be okay for you to have this unified, so the pluginLoaded checks only if one most-likely-the-right-one is loaded?
by that i mean it will return true if a debug or non-debug library is loaded and
if a lib is prepended or not?
And would you rather change this on the python interface or in the addinManager?
Example:
Expected:
pluginLoaded(“DummyMotor”)->True
pluginLoaded(“DummyMotord”)->True
pluginLoaded(“libDummyMotor”)->True
pluginLoaded(“libDummyMotord”)->True
Reality:
pluginLoaded(“DummyMotor”)->False
pluginLoaded(“DummyMotord”)->False
pluginLoaded(“libDummyMotor”)->False
pluginLoaded(“libDummyMotord”)->True
Comments (3)
-
-
This issue can be closed, since the pull request https://bitbucket.org/itom/itom/pull-requests/39 provides a solution for this. In the future, pluginLoaded only checks for a plugin name and not for a filename, since this is not robust for different operating systems / debug+release conditions and all in all unnecessary.
-
- changed status to resolved
- Log in to comment
The current behaviour of itom.pluginLoaded is as follows:
Questions:
for check 1: is it ok to stay with the case-insensitive check? I would say yes, since we do not allow the same plugin name, that is only different in case of case-sensitivity.
for check 2: to be honest, I would skip this check because I don’t think that it is useful. Isn’t it totally sufficient to check for the plugin name, how it can be used in itom. The filename is not relevant at all.
Nevertheless, under Linux pluginLoaded(“DummyMotor”) should return True if the DummyMotor plugin is available. This has to be checked.
@Oliver Schwanke : It would be great if you could shortly give your opinion to my questions. Then I would implement it. In the meantime I try to reproduce it under Debian.