https://linen.dev logo
Shuttle depending on a specific (and old) version ...
# help
s
Tokio is a runtime that is used by a lot of projects, shuttle restricting the version of it could be extremely problematic. Example I'm trying to deal with:
Copy code
toml
[dependencies]
shuttle-service = { version = "0.6.0" }
log = "0.4.17"
poise = { version = "0.4.1" }
shuttle-shared-db = { version = "0.6.0", features = ["postgres"] }
sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] }
shuttle-secrets = { version = "0.6.0" }
error
Copy code
text
error: failed to select a version for `tokio`.
    ... required by package `poise v0.4.1`
    ... which satisfies dependency `poise = "^0.4.1"` of package `rorschach v0.1.0 (/home/czar/work/rust/rorschach)`
versions that meet the requirements `^1.21.1` are: 1.21.2, 1.21.1

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.6.0`
    ... which satisfies dependency `shuttle-service = "^0.6.0"` of package `rorschach v0.1.0 (/home/czar/work/rust/rorschach)`

failed to select a version for `tokio` which could resolve this conflict
s
Oh, yes agreed. I know one of the next big things we are planning to rewrite in shuttle (the cdylib part to be specific) will allow us to get rid of this restriction. Here is some context for why it currently exists https://github.com/shuttle-hq/shuttle/pull/348
s
I see. So, until then some libraries/frameworks will be unusable with shuttle if they depend on a different version of Tokio?
s
Well, they just won't compile I guess
s
yeah, okay, for now it isn't end of the world for me, I can use Serenity directly, without Poise. It's a small bot I'm writing.
s
ohh i met this issue some weeks ago, just thought only me lol