You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a workspace project. In one of the sub-projects, I'm already using sqlx and tokio:
casbin = "2.0.2"sqlx = {version = "0.5", features = ["json", "offline", "postgres", "runtime-tokio-rustls", "chrono"]}
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
...
I then add sqlx-adapter to Cargo.toml:
casbin = "2.0.2"sqlx = {version = "0.5", features = ["json", "offline", "postgres", "runtime-tokio-rustls", "chrono"]}
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
sqlx-adapter = { version = "0.4.1", features = ["postgres"] }
And try to compile:
➜ git:(master) ✗ cargo check
Compiling sqlx-rt v0.5.5
Checking casbin v2.0.7
error: only one of ['runtime-actix-native-tls', 'runtime-async-std-native-tls', 'runtime-tokio-native-tls', 'runtime-actix-rustls', 'runtime-async-std-rustls', 'runtime-tokio-rustls'] can be enabled
--> /home/mkpankov/.cargo/registry/src/github.com-1ecc6299db9ec823/sqlx-rt-0.5.5/src/lib.rs:21:1
|
21 | / compile_error!(
22 | | "only one of ['runtime-actix-native-tls', 'runtime-async-std-native-tls', \
23 | | 'runtime-tokio-native-tls', 'runtime-actix-rustls', 'runtime-async-std-rustls', \
24 | | 'runtime-tokio-rustls'] can be enabled"
25 | | );
| |__^
error: aborting due to previous error
error: could not compile `sqlx-rt`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
Using sqlx-adapter = { version = "0.4.2", default-features = false, features = ["postgres", "runtime-tokio-rustls"] } fixed my issue, the key point is default-features = false.
I have a workspace project. In one of the sub-projects, I'm already using
sqlx
andtokio
:I then add
sqlx-adapter
toCargo.toml
:And try to compile:
There's following diff in the
Cargo.lock
:It looks like there are hardcoded
sqlx
features in thesqlx-adapter
that collide with features I'm using.The text was updated successfully, but these errors were encountered: