Where to add module dependencies?
I just added a Rules dependency to the Commerce Commons module that all the other Commons modules depend on. However, talking with fago, the question was raised that it might be better to keep the dependencies with the individual modules so you could use the Product module without having to enable the Commons module. I don't know what all will go into the Commons module at the moment, so I can't really say how disruptive it would be for someone to have to install the module if they just wanted the Product module. I wouldn't consider it a bad thing to list the Rules dependency with each of the component modules, but I don't know at this point if it will be possible for someone to use a component module without installing the Commons module.
Does anyone have any thoughts besides just sitting on this till we see how that actually develops?
Also, fwiw, if any of the component UI modules are enabled, they'll need the "Store" menu item to have proper menu item placement.



Comments
Ryan, > Where to add module
Ryan,
> Where to add module dependencies?
Into different features maybe? So that the "Commerce Commons" module would be a "Basic Cart Feature"?
Tormi
Close to the module
I would recommend putting the dependencies as close as the calling code as possible. If the product module calls Rules (emphasis on the "calls"), it should depend on the Rules module. If a module merely implements hooks from other modules, it doesn't need to depend on that other module.
The dependencies of the common module should be reduced as much as possible. We will stuff in there all the "enablers": definition of currencies, helper functions, etc. The idea is that this module could be enabled safely, as it cannot possibly disrupt your site.