-
Notifications
You must be signed in to change notification settings - Fork 221
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
Switched specs-derive to use Component in scope #467
Conversation
I believe this is a breaking change, isn't it? Any code that uses As a user of specs (by way of Amethyst), I also don't love the prospect of having to manually import For the record, I'm not against this change. I think being able to derive |
Of course, but before this change you needed to manually add specs to your Cargo.toml and add a "extern crate specs". In the case of amethyst where its already re-exported (amethyst::core::ecs), you end up with two versions of specs. If you are not careful, you'll get two different versions and get hard to track errors. But yes a way of doing it with absolute paths would be nice indeed. :D |
You know what, I feel like I've run into that before and been annoyed about having to manually import |
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'm in favor of this as a first step towards being able to re-export the custom derives in other crates. We can always make improvements later 👍
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.
Is a breaking change if they don't have Component imported, but seems fine.
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.
Please bump the version of specs-derive
. We might need to hold this off until we release Specs 0.13.
@torkleyy done |
@Jojolepro tests failed, can you update the version usage as well? |
bors r+ |
467: Switched specs-derive to use Component in scope r=Xaeroxe a=jojolepro "Works on my pc". So with this you need to have `Component` in scope for the derive to find it and use it. This allows to use it in projects without having to have specs as a hard dependency. <3 Also it might fix the issue with re-exporting the macro, but I didn't test that. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/467) <!-- Reviewable:end --> Co-authored-by: Joël Lupien (Jojolepro) <[email protected]>
Build succeeded |
@Xaeroxe We should've held the merge off until 0.13.. |
We did? I'm planning a 0.13 soon. |
"Works on my pc".
So with this you need to have
Component
in scope for the derive to find it and use it. This allows to use it in projects without having to have specs as a hard dependency. <3Also it might fix the issue with re-exporting the macro, but I didn't test that.
This change is