Skip to content
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

Can't use derive macro for Component if specs::Component is used under another name #719

Open
interfect opened this issue Dec 28, 2020 · 1 comment

Comments

@interfect
Copy link

The derive macro for components seems to be assuming that the literal string "Component" in my source code is going to point to specs::Component.

impl #impl_generics Component for #name #ty_generics #where_clause {

This isn't true if I have my own Component type and I have done something like use specs::Component as SComponent;. It's also not true if I'm also using another library using similar code that wants ownership of the non-namespaced name Component.

The macro should be changed to use a fully-qualified specs::Component, so it can coexist with Components from other crates.

Or am I doing something very wrong?

@WaDelma
Copy link
Member

WaDelma commented Dec 29, 2020

Fully-qualified specs::Component was removed in #467. I don't have horse on the race either way just linking to the previous discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants