-
Notifications
You must be signed in to change notification settings - Fork 824
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
Re-work logging and command-line argument parsing #3980
Conversation
$RUST_LOG
variable is set7fe964d
to
4f0438c
Compare
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.
Nice.
Love getting rid of the command hacks!
ded7c54
to
c923745
Compare
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.
Looks good, but can we have a test testing that wasmer awasifile.wasm
still works before merging? Thanks!
@syrusakbary most of the For example, wasmer/tests/integration/cli/tests/run.rs Lines 339 to 354 in 2b867fa
|
c923745
to
4a0b438
Compare
4b7c86d
to
e3abe19
Compare
e3abe19
to
e620278
Compare
When discussing #3948, we decided that the
wasmer
command shouldn't show any log messages unless the user explicitly sets the$RUST_LOG
environment variable. That way there's no chance that logging will mess up the output you might get from a program.I've also re-worked the CLI parsing code to be vanilla clap rather than having a mix of manual argument parsing and two different clap parsers. This means we no longer need to update that big
match
statement every time a new command or alias is added, plus it makes the code a lot more readable.Fixes #3948.