-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
x.py check
should check tests by default
#87846
Comments
We don't check tests by default, but you can pass --all-targets ( One reason we don't check tests by default is that causes duplicate error messages for the 'base' crate typically which are annoying (and most changes don't actually need them). If Cargo handled that and didn't show duplicate messages, I imagine we could change the default as well. |
Oh, you're right. So my mistake was assuming that |
Just FYI, 1.55 now deduplicates messages. |
Oh, great news @ehuss -- in that case I'm going to go ahead and reopen this as it seems likely to make sense to check tests (by default, and likely without an option to disable that). Should be a pretty simple adjustment to bootstrap. |
x.py check
does not check testsx.py check
should check tests by default
…mulacrum Enable `--all-targets` for `x.py check` unconditionally Now that Cargo deduplicates diagnostics from different targets, this doesn't flood the console with duplicate errors. Note that this doesn't add `--all-targets` in `Builder::cargo` directly because `impl Step for Std` actually wants to omit `--all-targets` the first time while it's still building libtest. When passed `--all-targets`, this warns that the option isn't needed, but still continues to compile. Fixes rust-lang#87846. r? `@Mark-Simulacrum`
It's possible to have errors in files such as:
library/std/src/collections/hash/map/tests.rs
andlibrary/alloc/tests/lib.rs
, and have./x.py check
pass.I would expect
x.py check
to be equivalent ofcargo check --all
and check every file that CI checks. Otherwise, I runx.py check
, push code to a PR, and only find later that I have a typo or such.The text was updated successfully, but these errors were encountered: