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

error: failed to select a version for time #15

Open
iporollo opened this issue Feb 3, 2021 · 5 comments
Open

error: failed to select a version for time #15

iporollo opened this issue Feb 3, 2021 · 5 comments

Comments

@iporollo
Copy link
Contributor

iporollo commented Feb 3, 2021

When adding the msql-srv dependency to my project, I get this error

error: failed to select a version for `time`.
    ... required by package `cookie v0.14.1`
    ... which is depended on by `actix-http v2.0.0`
    ... which is depended on by `actix-web v3.0.0`
    ... which is depended on by `qz-server v0.1.0`
versions that meet the requirements `^0.2.11` are: 0.2.24, 0.2.25, 0.2.23, 0.2.22, 0.2.21, 0.2.20, 0.2.19, 0.2.18, 0.2.17, 0.2.16, 0.2.15, 0.2.14, 0.2.13, 0.2.12, 0.2.11

all possible versions conflict with previously selected packages.

  previously selected package `time v0.2.7`
    ... which is depended on by `msql-srv v0.9.2`
    ... which is depended on by `qz-drivers v0.1.0`
    ... which is depended on by `qz-server v0.1.0`

Wondering if anyone else is seeing this?

@jonhoo
Copy link
Owner

jonhoo commented Feb 3, 2021

Ah, this was due to a bug a while back that made the time crate impossible to compile with certain other dependencies. You could take a stab at removing the = from

time = "=0.2.7"

And see if that compiles now? Really we should just update to tokio 1.0, but that is a big change.

@iporollo
Copy link
Contributor Author

iporollo commented Feb 3, 2021

So it looks like that cookie v0.14.1 dependency requires a version of time that's one of 0.2.24, 0.2.25, 0.2.23, 0.2.22, 0.2.21, 0.2.20, 0.2.19, 0.2.18, 0.2.17, 0.2.16, 0.2.15, 0.2.14, 0.2.13, 0.2.12, 0.2.11. Seems like the 0.2.7 that msql-srv uses is not part of the allowed versions, hence this error appears.

I forked the repository, changed the time to be time = "0.2.25", and set the fork as the origin of the package using

[patch.crates-io]
msql-srv = { git = '<my-fork>' }

With that change,msql-srv seems to compile just fine, and removes the error in my original project.

Should I spin up a small PR for this repository as well to update that time version?

@jonhoo
Copy link
Owner

jonhoo commented Feb 3, 2021

I think all you should need to do is remove the leading = in the specified, and things should work. But yes please to a PR!

@iporollo
Copy link
Contributor Author

iporollo commented Feb 3, 2021

I tried removing just the leading = but it was unfortunately still erroring, which is why I bumped the version up...
And will do 👍

@jonhoo
Copy link
Owner

jonhoo commented Feb 4, 2021

Huh, interesting. Okay, sounds good 👍

ovr pushed a commit to ovr/msql-srv that referenced this issue Nov 29, 2021
flaneur2020 pushed a commit to flaneur2020/msql-srv that referenced this issue Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants