foundry-rs / foundry-rs/foundry
meta(config): tracking issue for CLI and configuration improvements
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 16h 38m
- Merged PRs (30d)
- 511
Description
### Component
Impacting: [foundry-cli](https://github.com/foundry-rs/foundry/tree/master/crates/cli), [foundry-config](https://github.com/foundry-rs/foundry/tree/master/crates/config), in turn used by all binaries.
[Work document](https://hackmd.io/@lh3O1vy7ShCaBrR3sqseAw/rkjg1tnT6) to figure out overlap in `foundry.toml`, `.env` and CLI args - specifically to find where overlap is missing or naming is incorrect / confusing.
### Describe the feature you would like
Tracking / spec / placeholder issue, I will turn this into an actionable ticket to work on.
Related issues intended to address:
- CLI > ENV > TOML as a principle for exposing ALL Configs over 3 priorities (related: https://github.com/foundry-rs/foundry/tree/master/crates/config#default-profile). Meaning CLI overrides ENV overrides TOML, in that order.
- Unify approach to parsing CLI and ENVs, we currently manually declare both
- There is currently no way of disabling boolean config flags from CLI, so if `optimizer=true` in config, there is no `--optimize=false`
- Raise a descriptive warning on any unknown keys being passed in the CLI / TOML. Currently unknown sections in `foundry.toml` are raised but indirectly through Figment without a good description.
- Unify CLI approach of Anvil with the rest of the binaries.
Related bugs:
- https://github.com/foundry-rs/foundry/issues/9747
- https://github.com/foundry-rs/foundry/issues/6731 (closes in #6735)
- https://github.com/foundry-rs/foundry/issues/7466
- ~~https://github.com/foundry-rs/foundry/issues/7220 (closed in #7344)~~
- ~~https://github.com/foundry-rs/foundry/issues/4476 (in progress)~~
Related feature requests:
- https://github.com/foundry-rs/foundry/issues/2401
- https://github.com/foundry-rs/foundry/issues/5479
- https://github.com/foundry-rs/foundry/discussions/7367
- https://github.com/foundry-rs/foundry/issues/7488
- https://github.com/foundry-rs/foundry/issues/8521
Nice to have:
- Surface and prioritise a selection of flags by default (`build`, `test`, etc..), show all when `--list` is passed like Cargo does. This helps declutter the list of commands a user is presented with.
- Add terminal color support
Contributor guide
Assessment
This issue has not been assessed yet.