-
Notifications
You must be signed in to change notification settings - Fork 398
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
Output diagnostics in cargo-style #797
Comments
When doing this, we could also insert a |
This should also have the verbosity settings: we should also parse |
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
859: Add cargo-style output diagnostics. r=Emilgardis a=Alexhuszagh Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. A few of these settings aren't currently used (such as `info` and `status`, but they're a very common pattern), so we can ensure we have the necessary utilities to ensure we can properly format messages in the future. A few like `shell::print` are practically identical to `println!`, but this allows us to customize it if need be in the future. Solves parts of #797. Co-authored-by: Alex Huszagh <[email protected]>
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
859: Add cargo-style output diagnostics. r=Emilgardis a=Alexhuszagh Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. A few of these settings aren't currently used (such as `info` and `status`, but they're a very common pattern), so we can ensure we have the necessary utilities to ensure we can properly format messages in the future. A few like `shell::print` are practically identical to `println!`, but this allows us to customize it if need be in the future. Solves parts of #797. Co-authored-by: Alex Huszagh <[email protected]>
reopening as there still some action left, i.e info/note messages |
Is this closes now that we can erase lines via #911? We should have essentially full support of the functionality of cargo's diagnostics itself. |
No, I'm thinking something like
|
Basically, instead of some wait time when there's some setup needed for cross, display some nice data so that one doesn't think it's stuck |
Checklist
Describe your request
cross should output it's warnings, notes and errors in the same way cargo does it
e.g something like this https://github.com/rust-lang/cargo/blob/ca4edabb28fc96fdf2a1d56fe3851831ac166f8a/src/cargo/core/shell.rs#L251-L257
Describe why this would be a good inclusion for
cross
This will make integration with cargo look better
The text was updated successfully, but these errors were encountered: