-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add compile_fail_utils
, compile fail tests, and benchmarks to Cargo workspace
#16770
Conversation
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.
Good fix, but can we add something to CI to ensure that this is automatically checked?
I had to remove the benchmarks' custom release profile, which enabled link-time optimizations. This _may_ cause benchmarks to perform slightly worse, but I haven't tested it yet.
Yup! The simplest fix I could find was to add all of the |
I thought that we don't include the compile_fail tests in the workspace because it doesn't work with crater. @alice-i-cecile am I hallucinating that? 😆 |
I don't remember that! And not seeing any issues on https://github.com/rust-lang/crater. Are you sure you haven't been replaced by an LLM? Anyways @BD103 CI is now mad at you, so kicking this back to you until it's placated. |
I wonder why it says that! As far as I can tell, Crater just runs Either way, let me fix the final few Clippy lints! |
compile_fail_utils
compile_fail_utils
, compile fail tests, and benchmarks to Cargo workspace
Turns out CI was running |
For the lifetime elisions, disable that clippy lint to be in line with the workspace. |
677682e
to
8a13e12
Compare
While there's a bit more I could do to improve the code quality of the benchmarks, I'm going to save it for a separate PR. |
I'm going to take another shot at this tomorrow. For some reason I'm unable to reproduce CI locally... |
Objective
compile_fail_utils
,benches
, and all of ourcompile_fail
sub-crates are outside of the Cargo workspace, so they are not checked by default nor caught by CI. As a result, these crates have several compile errors and warnings that were never discovered.Solution
compile_fail_utils
,benches
, and allcompile_fail
crates to the Cargo workspace.rustfmt
.release
profile from benchmarks.lto = true
.cargo test --benches
in CI.Testing
cargo check --workspace --all-targets
cd tools/compile_fail_utils && cargo test --test example