time-rs / time

The most used Rust library for date and time handling.
https://time-rs.github.io
Apache License 2.0
1.06k stars 261 forks source link

Cargo error: `serde` conflict with `time v0.3.26` crate #613

Closed DK26 closed 11 months ago

DK26 commented 11 months ago

Using the latest serde and the latest time crates, produce a cargo error.

Cargo.toml

serde = { version = "1.0.177", features = ["derive"] }
time = "0.3.26" 

Cargo check

error: failed to select a version for `serde`.
    ... required by package `time v0.3.26`
    ... which satisfies dependency `time = "^0.3.26"` of package `hello-world v0.1.0 (/tmp/cargo-outdatedRi1D4I)`
versions that meet the requirements `>=1.0.126, <=1.0.171` are: 1.0.171, 1.0.170, 1.0.169, 1.0.168, 1.0.167, 1.0.166, 1.0.165, 1.0.164, 1.0.163, 1.0.162, 1.0.161, 1.0.160, 1.0.159, 1.0.158, 1.0.157, 1.0.156, 1.0.155, 1.0.154, 1.0.153, 1.0.152, 1.0.151, 1.0.150, 1.0.149, 1.0.148, 1.0.147, 1.0.146, 1.0.145, 1.0.144, 1.0.143, 1.0.142, 1.0.141, 1.0.140, 1.0.139, 1.0.138, 1.0.137, 1.0.136, 1.0.135, 1.0.134, 1.0.133, 1.0.132, 1.0.131, 1.0.130, 1.0.129, 1.0.128, 1.0.127, 1.0.126

all possible versions conflict with previously selected packages.

  previously selected package `serde v1.0.183`
    ... which satisfies dependency `serde = "^1.0.183"` of package `hello-world v0.1.0 (/tmp/cargo-outdatedRi1D4I)`

Temporary Fix

It seems to work fine when downgrading to time v0.3.25

AlexTMjugador commented 11 months ago

This is a deliberate change. You can read more about it here: https://github.com/time-rs/time/discussions/611

jhpratt commented 11 months ago

611

DK26 commented 11 months ago

So the resolution at the moment is either keep the time crate out-dated (0.3.25) or serde out-dated (1.0.171)

jhpratt commented 11 months ago

Yes. See the linked discussion/vote for details.