Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: Indicate dependencies that are automatically enabled/disabled #164

Open
klonos opened this issue Oct 29, 2021 · 1 comment
Open

UX: Indicate dependencies that are automatically enabled/disabled #164

klonos opened this issue Oct 29, 2021 · 1 comment

Comments

@klonos
Copy link
Member

klonos commented Oct 29, 2021

When running bee en devel_generate, devel is also enabled because it is specified as a dependency for devel_generate 👍🏼 ...that's not being communicated to the user though:

bee en devel_generate

 [✔] The 'Devel Generate' module was enabled. 

I'd like this to be like so instead:

bee en devel_generate

 [i] The 'Devel' module will also be enabled, as it is required by the 'Devel Generate' module.
 [✔] The 'Devel' module was enabled.
 [✔] The 'Devel Generate' module was enabled.

...or:

bee en devel_generate

 [i] The 'Devel' module will also be enabled, as it is required by the 'Devel Generate' module.
 [i] The 'Devel' module is already enabled.
 [✔] The 'Devel Generate' module was enabled.

Similarly when disabling modules that are dependencies for other modules:

Current behaviour:

bee dis devel

 [✔] The 'Devel' module was disabled.

What I would like to see instead is something like this instead:

bee dis devel

 [i] The 'Devel Generate' module will also be disabled, as it depends on the 'Devel' module.
 [✔] The 'Devel Generate' module was disabled.
 [✔] The 'Devel' module was disabled.

In fact, "silently" enabling/disabling module dependencies may be seen as a bug. Drush prompts for this:

drush dis devel
The following projects will be disabled: devel_generate,devel.
    Do you want to disable the projects? (y/n): y

	Success: devel_generate,devel are disabled.
drush en devel_generate
The following projects will be enabled: devel, devel_generate.
    Do you want to enable the projects? (y/n): y

	Success: module devel enabled.


	Success: module devel_generate enabled.
@klonos klonos changed the title Indicate dependencies that are automatically enabled/disabled UX: Indicate dependencies that are automatically enabled/disabled Oct 29, 2021
@yorkshire-pudding
Copy link
Collaborator

@klonos - I'm not sure how we would do this given that all the dependency processing happens within core functions module_enable() and module_disable() which have no options to report on additional modules enabled or disabled.

For disabling, we'd somehow have to check whether a module was still required by another module or not before saying it was going to be disabled.

Do you have any ideas on how to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants