-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Move compile fail tests #13196
Move compile fail tests #13196
Conversation
When I think of the `crates` folder, I think of all of Bevy's modules. I don't expect an internal utility crate that is not even on crates.io. While `tools` may not be the best location for it, I think its better than `crates`.
This is a completely opinionated change. (Though one could argue this entire PR is opinionated too.) I'd be willing to revert this if anyone disagrees.
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.
Looks ok. The documentation just needs to be fixed
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.
I agree with the changes here: these are way less confusing if they're not top-level crates.
Once the links are fixed this LGTM.
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.
LGTM.
side note: i feel like we shouldn't put compile-succeed tests in these crates, since its much easier iteratively to drop them into regular #[test]
s, since these tests are still flaky outside of ci.
Objective
README.md
to all crates #13184 :)ui_test
to test compiler errors for our custom macros.bevy_ecs_compile_fail_tests
,bevy_macros_compile_fail_tests
, andbevy_reflect_compile_fail_tests
, which actually test the macros.bevy_compile_test_utils
, which provides helpers and common patterns for these tests.crates
directory.crates
are actual published libraries, except for these 4.Solution
compile_fail
folder under their corresponding crate.crates/bevy_ecs_compile_fail_tests
would be moved tocrates/bevy_ecs/compile_fail
.bevy_compile_test_utils
totools/compile_fail_utils
.There are a few benefits to this approach:
bevy_gizmos/macros
for an example.compile_test
,compile_fail
, andcompile_fail_test
in code. It's all justcompile_fail
now, because we are specifically testing the error messages on compiler failures.Testing
Run the compile fail CI command:
If it still passes, then my refactor was successful.