-
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
Log details of failure if no errors were seen #14453
Conversation
.map_err(|e| { | ||
if output_options.errors_seen == 0 { | ||
// If we didn't expect an error, do not require --verbose to fail. | ||
// This is intended to debug |
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.
verbose_if_simple_exit_code
doesn't do anything with --verbose
so I am confused by the comment.
(I am also confused by verbose_if_simple_exit_code
... the comment says that on signals and "abnormal termination", "don't hide the error details" -- but the code and function name seem to make it more verbose when it is a "simple" error, i.e. not a signal / abnormal termination.
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.
Oh, I see... VerboseError
is an error that is less verbose, except if --verbose
is passed then it is always verbose. That's quite confusing.
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.
Agree. Should have to rename it to something. Do you have any suggestion?
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.
Maybe something like SilenceErrorUnlessVerbose
?
.map_err(|e| { | ||
if output_options.errors_seen == 0 { | ||
// If we didn't expect an error, do not require --verbose to fail. | ||
// This is intended to debug |
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.
Agree. Should have to rename it to something. Do you have any suggestion?
@bors r+ |
☀️ Test successful - checks-actions |
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
What does this PR try to resolve?
Crater has started (some time ago, though exact point is not known) to see failures in crates without logging an error. We're suspecting that there's something wrong in Cargo or rustc, but it's also possible that Crater itself is at fault. In any case, this should provide more details.
cc rust-lang/crater#733
How should we test and review this PR?
My hope is that this is reasonable to land without additional tests -- as-is, we expect it to never happen (there's even a debug assert later in the same code path) but it seems it is happening sometimes in the wild.