-
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
x.py check checks tests/examples/benches #76258
Conversation
// than just the leaf crate. | ||
for krate in builder.in_tree_crates("test") { | ||
cargo.arg("-p").arg(krate.name); | ||
} |
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.
This feels rather error-prone and annoying to do, but AFAICT there's no better way to get the behavior we want from Cargo. If we don't do this it'll only test the leaf crate (e.g., rustc-main) which is useless for bootstrap.
--workspace
is too broad -- we want something like --dependencies-too
.
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, right. Yea, this is probably the best way to do it. Considering in_tree_crates
is used elsewhere, I think it should be relatively reliable for now.
cc @RalfJung |
Often when modifying compiler code you'll miss that you've changed an API used by unit tests, since x.py check didn't previously catch that. It's also useful to have this for editing with rust-analyzer and similar tooling where editing tests previously didn't notify you of errors in test files.
c044447
to
af13338
Compare
👍 @bors r+ |
📌 Commit af13338 has been approved by |
@ehuss -- any thoughts on #76258 (comment)? I presume there's indeed no better way to get the behavior we want? |
x.py check checks tests/examples/benches This also adds a check for bootstrap to x.py. r? @ehuss
Rollup of 11 pull requests Successful merges: - rust-lang#75695 (Add a regression test for issue-72793) - rust-lang#75741 (Refactor byteorder to std in rustc_middle) - rust-lang#75954 (Unstable Book: add links to tracking issues for FFI features) - rust-lang#75994 (`impl Rc::new_cyclic`) - rust-lang#76060 (Link vec doc to & reference) - rust-lang#76078 (Remove disambiguators from intra doc link text) - rust-lang#76082 (Fix intra-doc links on pub re-exports) - rust-lang#76254 (Fold length constant in Rvalue::Repeat) - rust-lang#76258 (x.py check checks tests/examples/benches) - rust-lang#76263 (inliner: Check for codegen fn attributes compatibility) - rust-lang#76285 (Move jointness censoring to proc_macro) Failed merges: r? @ghost
@Mark-Simulacrum I need a way to disable this, since #76822 has made my normal |
Yes, we can. I would accept a PR to do so (or even an opt in to match cargo defaults). I will prepare one myself but probably not until tomorrow at the earliest. |
Are you thinking of an opt-out/in via a flag, or via the config file? A flag seems better IMO, this is something that depends on what one is currently working on. |
I plan to add a flag, and pass it on the mingw-check builder (so that we get maximal coverage there). |
Opened #77473. |
This also adds a check for bootstrap to x.py.
r? @ehuss