[bug] moon run --quiet overrides --summary
Describe the bug
(this is somewhere between a bug and a feature request)
If I explicitly provide the --summary flag, the summary should be printed even if I also pass --quiet. The purpose of quiet is to "hide all non-important terminal output", which essentially means the ▪▪▪▪ core:mypy (e48410e3) style progress reports. I would like to remove those and also have a summary.
Expected behavior
If I run moon run --quiet --summary I expect the ▪▪▪▪ lines to be removed, but the summary to be printed.
Additional context
With the last 3 issues that I've submitted I'm working towards creating what I consider the ideal level of verbosity for moon run.
This translates to:
- no progress reports (
--quiet) - summary at the end (
--summary) - no output from cached tasks: https://github.com/moonrepo/moon/issues/1930
And finally, all of this gets tied together with the ability to configure these as the default without needing to provide these three options to moon run each time: https://github.com/moonrepo/moon/issues/1929
One thing to consider is that perhaps what would be best is finer grained control over each type of logged output. As far as I can tell there are 5 categories of output:
| type | control |
|---|---|
| progress reports | suppressed with --quiet |
| task outputs (stdout / stderr) | only configurable at the task level, via options.outputStyle |
| review | enabled with --summary. suppressed with --quiet |
| summary | enabled with --summary. suppressed with --quiet |
| stats | suppressed with --quiet |
As you can see there are many combinations which are simply not configurable by any means with the current controls.
As another example of why output configurability is useful is that I could see that enabling only the review and summary outputs (and disabling all others, including task output) would be an ideal output level for certain contexts, like running pre-commit hooks.
--quiet definitely needs work. It was added to deal with --json and other outputs, but it's not working 100% as intended.
I see two pretty simple options that would get me what I'm looking for here:
- Change the current behavior so that
--quietdoes not override--progress. This would be a change in behavior, but it's hard to imagine that people are relying on the current behavior. The only scenario I can think of would be someone settingMOON_SUMMARY=trueas a global default, then suppressing it using--quietfor specific invocations of moon. The solution for these people (assuming they exist) would be to unsetMOON_SUMMARY. - Add a new
--no-progressflag that silences progress messages but not the summary.
Here's a more complete overview of the current and proposed output behaviors:
| Type | Enabled with | Disabled with | Disabled with (Option1) | Disabled with (Option2) |
|---|---|---|---|---|
| progress reports | on by default | --quiet |
--quiet |
--quiet, --no-progress |
| task outputs (stdout / stderr) | on by default | outputStyle=none |
outputStyle=none |
outputStyle=none |
| review | --summary |
--quiet |
--quiet |
|
| summary | --summary |
--quiet |
--quiet |
|
| stats | --summary |
--quiet |
--quiet |
What do you think?