-
Notifications
You must be signed in to change notification settings - Fork 17
Description
#160 introduced a quick install feature for packages. I noticed during development of the FEntwumS Netlist Viewer that I was able to install a package (the GHDL extension) that was incompatible with the version of OneWare Studio I was using. The plugin of course is not loaded, as expected:
[14:46:43 ERR] Plugin C:\Users\Florian\OneWareStudio\Packages\Plugins\OneWare.GhdlExtension failed loading:
Dependency OneWare.Essentials requires 0.11.11.0, but provided is 0.99.4.0
Dependency OneWare.UniversalFpgaProjectSystem requires 0.41.11.0, but provided is 0.99.4.0
This issue is not constrained to development builds of OneWare Studio using newer versions of OneWare.Essentials than available in the latest release of OneWare Studio. Since the PackageQuickInstallViewModel uses IPackageService.InstallAsync to start the download, the latest available version of the package is installed, no matter if it is actually compatible. 1 2 This can be a problem for users on older versions of OneWare Studio, since they could get packages that require a newer version of OneWare.Essentials than is available in the version of OneWare Studio they have installed.
A compatibility check is therefore necessary, with either the newest, compatible version of the requested package being offered for installation or the ViewModel directly closing when no compatible versions are found. To enable extension authors to reason about why a plugin installation request failed, a failure reason should be returned to the caller. Right now, just a bool is returned 3