-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
More clear message on "no space left on device" error #4128
Comments
The part responsible for this: https://github.com/rust-lang/cargo/blob/master/src/cargo/lib.rs#L185-L200: let hide = unknown && shell.get_verbose() != Verbose;
if let Some(error) = error {
let _ignored_result = if hide {
shell.error("An unknown error occurred")
} else if fatal {
shell.error(&error)
} else {
shell.say(&error, BLACK)
};
if !handle_cause(error, shell) || hide {
let _ = shell.err().say("\nTo learn more, run the command again \
with --verbose.".to_string(), BLACK);
}
} Ways to improve the error reporting:
|
Ah so to be clear here there's a few bugs.
|
I want to clarify some things.
If that's true, I think |
That's sorta the way it is, Cargo basically only has two kinds of errors though ("internal" is the same as "show if verbose" above). When printing an error Cargo will walk the stack of errors and print everything so long as it's not tagged internal. Then once it hits an internal error it either prints out "pass --verbose for more info" if the flag isn't passed or otherwise keeps going and prints everything out if --verbose was passed in. And yeah I'd be fine changing the struct layout of errors! |
|
Currently,
cargo build
outputs:and
cargo build --verbose
:Seems like the
(os error 28)
message could've been printed in non-verbose mode too.The text was updated successfully, but these errors were encountered: