Skip to content

lambda_http isn't compatible with serde features = ["derive"] #102

@iliana

Description

@iliana

Current documentation instructs users of Serde to use the derive feature in Cargo.toml:

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

This is incompatible with lambda_http which uses separate serde and serde_derive crates.

error[E0252]: the name `Deserialize` is defined multiple times
  --> /home/ilianaw/.cargo/registry/src/github.com-1ecc6299db9ec823/lambda_http-0.1.0/src/request.rs:17:5
   |
15 |     Deserialize, Deserializer,
   |     ----------- previous import of the macro `Deserialize` here
16 | };
17 | use serde_derive::Deserialize;
   | ----^^^^^^^^^^^^^^^^^^^^^^^^^-
   | |   |
   | |   `Deserialize` reimported here
   | help: remove unnecessary import
   |
   = note: `Deserialize` must be defined only once in the macro namespace of this module

error: aborting due to previous error

For more information about this error, try `rustc --explain E0252`.
error: Could not compile `lambda_http`.

If a user switches back to the old serde_derive crate, lambda_http successfully builds.

serde = "1.0"
serde_derive = "1.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions