@hsitter
Copy link
Contributor

hsitter commented Dec 22, 2017

Addons extend other components. When the addon is an extension of a generic addon framework, this doesn't scale though.

Case in point the documentation currently suggest the following example for the extends tag

For example, if there is a plugin "kipi" which extens the application "Gwenview", [...]

which highlights the very problem with scaling.
kipi plugins are in fact addons for libkipi which is a generic plugin framework for picture manipulation used by any number of applications. Having the addons reverse-define the applications they add into does not scale for these generic frameworks. You'd have to list all possible applications for each plugin built on the framework. And on top of that the applications themselves may build without libkipi support so distro A may have kipi support in Gwenview while distro B does not, the plugin does not know that.

To deal with this properly I think a bunch of additions need to be made to link a generic plugin and an application without the two knowing about each other:

  • There needs to be a library component type
  • org.kde.libkipi defines itself through as a library component
  • com.github.apachelogger.libkipi.blur is an addon tha then extends org.kde.libkipi
  • org.kde.gwenview declares <uses>org.kde.libkipi</uses>

With this data we'd then be able to build a graph linking org.kde.gwenview to com.github.apachelogger.libkipi.blur without having the two know about each other.