Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2013 at 20:33 UTC
Updated:
24 Oct 2013 at 13:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
anarcat commentedI think this is mostly a documentation task for core - unless I am missing something, most existing modules in core use some kind of toggle from the frontend already and don't enable themselves by mistake.
So yes, community site and api.php.
Comment #2
ergonlogicFor 7.x-3.x, we should probably evaluate the existing toggles used in core, and consider switching to the hook_drush_load() method where appropriate. Since it'll mean fewer files loaded and hooks fired on each and every invocation of Drush, it should result in a smaller memory footprint and better performance.
Comment #3
anarcat commentedagreed.
Comment #4
ergonlogicIt looks like hooks in *.provision.inc files still get fired regardless of hook_drush_load(). After a quick grep through provision, I couldn't see where these are being auto-included. Is Drush just including *.inc in the root of Drush commands?
Moving these files into an includes/ directory and then explicitly including them into the main commandfile makes them respect the results of hook_drush_load().
Comment #5
anarcat commentedthis is based on the engine system.
example, for install:
I am not sure how migrate is fired, but I assume there is something similar.
Comment #6
helmo commentedHere's a suggestion for provision.api.php.
And I've added http://community.aegirproject.org/dev-cheat-sheet#Enablingdisabling_drus...
Comment #7
helmo commentedAnd a follow up for provision_tasks_extra in: #2106435: Check hosting_features in _drush_load hook
Comment #8
anarcat commentedthat seems like a good idea.
Comment #9
ergonlogicSince we need to #2102341: Differentiate between a feature being disabled vs absent, this'll end up having to look more like:
Comment #10
helmo commented@ergonlogic: I had missed that issue.
To improve the DX we could replace 'hook' with a variable.. now that we use it twice. e.g. $hosting_feature_name
Comment #11
helmo commentedpushed slightly updated as bbf9d23b0553c6847da475833ed75951b1bfdd91
Fixed? Or are there more places where we need this?