-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(common::shell
): add global verbosity level (-vvv
) flag replacing --verbose
#9273
feat(common::shell
): add global verbosity level (-vvv
) flag replacing --verbose
#9273
Conversation
common::shell
): add global verbosity level to common::shell
(-vvv
)common::shell
): add global verbosity level (-vvv
) flag
…ten ShellOpts in args
common::shell
): add global verbosity level (-vvv
) flagcommon::shell
): add global verbosity level (-vvv
) flag replacing --verbose
#[clap(flatten)] | ||
pub shell: ShellOpts, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming ShellOpts
to GlobalOpts
+ consistent enforcement will be handled in #8408
It will be possible to access the global shell options either directly by e.g. shell::is_quiet
, etc.. as well as by args.global.shell().is_quiet()
#[arg(long, short)] | ||
#[arg(long)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: breaking change
#[arg(long, short)] | ||
#[arg(long)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: breaking change
/// Prints the full address of the contract. | ||
#[arg(long, short)] | ||
verbose: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: breaking change, equivalent
/// Verbose mode, print the address and private key. | ||
#[arg(short = 'v', long)] | ||
verbose: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: breaking change, equivalent
/// Verbosity of the EVM. | ||
/// | ||
/// Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv). | ||
/// | ||
/// Verbosity levels: | ||
/// - 2: Print logs for all tests | ||
/// - 3: Print execution traces for failing tests | ||
/// - 4: Print execution traces for all tests, and setup traces for failing tests | ||
/// - 5: Print execution and setup traces for all tests | ||
#[arg(long, short, verbatim_doc_comment, action = ArgAction::Count)] | ||
#[serde(skip)] | ||
pub verbosity: u8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: global verbosity
setting is exact equivalent except the description, not sure what a practical way is to modify the verbosity flag description to be more context dependent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…cing `--verbose` (foundry-rs#9273) * remove --verbose, prefer output mode, introduce verbosity level (-vvv) * remove leftover * fix arg * add ability to set verbosity level * fix tests * remove evm args specific verbosity arg in favor of global arg due to Clap limitation * revert test modifications from foundry-rs#9244 for TestArgs, simply pass + flatten ShellOpts in args * in lieu of a context specific help document the verbosity levels of the EVM as an example * format comment, update tests * fix clippy
Motivation
In line with the familiar (
-v
,-vv
,-vvv
, etc..) I think it makes sense replace the current global--verbose
option in favor of one specified by a verbosity level.Related: #8794
Related: #3704
Solution
verbose
modeOutputMode
w/Normal
andQuiet
, same behavior--json
field-v
already being in use in favor of the global flag: this is a breaking changeOutput: