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

frost-core does not compile without features #629

Closed
survived opened this issue Mar 14, 2024 · 1 comment · Fixed by #630
Closed

frost-core does not compile without features #629

survived opened this issue Mar 14, 2024 · 1 comment · Fixed by #630
Assignees

Comments

@survived
Copy link

How to reproduce:

git checkout frost-core/v1.0.0
cargo check -p frost-core --no-default-features
Output

error[E0432]: unresolved imports `crate::serialization::Deserialize`, `crate::serialization::Serialize`
   --> frost-core/src/keys.rs:20:21
    |
20  |     serialization::{Deserialize, Serialize},
    |                     ^^^^^^^^^^^  ^^^^^^^^^ no `Serialize` in `serialization`
    |                     |
    |                     no `Deserialize` in `serialization`
    |
note: found an item that was configured out
   --> frost-core/src/serialization.rs:171:18
    |
171 | pub(crate) trait Deserialize<C: Ciphersuite> {
    |                  ^^^^^^^^^^^
    = note: the item is gated behind the `serialization` feature
note: found an item that was configured out
   --> frost-core/src/serialization.rs:165:18
    |
165 | pub(crate) trait Serialize<C: Ciphersuite> {
    |                  ^^^^^^^^^
    = note: the item is gated behind the `serialization` feature

error[E0432]: unresolved imports `crate::serialization::Deserialize`, `crate::serialization::Serialize`
   --> frost-core/src/keys/dkg.rs:53:32
    |
53  |     use crate::serialization::{Deserialize, Serialize};
    |                                ^^^^^^^^^^^  ^^^^^^^^^ no `Serialize` in `serialization`
    |                                |
    |                                no `Deserialize` in `serialization`
    |
    = help: consider importing this unresolved item through its public re-export instead:
            crate::keys::Deserialize
note: found an item that was configured out
   --> frost-core/src/serialization.rs:171:18
    |
171 | pub(crate) trait Deserialize<C: Ciphersuite> {
    |                  ^^^^^^^^^^^
    = note: the item is gated behind the `serialization` feature
    = help: consider importing this unresolved item through its public re-export instead:
            crate::keys::Serialize
note: found an item that was configured out
   --> frost-core/src/serialization.rs:165:18
    |
165 | pub(crate) trait Serialize<C: Ciphersuite> {
    |                  ^^^^^^^^^
    = note: the item is gated behind the `serialization` feature

error[E0432]: unresolved imports `crate::serialization::Deserialize`, `crate::serialization::Serialize`
   --> frost-core/src/keys/dkg.rs:170:32
    |
170 |     use crate::serialization::{Deserialize, Serialize};
    |                                ^^^^^^^^^^^  ^^^^^^^^^ no `Serialize` in `serialization`
    |                                |
    |                                no `Deserialize` in `serialization`
    |
    = help: consider importing this unresolved item through its public re-export instead:
            crate::keys::Deserialize
note: found an item that was configured out
   --> frost-core/src/serialization.rs:171:18
    |
171 | pub(crate) trait Deserialize<C: Ciphersuite> {
    |                  ^^^^^^^^^^^
    = note: the item is gated behind the `serialization` feature
    = help: consider importing this unresolved item through its public re-export instead:
            crate::keys::Serialize
note: found an item that was configured out
   --> frost-core/src/serialization.rs:165:18
    |
165 | pub(crate) trait Serialize<C: Ciphersuite> {
    |                  ^^^^^^^^^
    = note: the item is gated behind the `serialization` feature

error[E0432]: unresolved imports `crate::serialization::Deserialize`, `crate::serialization::Serialize`
   --> frost-core/src/round1.rs:17:21
    |
17  |     serialization::{Deserialize, Serialize},
    |                     ^^^^^^^^^^^  ^^^^^^^^^ no `Serialize` in `serialization`
    |                     |
    |                     no `Deserialize` in `serialization`
    |
note: found an item that was configured out
   --> frost-core/src/serialization.rs:171:18
    |
171 | pub(crate) trait Deserialize<C: Ciphersuite> {
    |                  ^^^^^^^^^^^
    = note: the item is gated behind the `serialization` feature
note: found an item that was configured out
   --> frost-core/src/serialization.rs:165:18
    |
165 | pub(crate) trait Serialize<C: Ciphersuite> {
    |                  ^^^^^^^^^
    = note: the item is gated behind the `serialization` feature

error: cannot find attribute `serde` in this scope
   --> frost-core/src/lib.rs:156:7
    |
156 |     #[serde(skip)]
    |       ^^^^^

warning: unused imports: `Error`, `Field`, `Group`
 --> frost-core/src/serialization.rs:3:26
  |
3 | use crate::{Ciphersuite, Error, Field, Group};
  |                          ^^^^^  ^^^^^  ^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

For more information about this error, try `rustc --explain E0432`.
warning: `frost-core` (lib) generated 1 warning
error: could not compile `frost-core` (lib) due to 5 previous errors; 1 warning emitted

It can be also reproduced by adding frost-core as dependency without default features:

frost-core = { version = "1", default-features = false }
@conradoplg
Copy link
Contributor

Thanks, good catch. I opened a PR to fix it.

@mpguerra mpguerra moved this to Review/QA in FROST Mar 15, 2024
@mergify mergify bot closed this as completed in #630 Apr 10, 2024
@github-project-automation github-project-automation bot moved this from Review/QA to Done in FROST Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants