You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to have errors in files such as: library/std/src/collections/hash/map/tests.rs and library/alloc/tests/lib.rs, and have ./x.py check pass.
I would expect x.py check to be equivalent of cargo check --all and check every file that CI checks. Otherwise, I run x.py check, push code to a PR, and only find later that I have a typo or such.
We don't check tests by default, but you can pass --all-targets (x.py check --all-targets) to check tests. I believe this is consistent with cargo check behavior?
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 cargo check is more thorough than it is (my text editor invokes it for me, even for tests, so I didn't realize the command doesn't do everything itself).
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.
Activity
Mark-Simulacrum commentedon Aug 7, 2021
We don't check tests by default, but you can pass --all-targets (
x.py check --all-targets
) to check tests. I believe this is consistent with cargo check behavior?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.
kornelski commentedon Aug 7, 2021
Oh, you're right. So my mistake was assuming that
cargo check
is more thorough than it is (my text editor invokes it for me, even for tests, so I didn't realize the command doesn't do everything itself).ehuss commentedon Aug 7, 2021
Just FYI, 1.55 now deduplicates messages.
Mark-Simulacrum commentedon Aug 8, 2021
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 tests[/-][+]`x.py check` should check tests by default[/+]--all-targets
forx.py check
unconditionally #88011Rollup merge of rust-lang#88011 - jyn514:check-all-targets, r=Mark-Si…
Rollup merge of rust-lang#88011 - jyn514:check-all-targets, r=Mark-Si…