10/08/16, 08:00 AM | #1 |
Addon dependencies
I have been thinking about how libraries in ESO work and am unsatisfied with the current state.
Ideally each addon would have its own dependencies isolated into a sandbox, but that's not how ESO works so instead all addons have to share the same libraries in the same sandbox. That's why we use LibStub to keep only the newest version in memory and hope nothing breaks. In most cases we also just bundle them into the addon, which pushes a lot of responsibilities onto the author of the addon. I came to the conclusion that they should not be bundled with addons at all. Instead it should be the responsibility of the user to install the necessary dependencies like in any other environment. Having a standalone-only libary also has the benefit that it can use saved variables and xml controls and most importantly, specify dependencies for the library. Right now if a library depends on another library, the library author has to add a check to make sure it is loaded and the addon author who wants to use the library is responsible to load them in the correct order. We already have a dependency system in ESO which could easily handle this for us if we stopped bundling the libraries. Of course we cannot expect the average user to do this manually, so it needs to become a feature of ESOUI and Minion to install the necessary dependencies automatically. For this to work we should be able to somehow specify the addon id or name and minimum required version of a dependency when we upload the addon. Minion then just installs and updates them in addition to the selected addon and ESOUI could for example automatically supply a bundled zip alongside the normal one. This would also make it possible to create collections of addons without having to put all of them into one zip file manually (e.g. PhinixUI) and also allow it to show lists of who uses what on the addon pages. In order to compare version numbers properly we should decide on a common format for libraries and addons. I am currently thinking of using the following number based format: Code:
<major>.<minor>.<buildnr> An example:
For library authors this means, the library should still use LibStub which would get an update to support this version format and maybe also to separate libraries and addons into two lists in the addon manger. For addon authors it means they no longer should bundle libraries and instead make sure that they reference them in the meta file and on ESOUI. For Dolby it means a lot of work to implement the required features. For users not much would change. |
|
ESOUI » Developer Discussions » General Authoring Discussion » Addon dependencies |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|