-
Notifications
You must be signed in to change notification settings - Fork 108
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
The derive feature can cause duplicate import errors #1587
Labels
customer-request
Documents customer requests.
Comments
Perhaps we should recommend: - use zerocopy_derive::{AsBytes, FromBytes, FromZeroes};
+ use zerocopy_derive::*; ...so the imports shadow without conflict. |
joshlf
added a commit
that referenced
this issue
Sep 17, 2024
Clarify advice for how to speed up compile times by importing zerocopy and zerocopy-derive separately. The updated advice avoids the risk of duplicate import errors if one of a crate's transitive dependencies adds zerocopy's `derive` feature. Closes #1587
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 17, 2024
Clarify advice for how to speed up compile times by importing zerocopy and zerocopy-derive separately. The updated advice avoids the risk of duplicate import errors if one of a crate's transitive dependencies adds zerocopy's `derive` feature. Closes #1587
jct-tympanon
added a commit
to jct-tympanon/samply
that referenced
this issue
Dec 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The docs state the following:
However, this can lead to issues if another dependency in the chain imports zerocopy with the derive feature, as now you suddenly have two macros in scope.
which is then only solveable within the dependency that imports zerocopy_derive in this way.
Therefore this usage should probably be discouraged, or warned against for anything other than binary crates.
The text was updated successfully, but these errors were encountered: