foundry-rs / foundry-rs/foundry
meta(output): tracking issue for issues related to output modes (`--json`, `stdout`, `stderr`)
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
Issues
## Shell
- [ ] Re-add additional macros like `note` and `status` and implement
- [ ] Enable Clippy lint, global search and replace.
- [x] https://github.com/foundry-rs/foundry/issues/8408
- [ ] https://github.com/foundry-rs/foundry/issues/3704
- [ ] https://github.com/foundry-rs/foundry/issues/8339
## Flags
- [ ] Many flags are incompatible with each other but not marked as such resulting in a hard crash or unexpected output
### `-vvv`
- [ ] Verbosity scale is now not uniformly applied, investigate how to apply , e.g. `forge test -vvv` should not trigger `forge build -v`, related https://github.com/foundry-rs/foundry/issues/9340
### `--json`
- [x] https://github.com/foundry-rs/foundry/issues/8789
- [ ] https://github.com/foundry-rs/foundry/issues/8735
- [x] https://github.com/foundry-rs/foundry/issues/6922
- [x] https://github.com/foundry-rs/foundry/issues/2210
- [x] https://github.com/foundry-rs/foundry/issues/6600
- [x] https://github.com/foundry-rs/foundry/issues/6511
- [x] https://github.com/foundry-rs/foundry/issues/8926
- [x] https://github.com/foundry-rs/foundry/issues/4071
- [x] https://github.com/foundry-rs/foundry/issues/9138
- [x] https://github.com/foundry-rs/foundry/issues/1976.
- [x] https://github.com/foundry-rs/foundry/issues/10019
- [x] https://github.com/foundry-rs/foundry/issues/10050
- [x] `forge build --sizes` is not compatible
- [x] `forge build --names` is not compatible
- [x] `forge build --format-json` always prints (even if empty) when combined with other flags
- [x] `forge script --json` is not clean
- [x] `forge script --quiet` is not quiet (#3981)
- [x] `forge test --summary --detailed --json` does not print summary
- [x] Introduce a global `--json` flag, similar to the global `--quiet` flag: https://github.com/foundry-rs/foundry/pull/9244
- [ ] With `shell::Format::Json` enabled set the verbosity to `quiet`, disabling all output except for errors.
- [ ] Introduce a `sh_json!` macro that renders JSON to the console if `shell::Format::Json` is active, either pretty or not. This could be automatically a no-op in anything except when the `--json` flag is passed.
- [ ] Make sure all commands and modes are `--json` compatible, related: https://github.com/foundry-rs/foundry/issues/8794. With the current proposed change Anvil for example now has a `--json` flag but is not yet compatible. What `--json` means in context dependent to the command / tool. Goal is that it becomes much easier to chain Foundry into other tools.
### `stdout`, `stderr`
- [x] https://github.com/foundry-rs/foundry/issues/8568
- [x] https://github.com/foundry-rs/foundry/issues/7055
- [x] https://github.com/foundry-rs/foundry/issues/1976
- [x] https://github.com/foundry-rs/foundry/issues/3981
- [x] https://github.com/foundry-rs/foundry/pull/6569 (resolves above)
- [ ] https://github.com/foundry-rs/foundry/issues/5069
To check / fix post https://github.com/foundry-rs/foundry/pull/9109:
- [x] Evaluate https://github.com/foundry-rs/foundry/issues/2433.
- [x] Evaluate https://github.com/foundry-rs/foundry/issues/7055.
- [x] Evaluate https://github.com/foundry-rs/foundry/issues/8568
Contributor guide
Assessment
This issue has not been assessed yet.