-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
cargo test gives up compiling after one error #64084
Comments
What error specifically? Can you post a build log and a link to a repo (or, ideally, playground) that reproduces this behavior? |
I know there are errors in the build. The problem is that cargo test stops compiling all of the tests once it encounters a single error. |
@Mark-Simulacrum This playground gives up after compiling |
This has nothing to do with tests and is just a consequence of how type inference errors are currently fatal in this case. Removing the I'm going to close this issue as it's not really something that's fixable (well, it is, but not a targeted fix, and there's no real need to track this case separately). Thanks for the bug report, though! |
Is there a bug for the broader issue that I can watch? |
Not really in the sense that it's not a bug just a consequence of the current implementation. |
I believe this is a valid bug report. A cursory look at the code tells me that we are being overeager in how much we silence here. At least, we should only silence inside of a given body instead of globally like we do now. CC #21974 |
I'm making a big refactor. When attempting to clean up my tests,
cargo test
appears to go file by file, alphabetically when compiling the tests. As soon as one#[test]
has a compile error, the build is aborted.#[test]
s following the failure do not get compiled.#[test]
that fails to build are not reported.This makes finding errors very tedious.
Editing to provide concrete case:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c040edc58966f3fcc662002e84ec57aa gives up after the first test but should continue to report errors
The text was updated successfully, but these errors were encountered: