-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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_derive] Refactor modules for better error message. #2059
[Merged by Bors] - [bevy_derive] Refactor modules for better error message. #2059
Conversation
daa36ff
to
866fa62
Compare
crates/bevy_derive/src/modules.rs
Outdated
} | ||
Manifest::new() | ||
.unwrap() | ||
.find(|name| name == "bevy" || name == "bevy_internal") |
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.
This makes the output of this function depend on the order of dependencies if both bevy and bevy_internal are specified as dependencies for some reason.
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.
yes true, though this was the previous behavior of the implementation IIUC?
Edit: oh, now I understand what you mean!
Problem: - When using the 'as_crate' attribute, if 'as_crate' was empty, the only error you would get is 'integer underflow'. Solution: - Provide an explicit check for the 'as_crate' attribute's token stream to ensure the formatting is correct.
866fa62
to
7d41785
Compare
As a heads up: this will conflict with #1875. |
Merging this because its ready now :) |
bors r+ |
Problem: - When using the 'as_crate' attribute, if 'as_crate' was empty, the only error you would get is 'integer underflow'. Solution: - Provide an explicit check for the 'as_crate' attribute's token stream to ensure the formatting is correct. Note: - Also reworked 'get_meta' by not making it call 'Manifest::find' twice.
Pull request successfully merged into main. Build succeeded: |
…2059) Problem: - When using the 'as_crate' attribute, if 'as_crate' was empty, the only error you would get is 'integer underflow'. Solution: - Provide an explicit check for the 'as_crate' attribute's token stream to ensure the formatting is correct. Note: - Also reworked 'get_meta' by not making it call 'Manifest::find' twice.
Problem:
error you would get is 'integer underflow'.
Solution:
to ensure the formatting is correct.
Note: