Skip to content

Compilation error if chrono's serde feature is not activated by client crate #5075

@abey79

Description

@abey79

I have crate where lance is used. I'm getting this kind of compilation error unless I force include chrono with the serde feature in crate as well.

error[E0277]: the trait bound `chrono::DateTime<chrono::Utc>: serde::Deserialize<'de>` is not satisfied
    --> /Users/hhip/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lance-0.36.0/src/dataset.rs:177:20
     |
177  |     pub timestamp: DateTime<Utc>,
     |                    ^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `chrono::DateTime<chrono::Utc>`
     |
     = note: for local types consider adding `#[derive(serde::Deserialize)]` to your `chrono::DateTime<chrono::Utc>` type
     = note: for types from other crates check whether the crate offers a `serde` feature flag
     = help: the following other types implement trait `Deserialize<'de>`:
               `&'a [u8]` implements `Deserialize<'de>`
               `&'a std::path::Path` implements `Deserialize<'de>`
               `&'a str` implements `Deserialize<'de>`
               `()` implements `Deserialize<'de>`
               `(T,)` implements `Deserialize<'de>`
               `(T0, T1)` implements `Deserialize<'de>`
               `(T0, T1, T2)` implements `Deserialize<'de>`
               `(T0, T1, T2, T3)` implements `Deserialize<'de>`
             and 350 others
note: required by a bound in `dataset::_::_serde::de::SeqAccess::next_element`
    --> /Users/hhip/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs:1771:12
     |
1769 |     fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>
     |        ------------ required by a bound in this associated function
1770 |     where
1771 |         T: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `SeqAccess::next_element`

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