The 'verbose' config file option should be supported uniformly by all commands
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Right now, setting `verbosity` to `2` or `3` in the config file raises the verbosity level for some commands (e.g. `install` and `configure`), but not others (e.g. `build`). This is due to the way the command flags are serialised - `installAction` and `configureAction` read in `InstallFlags` and `ConfigureFlags` from the config file, but `buildAction` only parses the command-line arguments (since `BuildFlags` are not stored in the config file).
The way we handle the `--verbosity` option seems non-optimal - each `*Flags` record contains a duplicated `*Verbosity` field. It looks like it'd be more appropriate to have a single `globalVerbosity` field in `GlobalFlags` instead. Then `verbosity` could be always initialised from `savedGlobalFlags`.
Contributor guide
Research direction
Start by tracing how installAction, configureAction, and buildAction serialize and parse their InstallFlags, ConfigureFlags, and BuildFlags, paying particular attention to savedGlobalFlags and the duplicated verbosity fields. Verify the behavior of the verbosity config option across all commands, including install, configure, and build, and confirm that the resulting design applies the configured level consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100