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

Dependency conflict using serde with chrono together #2386

Closed
kivimango opened this issue Mar 3, 2023 · 2 comments
Closed

Dependency conflict using serde with chrono together #2386

kivimango opened this issue Mar 3, 2023 · 2 comments

Comments

@kivimango
Copy link

kivimango commented Mar 3, 2023

Hello !
I have a project that depends on chrono.If i add the serde dependency with the derive feature, cargo check fails with:

error: failed to select a version for `syn`.
    ... required by package `serde_derive v1.0.152`
    ... which satisfies dependency `serde_derive = "=1.0.152"` of package `serde v1.0.152`
    ... which satisfies dependency `serde = "^1.0.145"` (locked to 1.0.152) of package `serde_spanned v0.6.1`
    ... which satisfies dependency `serde_spanned = "^0.6.1"` (locked to 0.6.1) of package `toml v0.7.2`
    ... which satisfies dependency `toml = "*"` (locked to 0.7.2) of package `twin-commander v0.1.0`
versions that meet the requirements `^1.0.104` are: 1.0.109, 1.0.108, 1.0.107, 1.0.106, 1.0.105, 1.0.104

all possible versions conflict with previously selected packages.

  previously selected package `syn v1.0.103`
    ... which satisfies dependency `syn = "^1.0.95"` (locked to 1.0.103) of package `cxx-build v1.0.82`
    ... which satisfies dependency `cxx-build = "^1.0.34"` (locked to 1.0.82) of package `iana-time-zone-haiku v0.1.1`
    ... which satisfies dependency `iana-time-zone-haiku = "^0.1.1"` (locked to 0.1.1) of package `iana-time-zone v0.1.53`
    ... which satisfies dependency `iana-time-zone = "^0.1.44"` (locked to 0.1.53) of package `chrono v0.4.23`
    ... which satisfies dependency `chrono = "*"` (locked to 0.4.23) of package `twin-commander v0.1.0 `

failed to select a version for `syn` which could resolve this conflict

Could you update the syn crate ? or provide a serde version that works with crhono together? Thank you.

@oli-obk
Copy link
Member

oli-obk commented Mar 3, 2023

That seems odd. We support the latest syn, so it must be something else restricting the dependency. Have you tried running cargo update?

@kivimango
Copy link
Author

After running cargo update the project now compiles., thank you.

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

No branches or pull requests

2 participants