Add plugin validation before installing/loading a plugin package
mslukebo opened this issue · 0 comments
Plugin packages should be validated by the plugins system before they are installed and/or loaded.
The plugin management system should include its own validation steps that always happen. In addition, a client should be able to supply custom validators to the plugin system.
Ideally, validation should occur whenever
- A plugin is discovered
- A plugin is installed
- An installed plugin is loaded
At the very least, a plugin should check if the version of the SDK it referenced is compatible with the running SDK.
Discovered Plugin Validation
When a plugin is discovered, it should be ran through validation. Invalid plugins should still be returned to the client, but the client should be able to discern the plugin is invalid (and have some way to figure out why). For example, AvailablePlugin
can have new properties bool CanBeInstalled
and string? InvalidReason
Installation Plugin Validation
When installing an available plugin package (from any stream), once the package is created in memory it should be validated. If validation fails, a callback should happen where the client can choose to continue with installation.
Installed Plugin Load Validation
When loading a plugin, the plugin should be validated. If validation fails, a callback should happen where the client can choose to continue with loading.