Skip to content
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

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

Mark-Simulacrum
Copy link
Member

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.

@rustbot
Copy link
Collaborator

rustbot commented Aug 25, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2024
.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
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

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
Copy link
Member

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?

@weihanglo
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 26, 2024

📌 Commit ecfc899 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 26, 2024
@bors
Copy link
Collaborator

bors commented Aug 26, 2024

⌛ Testing commit ecfc899 with merge f2d1e37...

@bors
Copy link
Collaborator

bors commented Aug 26, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing f2d1e37 to master...

@bors bors merged commit f2d1e37 into rust-lang:master Aug 26, 2024
14 of 22 checks passed
@Mark-Simulacrum Mark-Simulacrum deleted the debug-no-errors branch August 26, 2024 23:57
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2024
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2024
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2024
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2024
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
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
@rustbot rustbot added this to the 1.83.0 milestone Sep 2, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 6, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-execution Area: anything dealing with executing the compiler S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants