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

Feature derive and bits are not exclusive #69

Closed
Mirko-von-Leipzig opened this issue Dec 7, 2021 · 2 comments · Fixed by #72
Closed

Feature derive and bits are not exclusive #69

Mirko-von-Leipzig opened this issue Dec 7, 2021 · 2 comments · Fixed by #72

Comments

@Mirko-von-Leipzig
Copy link
Contributor

Mirko-von-Leipzig commented Dec 7, 2021

Using the following does not compile:

ff = { version = "0.11.0", default-features = false, features = ["derive", "alloc"] }

because derive depends on bitvec which is only included with the bits feature enabled.

Compile error, and relevant code snippet:

<...>.cargo/registry/src/github.com-1ecc6299db9ec823/ff-0.11.0/src/lib.rs:269:14
    |
269 |     pub use {bitvec, byteorder, rand_core, subtle};
    |              ^^^^^^ no external crate `bitvec`
ff-0.11.0/src/lib.rs:

/// Functions and re-exported crates used by the [`PrimeField`] derive macro.
#[cfg(feature = "derive")]
#[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
pub mod derive {
    pub use crate::arith_impl::*;
    pub use {bitvec, byteorder, rand_core, subtle};
}
@Mirko-von-Leipzig
Copy link
Contributor Author

On further investigation, it appears ff_derive actually depends on bitvec without listing it as a dependency.

@str4d
Copy link
Member

str4d commented Apr 26, 2022

Fixing this properly blocks on #78, due to the need for weak dependency features.

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 a pull request may close this issue.

2 participants