Right now in Provision, we have experimental modules we do not want the backend to load. For example, DNS and ITK provisionning are experimental if not completely broken. So we don't want those to load, by default. If the frontend (hosting module) decides it should try to enable that feature, then it's going to add a --load-itk or --load-dns argument to the drush call.
Before provision was a module, and it was just matter of disabling it in the Drupal web interface. Now that it's a drush extension, we need to be able to tell drush to enable/disable it.
Our thoughts are that things should be disabled by default and loaded only if asked for. Or maybe the drush modules could declare that status themselves (loaded by default or not).
At any rate, this is required to complete the #349923: drush_invoke : a flexible API for hooking into any and all drush calls. move.
Comments
Comment #1
anarcat commentedTagging for 2.0.
Comment #2
moshe weitzman commentedstill needed?
Comment #3
moshe weitzman commentedComment #4
anarcat commentedYes, this is still necessary. I'm not sure whether the current code has hooks to do that, but we will need something like this because there are features that should be active (or not) on the backend depending on the admin's selections on the frontend. DNS and inter-site security (ITK) are the obvious candidates, but those will expand as needed.
It feels like reinventing the wheel, but it can be pretty simple too. At some point in provision, there was a --load-something command (i don't remember the syntax) that would load the proper modules in the backend...
Comment #5
moshe weitzman commentedIf anyone wants this in 2.0, better submit a patch soon.
Comment #6
reikiman commentedFWIW this seems related to #468650: Drush attempts to call hooks for disabled modules where I argue it's strange for drush to be making available commands from disabled modules.
Comment #7
adrian commentedReikman: you're correct.
We've decided to tackle this in the next release of Drush tho, as we've just removed the optional modules from our tarball.
Comment #8
moshe weitzman commentedIMO this was fixed recently.
Comment #9
greg.1.anderson commentedNot fixed, but now a duplicate of #691174: Allow drush command files to define functions that control whether or not they will be loaded?
Comment #10
anarcat commentedI do think that the "named context" stuff could answer the requirement here. The basic idea here is that we need a way to have some hooks *not* enabled by default and enable them through some options.