[Merged by Bors] - Fix compile_fail tests#2984
Closed
MinerSebas wants to merge 2 commits intobevyengine:mainfrom
Closed
[Merged by Bors] - Fix compile_fail tests#2984MinerSebas wants to merge 2 commits intobevyengine:mainfrom
MinerSebas wants to merge 2 commits intobevyengine:mainfrom
Conversation
alice-i-cecile
approved these changes
Oct 17, 2021
Contributor
You could use |
bjorn3
reviewed
Oct 17, 2021
Contributor
Author
I chose against this as |
mockersf
approved these changes
Oct 17, 2021
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Oct 18, 2021
# Objective - Bevy has several `compile_fail` test - #2254 added `#[derive(Component)]` - Those tests now fail for a different reason. - This was not caught as these test still "successfully" failed to compile. ## Solution - Add `#[derive(Component)]` to the doctest - Also changed their cfg attribute from `doc` to `doctest`, so that these tests don't appear when running `cargo doc` with `--document-private-items`
Contributor
bors bot
pushed a commit
that referenced
this pull request
Nov 13, 2021
# 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.
bors bot
pushed a commit
that referenced
this pull request
Nov 13, 2021
# 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
compile_failtest#[derive(Component)]on all component structs #2254 added#[derive(Component)]Solution
#[derive(Component)]to the doctestdoctodoctest, so that these tests don't appear when runningcargo docwith--document-private-items