You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 problems in plugin compatibility detection:
information compared between plugin and zenohd (in get_vtable function) at this moment is not enough. It's not easy to implement full solution, but at least it makes sense to compare zenoh release version
list of features for compare listed in FEATURES global variable may not fully cover all features existing. There was a test to check this, but it seems to be removed. Need to recover the test or find other way to check validity of this list
More details about plugin compatibility detection:
Method DynamicPluginStarter::get_vtable compares structures Compatibility from plugin and from zenohd itself and refuses to load plugin dynamic library in case of incompatibility.
It compares
rust compiler version
versions of structures PluginVTable,type parameterStartArgs, and type parameter Instance where in zenohd case these type parameters are StartArgs=Runtime and Instance=RuntimePlugin:
/// The zenoh plugins manager. It handles the full lifetime of plugins, from loading to destruction.pubtypePluginsManager = zenoh_plugin_trait::PluginsManager<Runtime,RunningPlugin>;
The version of structure is provided by trait StructVersion. Example:
The idea behind this test was that in case of breaking change the struct_version() should be bumped.
Unfortunately this doesn't always work: it's impossible to manually track all changes which may affect internals of the structure and make decision when to bump this version.
The proposed change is to make the struct_version return value string and by default return the zenoh release version in it. This will guarantee that plugins built with different release of zenoh will be rejected.
When API of Compatibility structure is changed, it's important to not forget to bump
There are 2 problems in plugin compatibility detection:
get_vtable
function) at this moment is not enough. It's not easy to implement full solution, but at least it makes sense to compare zenoh release versionFEATURES
global variable may not fully cover all features existing. There was a test to check this, but it seems to be removed. Need to recover the test or find other way to check validity of this listThe problems were found when fixing plugin crash in ts : eclipse-zenoh/zenoh-ts#109
More details about plugin compatibility detection:
Method
DynamicPluginStarter::get_vtable
compares structuresCompatibility
from plugin and from zenohd itself and refuses to load plugin dynamic library in case of incompatibility.It compares
PluginVTable
,type parameterStartArgs
, and type parameterInstance
where in zenohd case these type parameters are StartArgs=Runtime
and Instance=RuntimePlugin
:StructVersion
. Example:The idea behind this test was that in case of breaking change the
struct_version()
should be bumped.Unfortunately this doesn't always work: it's impossible to manually track all changes which may affect internals of the structure and make decision when to bump this version.
The proposed change is to make the
struct_version
return value string and by default return the zenoh release version in it. This will guarantee that plugins built with different release of zenoh will be rejected.When API of
Compatibility
structure is changed, it's important to not forget to bumpThe text was updated successfully, but these errors were encountered: