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

Can not compile discord rs with chrono 0.4 #123

Closed
iddm opened this issue Jun 22, 2017 · 6 comments
Closed

Can not compile discord rs with chrono 0.4 #123

iddm opened this issue Jun 22, 2017 · 6 comments
Labels

Comments

@iddm
Copy link
Contributor

iddm commented Jun 22, 2017

After recent update of chrono crate I can't compile the discord crate anymore:

   Compiling discord v0.8.0 (https://github.com/SpaceManiac/discord-rs#e401c10b)
error[E0277]: the trait bound `chrono::DateTime<chrono::FixedOffset>: serde::Serialize` is not satisfied
   --> /home/user/.cargo/git/checkouts/discord-rs-e20ed8881d23c413/e401c10/src/model.rs:389:24
    |
389 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                        ^^^^^^^^^ the trait `serde::Serialize` is not implemented for `chrono::DateTime<chrono::FixedOffset>`
    |
    = note: required because of the requirements on the impl of `serde::Serialize` for `std::option::Option<chrono::DateTime<chrono::FixedOffset>>`
    = note: required by `serde::ser::SerializeStruct::serialize_field`

error[E0277]: the trait bound `chrono::DateTime<chrono::FixedOffset>: serde::Deserialize<'_>` is not satisfied
   --> /home/user/.cargo/git/checkouts/discord-rs-e20ed8881d23c413/e401c10/src/model.rs:389:35
    |
389 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                                   ^^^^^^^^^^^ the trait `serde::Deserialize<'_>` is not implemented for `chrono::DateTime<chrono::FixedOffset>`
    |
    = note: required because of the requirements on the impl of `serde::Deserialize<'_>` for `std::option::Option<chrono::DateTime<chrono::FixedOffset>>`
    = note: required by `serde::de::SeqAccess::next_element`

error[E0277]: the trait bound `chrono::DateTime<chrono::FixedOffset>: serde::Deserialize<'_>` is not satisfied
   --> /home/user/.cargo/git/checkouts/discord-rs-e20ed8881d23c413/e401c10/src/model.rs:389:35
    |
389 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                                   ^^^^^^^^^^^ the trait `serde::Deserialize<'_>` is not implemented for `chrono::DateTime<chrono::FixedOffset>`
    |
    = note: required because of the requirements on the impl of `serde::Deserialize<'_>` for `std::option::Option<chrono::DateTime<chrono::FixedOffset>>`
    = note: required by `serde::de::MapAccess::next_value`

error[E0277]: the trait bound `chrono::DateTime<chrono::FixedOffset>: serde::Serialize` is not satisfied
   --> /home/user/.cargo/git/checkouts/discord-rs-e20ed8881d23c413/e401c10/src/model.rs:647:24
    |
647 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                        ^^^^^^^^^ the trait `serde::Serialize` is not implemented for `chrono::DateTime<chrono::FixedOffset>`
    |
    = note: required by `serde::ser::SerializeStruct::serialize_field`

error[E0277]: the trait bound `chrono::DateTime<chrono::FixedOffset>: serde::Deserialize<'_>` is not satisfied
   --> /home/user/.cargo/git/checkouts/discord-rs-e20ed8881d23c413/e401c10/src/model.rs:647:35
    |
647 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                                   ^^^^^^^^^^^ the trait `serde::Deserialize<'_>` is not implemented for `chrono::DateTime<chrono::FixedOffset>`
    |
    = note: required by `serde::de::SeqAccess::next_element`

error[E0277]: the trait bound `chrono::DateTime<chrono::FixedOffset>: serde::Deserialize<'_>` is not satisfied
   --> /home/user/.cargo/git/checkouts/discord-rs-e20ed8881d23c413/e401c10/src/model.rs:647:35
    |
647 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                                   ^^^^^^^^^^^ the trait `serde::Deserialize<'_>` is not implemented for `chrono::DateTime<chrono::FixedOffset>`
    |
    = note: required by `serde::de::MapAccess::next_value`

error: aborting due to 6 previous errors

error: Could not compile `discord`.
@SpaceManiac
Copy link
Owner

Upstream chrono broke back-compat in v0.3.1, which has since been yanked. Delete and regenerate Cargo.lock to downgrade back to v0.3.0.

@iddm
Copy link
Contributor Author

iddm commented Jun 22, 2017

@SpaceManiac Deleted Cargo.lock, performed cargo clean, cargo update, cargo test and still have the same errors. Also, I don't have chrono 0.3.1 in my Cargo.lock but only 0.3 and 0.4.

I have just cloned your repo, performed the steps above again and have the same result.

@iddm
Copy link
Contributor Author

iddm commented Jun 22, 2017

After updating chrono everything works okay.

@SpaceManiac
Copy link
Owner

Looks like it was the reverse problem: we were depending on 0.3.1, and now that it's yanked, builds fail.

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Jun 22, 2017

For future reference, the above compiler error looks like it was trying to compile chrono without the "serde" feature.

@iddm
Copy link
Contributor Author

iddm commented Jun 22, 2017

@Xaeroxe yes, but I checked it many times - everything was set up correctly, so it must be something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants