https://linen.dev logo
Facing error during cargo check and it is because ...
# help
d
Initiated a project with axum and made no changes.
Copy code
... required by package `axum v0.6.10`
    ... which satisfies dependency `axum = "^0.6.10"` of package `proj v0.1.0 (/Users/xxxxxx.xxxxxx/Desktop/xxxxxx/yyy/proj)`
versions that meet the requirements `^1.25.0` are: 1.26.0, 1.25.0

all possible versions conflict with previously selected packages.

  previously selected package `tokio v1.22.0`
    ... which satisfies dependency `tokio = "=1.22.0"` of package `shuttle-service v0.11.0`
    ... which satisfies dependency `shuttle-service = "^0.11.0"` of package `proj v0.1.0 (/Users/xxxxxx.xxxxxx/Desktop/xxxxxx/yyy/proj)`

failed to select a version for `tokio` which could resolve this conflict
a
my axum is currently on 6.1 and works - maybe try a downgrade?
g
Looks like you are using a higher version of tokio than 1.22, try
tokio = "1"
in your project, so that cargo can choose an optimal version
a
tokio pinning is still an issue at the moment but there should be some changes coming at some point
d
downgrading axum to 0.6.1 works.
axum = "0.6.9" also works
Then I guess the code snippet should also be updated on shutlle side. until the tokio issue is fixed.
g
I checked their dependencies. Axum 0.6.10 went from tokio 1.21 -> 1.25, which makes it incompatible with shuttle atm. So go for 0.6.9 🙂
a
it looks like this is already a known issue on gh but I've let the engineering team know this is starting to become slightly more common
a
another n=1 data point: I also encountered this today (when creating a new axum project w/ shuttle), and this thread helped troubleshoot and solve by downgrading the version 👌
9 Views