-
-
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
[Merged by Bors] - bevy_reflect: Add compile fail tests for bevy_reflect #7041
Conversation
This definitely needs to be added to CI. I also don't think this is controversial. @nicopap what was your reasoning? :) |
87908b2
to
2d8f6f9
Compare
Let me know if I made those CI changes incorrectly or not. I basically just copied the ECS compile fail stuff |
CI changes look correct to me, but @mockersf may have complaints. |
I would prefer to have this one at the same level than the ecs compile fail tests |
I'd advocate for a dedicated directory for these kinds of tests and others, like larger integration and E2E tests, which we may need in the further future as the number of engine features and their interactions start cross-pollinating. |
Should I move both into a single directory in this PR then? And if so, is it one crate or just one directory containing multiple crates? |
Up to you. I think it adds a lot of noise and should probably be done in it's own PR. The top level |
I'd prefer it live in |
2d8f6f9
to
4404c68
Compare
Moved the crate into |
@alice-i-cecile The change updating top level files, I thought this necessarily fell into "heightened standard of approval" as per the |
Ah understandable. In this case @cart has already endorsed the idea of compile fail tests in general and for bevy_reflect in particular, and this is the consistent way to implement these. |
4404c68
to
32cecbd
Compare
Ping @MrGVSV on the gitgnore question: it's easy to miss in the resolved comment thread. |
32cecbd
to
5c9efbe
Compare
bors r+ |
# Objective There isn't really a way to test that code using bevy_reflect compiles or doesn't compile for certain scenarios. This would be especially useful for macro-centric PRs like #6511 and #6042. ## Solution Using `bevy_ecs_compile_fail_tests` as reference, added the `bevy_reflect_compile_fail_tests` crate. Currently, this crate contains a very simple test case. This is so that we can get the basic foundation of this crate agreed upon and merged so that more tests can be added by other PRs. ### Open Questions - [x] Should this be added to CI? (Answer: Yes) --- ## Changelog - Added the `bevy_reflect_compile_fail_tests` crate for testing compilation errors
Pull request successfully merged into main. Build succeeded! And happy new year! 🎉
|
# Objective There isn't really a way to test that code using bevy_reflect compiles or doesn't compile for certain scenarios. This would be especially useful for macro-centric PRs like bevyengine#6511 and bevyengine#6042. ## Solution Using `bevy_ecs_compile_fail_tests` as reference, added the `bevy_reflect_compile_fail_tests` crate. Currently, this crate contains a very simple test case. This is so that we can get the basic foundation of this crate agreed upon and merged so that more tests can be added by other PRs. ### Open Questions - [x] Should this be added to CI? (Answer: Yes) --- ## Changelog - Added the `bevy_reflect_compile_fail_tests` crate for testing compilation errors
# Objective There isn't really a way to test that code using bevy_reflect compiles or doesn't compile for certain scenarios. This would be especially useful for macro-centric PRs like bevyengine#6511 and bevyengine#6042. ## Solution Using `bevy_ecs_compile_fail_tests` as reference, added the `bevy_reflect_compile_fail_tests` crate. Currently, this crate contains a very simple test case. This is so that we can get the basic foundation of this crate agreed upon and merged so that more tests can be added by other PRs. ### Open Questions - [x] Should this be added to CI? (Answer: Yes) --- ## Changelog - Added the `bevy_reflect_compile_fail_tests` crate for testing compilation errors
Objective
There isn't really a way to test that code using bevy_reflect compiles or doesn't compile for certain scenarios. This would be especially useful for macro-centric PRs like #6511 and #6042.
Solution
Using
bevy_ecs_compile_fail_tests
as reference, added thebevy_reflect_compile_fail_tests
crate.Currently, this crate contains a very simple test case. This is so that we can get the basic foundation of this crate agreed upon and merged so that more tests can be added by other PRs.
Open Questions
Changelog
bevy_reflect_compile_fail_tests
crate for testing compilation errors