-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
[Merged by Bors] - Assert compiler errors for compile_fail tests #3067
[Merged by Bors] - Assert compiler errors for compile_fail tests #3067
Conversation
88e97ef
to
6c7be3f
Compare
This is super useful and solves a very real problem. I feel so much safer now :) |
6c7be3f
to
ce8ad19
Compare
Nice! It will probably add to the things we need to update on a new rust version, and also fail things like crater builds. Would there be a way to run those kind of tests not on a simple |
Maybe if we move them into a seperate crate that is not part of the workspace? |
ce8ad19
to
0e05f04
Compare
The UI tests are now moved into a separate crate that is not part of the Bevy workspace. They get executed by the |
Could you fix the warning in CI
It could be confusing in the future in case of other errors |
I added an empty |
bors try The redit link is failing to resolve... |
Cool I think this is good to go, but I think the |
bors r+ |
# Objective bevy_ecs has several compile_fail tests that assert lifetime safety. In the past, these tests have been green for the wrong reasons (see e.g. #2984). This PR makes sure, that they will fail if the compiler error changes. ## Solution Use [trybuild](https://crates.io/crates/trybuild) to assert the compiler errors. The UI tests are in a separate crate that is not part of the Bevy workspace. This is to ensure that they do not break Bevy's crater builds. The tests get executed by the CI workflow on the stable toolchain.
Build failed (retrying...): |
# Objective bevy_ecs has several compile_fail tests that assert lifetime safety. In the past, these tests have been green for the wrong reasons (see e.g. #2984). This PR makes sure, that they will fail if the compiler error changes. ## Solution Use [trybuild](https://crates.io/crates/trybuild) to assert the compiler errors. The UI tests are in a separate crate that is not part of the Bevy workspace. This is to ensure that they do not break Bevy's crater builds. The tests get executed by the CI workflow on the stable toolchain.
Objective
bevy_ecs has several compile_fail tests that assert lifetime safety. In the past, these tests have been green for the wrong reasons (see e.g. #2984). This PR makes sure, that they will fail if the compiler error changes.
Solution
Use trybuild to assert the compiler errors.
The UI tests are in a separate crate that is not part of the Bevy workspace. This is to ensure that they do not break Bevy's crater builds. The tests get executed by the CI workflow on the stable toolchain.