-
-
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
Harden proc macro path resolution and add integration tests. #17330
base: main
Are you sure you want to change the base?
Conversation
* Use the `extern crate self as` trick to make proc macros work inside and outside bevy behave the same way.
While this does not catch RA errors it should simulate bevy users better.
28422af
to
8f4a421
Compare
BevyManifest
name resolution smarter.@@ -4,6 +4,7 @@ crates/**/target | |||
benches/**/target | |||
tools/**/target | |||
**/*.rs.bk | |||
rustc-ice-*.txt |
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.
😆
Great idea, just need to fix the errors |
I will make the ci pass coming Thursday or Friday. |
When I try this branch, rust-analyzer logs this:
Is it expected to work with stable Rust / edition 2021? |
The command
|
I know. Please try it with nightly for now. Clean your project first and restart rust analyzer. I need to modify |
This pr uses the
extern crate self as
trick to make proc macros behave the same way inside and outside bevy.Objective
crate as
in the whole bevy repo.TODO
BevyManifest
needs cleanup.cargo-manifest-proc-macros
needs discussion.cargo-manifest-proc-macros
needs discussion.crate as
.Open Questions
cargo-manifest-proc-macros
is written by me and based/inspired by the oldBevyManifest
implementation andbkchr/proc-macro-crate
.cargo-manifest-proc-macros
crate?cargo-manifest-proc-macros
from2024
to2021
?ci
?More and better integration tests can be added at a later stage.
The goal of these integration tests is to simulate an actual separate crate that uses bevy. Ideally they would lightly touch all bevy crates.
Testing
cargo run -p ci integration-test
and verify that they work.