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

Support versionize on packed structs #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbradford
Copy link

Signed-off-by: Rob Bradford [email protected]

Copy link
Contributor

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.

Could you add a unit-test to exercise this?

@sandreim
Copy link
Contributor

@acatangiu The tests should be added in the versionize crate, it won't work to use the proc macro in the same crate.

@rbradford I'm getting the following error when trying to build the versionize tests using your derive changes, probably something is missing from this PR?

   Compiling versionize_derive v0.1.4 (/home/ANT.AMAZON.COM/sandreim/versionize_derive)
error[E0277]: the trait bound `proc_macro2::TokenTree: syn::token::CustomToken` is not satisfied
   --> /home/ANT.AMAZON.COM/sandreim/versionize_derive/src/lib.rs:223:47
    |
223 |                 while let Some(token) = input.parse()? {
    |                                               ^^^^^ the trait `syn::token::CustomToken` is not implemented for `proc_macro2::TokenTree`
    |
    = note: required because of the requirements on the impl of `syn::token::Token` for `proc_macro2::TokenTree`
    = note: required because of the requirements on the impl of `syn::parse::Parse` for `std::option::Option<proc_macro2::TokenTree>`

error: aborting due to previous error

@acatangiu
Copy link
Contributor

@rbradford do you still need this? Is it building for you?

@rbradford
Copy link
Author

@acatangiu Yup, works grand. We use it in production in Cloud Hypervisor.

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

Successfully merging this pull request may close these issues.

5 participants