Unable to compile due to reimport of tokio #4832
-
I am having a reimport of tokio in my repository and hence unable to compile the project. I am not sure how should I resolve it. Working repository: https://github.com/casbin-rs/examples I figured out that I was having a version difference of tokio in actix-casbin and actix-casbin-auth. As a temporary resolve I updated the version to 1.19 and used a local patch to check before pushing it to main repository. Still I am getting the following error and not sure how to resolve this. The Cargo.toml looks like:
[dependencies]
http = "0.2.1"
actix = "0.13.0"
actix-rt = "2.7.0"
actix-web = "4.1.0"
actix-service = "2.0.2"
actix-cors = "0.6.1"
futures = "0.3.5"
failure = "0.1.8"
serde = "1.0.116"
serde_derive = "1.0.116"
serde_json = "1.0.57"
derive_more = "0.99.10"
chrono = { version = "0.4.18", features = ["serde"] }
diesel = { version = "1.4.5", features = ["postgres","r2d2", "chrono"] }
diesel_migrations = "1.4.0"
dotenv = "0.15.0"
env_logger = "0.9.0"
log = "0.4.11"
jsonwebtoken = "8.1.0"
bcrypt = "0.13.0"
csv = "1.1.3"
walkdir = "2.3.1"
diesel-adapter = { version = "0.9.0", default-features = false, features = ["postgres","runtime-async-std"] }
uuid = {version = "1.1.2", features = ["v4"] }
[patch.crates-io]
actix-casbin= {path = "/home/siddhesh/Desktop/Siddhesh/Casbin/casbin-rs_Actix/actix-casbin", default-features = false, features = [ "runtime-async-std" ]}
actix-casbin-auth = {path = "/home/siddhesh/Desktop/Siddhesh/Casbin/actix-casbin-auth/actix-casbin-auth", default-features = false, features = [ "runtime-async-std" ]}
[dependencies]
actix-web = "4.1.0"
actix-rt = "2.7.0"
casbin = "2.0.9"
dotenv = "0.15"
loge = {version = "0.4", default-features = false, features = ["colored", "chrono"]}
[dependencies]
casbin = "2.0.9"
diesel-adapter = { version = "0.9.0", features = ["postgres"] }
async-std = { version = "1.6", features = ["attributes"] }
diesel = { version = "1.4", features = ["postgres", "serde_json", "r2d2"] }
actix-web = { version = "4.1.0" }
actix-rt = "2.7.0"
serde = "1.0"
serde_derive = "1.0"
dotenv = "0.15"
env_logger = "0.9"
futures = "0.3"
log = "0.4"
[dependencies]
ntex = { version = "0.5", features = ["tokio"] }
casbin = "2.0.9"
dotenv = "0.15"
loge = {version = "0.4.2", default-features = false, features = ["colored", "chrono"]} The exact error I am getting is:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It sounds like you've tried to enable both the Tokio and async-std feature of casbin. You can't do that. |
Beta Was this translation helpful? Give feedback.
It sounds like you've tried to enable both the Tokio and async-std feature of casbin. You can't do that.