Closed ghost closed 6 years ago
We switched to something similar, modules are now loaded based on the presence of the MARA_XXX
keys for blueprints, click commands and so on, like this.
This is currently done by introspection over the loaded modules, we plan to move to an even more explicit declaration like the one you described.
I think with the MARA_XXX
module variables we have now something that is halfway between registering everything that was imported and register_package
.
Currently the creation of the apps and it's blueprints is intransparent: Ifa blueprint was importat in any way, it is added to the app. That leads to funny code which basically imports a lot of stuff but never uses it.
This has some problems:
I would therefore like to make the app creation explicit by reworking the individual
MaraApp
auto-register functions to take an explicit argument. To make it possible for other packages to change their stuff, these packages should expose aMARA_XXX = [<xx object>]
list. The app creation process is then:This still keeps mara-app and mara-page completely independent