https://linen.dev logo
shuttle-created axum project tokio version mismatc...
# help
s
Copy code
text
; cargo +1.63 shuttle init --axum
     Created library (shuttle) package

; cargo +1.63 --locked shuttle run
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: CargoMetadata { stderr: "    Updating crates.io index
error: failed to select a version for `tokio`.
    ... required by package `axum v0.6.1`
    ... which satisfies dependency `axum = \"^0.6.1\"` of package `segf v0.1.0 (/home/czar/work/rust/segf)`
versions that meet the requirements `^1.21` are: 1.22.0, 1.21.2, 1.21.1, 1.21.0

all possible versions conflict with previously selected packages.

  previously selected package `tokio v1.20.1`
    ... which satisfies dependency `tokio = \"=1.20.1\"` of package `shuttle-service v0.7.2`
    ... which satisfies dependency `shuttle-service = \"^0.7.2\"` of package `segf v0.1.0 (/home/czar/work/rust/segf)`

failed to select a version for `tokio` which could resolve this conflict
" }', /home/czar/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-shuttle-0.7.2/src/config.rs:239:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
k
Hey Czar! We're currently on axum 0.5, and we have tokio pinned to 1.20 (for context: ). However, we're currently working on upgrading our deps as well as tokio, both of which should be ready for our next release.
s
Yes, I know that, the issue is that the project is generated by Shuttle, I'm trying to run it without any modification from my side. So it looks like shuttle generates invalid projects.
k
Oh, indeed! 🤦
So our init code fetches the latest versions from crates.io, this is something we should look into refactoring as long as we require users to use the same versions as us. Thanks for pointing it out!
s