esra: the module installer I am working on is in fact a module itself. And I think that if a modules only dependency is, say, a single library, then I believe it should be included within the module itself, however I am giving developers the opportunity to give their modules other module dependencies.
I think module dependancy should be resolved differently:
Let say i build a webservice and have a webservice libray.
Lets assume there’s “module1” and “module2” which both need the webservice lib “wslib”.
Why duplicate?
I see these options:
- wslib is installed as a core lib to ci
- wslib is provided by a module (that just includes only that lib)
- wslib is part of an entire module like module1.
In these cases module2 can:
- use wslib if installed to CI core directory.
- use wslib if it can use libs of another module. (which would create a dependancy to that module like mod_wslib
- use wslib if it can use libs of another module like module1(in fact similar to the above)
So to consolidate this there are infact just two options:
- wslib is installed as a core lib to ci
- wslib is provided by a module
In any way, there might be also a version check required. I would suggest something like the major / minor version scheme:
Increase in Majorversion: Module is still compatible to prev. minor version
Increase in Minorversion: Module is no longer comaptible to prev. major version.
This way, module2 can ensure module1/mod_wslib exists in an compatible version.
Now this means: The modules need to have an API to talk to the module manager (wether build as a module or not does not matter). But a sort of API will be necessary anyway to get the modules managed via the manager.
Regards
Wolfgang