https://linen.dev logo
cargo shuttle init --axum uses invalid tokio versi...
# help
n
following quick start with
cargo shuttle init --axum hello-world
followed by
cargo shuttle project new
causes:
Copy code
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: CargoMetadata { stderr: "    Updating crates.io index\nerror: failed to select a version for `tokio`.\n    ... required by package `axum v0.6.1`\n    ... which satisfies dependency `axum = \"^0.6.1\"` of package `hello-world v0.1.0 
`\nversions that meet the requirements `^1.21` are: 1.23.0, 1.22.0, 1.21.2, 1.21.1, 1.21.0\n\nall possible versions conflict with previously selected packages.\n\n  previously selected package `tokio v1.20.1`\n    ... which satisfies dependency `tokio = \"=1.20.1\"` of package `shuttle-service v0.7.2`\n    ... which satisfies dependency `shuttle-service = \"^0.7.2\"` of package `hello-world v0.1.0 `\n\nfailed to select a version for `tokio` which could resolve this conflict\n" }', 
cargo-shuttle-0.7.2/src/config.rs:239:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
k
Ah yes, this is a bug on our end: . You should be fine for now if you set axum to version
0.5
, since that uses tokio 1.20.1. We are upgrading to axum 0.6 in our upcoming release, as well as tokio 1.22. Sorry about this!
n
Thank you @kind-area-3810 . Should I delete this post?
k
No worries Hudson! I think this thread can be useful for other users as well, maybe you could rename the title to something like "cargo shuttle init --axum uses invalid tokio version"?