Skip to main content
Topic: Addons support API-based instead of Elk-version (Read 1369 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Addons support API-based instead of Elk-version

Okay, that's a bit of a long shot, though I think it may be fun.  :P

Right now, addons define their compatibility based on the version of elk.
This is good in most of the cases, but in certain occasions it is limiting, for example when a new version of elkarte is released, you cannot be sure if the addon will work or not until you try.

What I'm proposing here, is to shift the test from the elk version to the API version. I know, at the moment the API is not yet fully developed and mostly experimental, but this is also the reason why it is a good moment to think about it.

In the model I'm thinking, the addons is allowed to declare which version of API for each single API used, in parallel, elk will change the API version only if an incompatible change is introduced.

The compatibility checks are done at addon-install-time and at elk-update time.
In the first case it would work as usual: elk tests all the API required by the addon and confirms that all of them are present and are of the right version.
At upgrade/update time, elk will (before installing the update or during the upgrade process) verify that all the installed addons are compatible with the new version and in case any is not, it will be disabled.

This may work also for cross-addon interaction, for example whe an addon wants to use an interface provided by another one: at install time the addon depending on an API will test for presence and version and fail to install if not matching the requirements, the addon providing the API will test the depending and either install disabling the API version changed, or refuse to install not to break the compatibility.
Last Edit: March 03, 2018, 11:10:29 am by emanuele
Bugs creator.
Features destroyer.
Template killer.