Skip to content

Rust compilation error based on potentially broken serde API #16

Description

@homer6

I ran into this error with the latest version of lsh-rs:

   Compiling lsh-rs v0.4.0
error[E0432]: unresolved import `serde::export`
 --> C:\Users\steve\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lsh-rs-0.4.0\src\hash.rs:8:12
  |
8 | use serde::export::PhantomData;
  |            ^^^^^^ could not find `export` in `serde`

error[E0433]: failed to resolve: could not find `export` in `serde`
 --> C:\Users\steve\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lsh-rs-0.4.0\src\data.rs:4:12
  |
4 | use serde::export::fmt::{Debug, Display};
  |            ^^^^^^ could not find `export` in `serde`

error[E0432]: unresolved import `serde::export`
 --> C:\Users\steve\.cargo\registry\src\index.crates.io-6f17d22bba15001f\lsh-rs-0.4.0\src\table\sqlite.rs:9:12
  |
9 | use serde::export::PhantomData;
  |            ^^^^^^ could not find `export` in `serde`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `lsh-rs` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

I was running the latest serde:

serde = { version = "1.0.187", features = ["derive"] }

Based on this post, I downgraded to serde 1.0.118 and it compiled:

serde = { version = "=1.0.118", features = ["derive"] }

Maybe we need to update lsh-rs to be compatible with their new API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions