computerminds / cm_config_tools

DEPRECATED: Mirror of http://cgit.drupalcode.org/cm_config_tools
1 stars 0 forks source link

Handle dependencies #1

Closed anotherjames closed 8 years ago

anotherjames commented 8 years ago

Magic!

anotherjames commented 8 years ago

Unrelated thought btw ... Unless it's not too difficult to implement/maintain, I wonder if we should just drop support for config across multiple modules/buckets?

If it can be done, it would be nice, but I can see it getting tricky when it comes to exporting dependencies, as if module A and module B both have a particular dependency, how do we handle that? Does the config get exported to both, do we arbitrarily pick one? (And the same probably applies to dependants too.)

A 'solution' could be to only support exporting dependencies/dependants when working with just the one module. But that is more or less what we've already got - so I wonder if we should just consider all the work in this PR as a cm_config_tools 'version 2.0' (i.e. 8.x-2.x). That would allow any projects that need that possibility could remain on 1.0, without nice dependency management. And then in future, if we can think of a better solution, that can be added on top of either 'version', or as a 3.0 if it can't really be backwards-compatible.

@stevetweeddale and @darthsteven what do you think of that as a plan? I'm not raising this to unquestionably encourage us to support splitting config across modules, but it would still be 'nice' to be able to if solutions can be found, even just in future. Or at least just to try & avoid making decisions that break that use case until necessary. Otherwise we may end up pushing in one direction before we're actually 100% sure about it (as we won't have used any of this in practise for a while).

stevetweeddale commented 8 years ago

@anotherjames presumably as it stands, because we don't have any kind of features-like 'conflict' management, if you try to export the same thing to 2 different modules which ever module comes last will 'win' on import?

Auto-added dependencies aside, Is there anything to stop me manually adding the same thing to 2 modules with the current version?

anotherjames commented 8 years ago

Time to merge :-) Nothing is broken AFAIK, so next steps can just happen in normal dev branch.