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

impl_arr_new_type makes it slightly awkward to write downstream code with fuzzing feature #596

Open
sanket1729 opened this issue Apr 1, 2023 · 5 comments

Comments

@sanket1729
Copy link
Member

#[cfg_attr(not(fuzzing), derive(Eq, PartialEq, Hash, Ord, PartialOrd))]

Don't know nice solutions for this other than creating another macro, but wanted to point this out.

@apoelstra
Copy link
Member

What is the problem exactly? That when fuzzing is on, these derives conflict with your own?

@sanket1729
Copy link
Member Author

Yep, that is the issue. Alibit a minor one.

@Kixunil
Copy link
Collaborator

Kixunil commented Apr 2, 2023

Where's the macro? Can't find it in the codebase.

@tcharding
Copy link
Member

tcharding commented Apr 3, 2023

You are refering to the impl_array_newtype macro in secp256k1-sys/src/macros.rs, right?

I don't understand, the macro impl_array_new_type does nothing with those traits. They are on the type declarations and then manual impls for not(fuzzing).

Can you explain the problem further please?

@Kixunil
Copy link
Collaborator

Kixunil commented Apr 3, 2023

Oh, wrong repository! 🤦‍♂️

Hmm, why is that macro even external? It seems completely unrelated to secp256k1!

Anyway we can drop those impls since 1.48 as those can be done with derives now. Does it resolve the issue?

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

4 participants