From 18231cec6178abb65c94de38150ce90614c00794 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 17 Jan 2025 12:45:44 +0800 Subject: [PATCH 1/3] chore(core): Avoid using mongodb 3.2.0 Signed-off-by: Xuanwo --- core/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index f75fb8d8cb58..d9389fabc82f 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -308,7 +308,8 @@ mini-moka = { version = "0.10", optional = true } # for services-moka moka = { version = "0.12", optional = true, features = ["future", "sync"] } # for services-mongodb -mongodb = { version = "3", optional = true } +# mongodb has known issues on 3.2.0: https://github.com/mongodb/mongo-rust-driver/issues/1287 +mongodb = { version = ">=3,<3.2.0", optional = true } # for services-sftp openssh = { version = "0.11.0", optional = true } openssh-sftp-client = { version = "0.15.2", optional = true, features = [ From 1982448e956330b78ad190bcfe174667a300fbc1 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 17 Jan 2025 12:54:30 +0800 Subject: [PATCH 2/3] Fix mongo Signed-off-by: Xuanwo --- core/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/core/Cargo.toml b/core/Cargo.toml index d9389fabc82f..3f62eeb21e6f 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -310,6 +310,7 @@ moka = { version = "0.12", optional = true, features = ["future", "sync"] } # for services-mongodb # mongodb has known issues on 3.2.0: https://github.com/mongodb/mongo-rust-driver/issues/1287 mongodb = { version = ">=3,<3.2.0", optional = true } +mongodb-internal-macros = { version = ">=3,<3.2.0", optional = true } # for services-sftp openssh = { version = "0.11.0", optional = true } openssh-sftp-client = { version = "0.15.2", optional = true, features = [ From a3ec6888185b80571efe3811d3311f45c2764049 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 17 Jan 2025 13:03:49 +0800 Subject: [PATCH 3/3] Fix build Signed-off-by: Xuanwo --- core/Cargo.toml | 134 ++++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index 3f62eeb21e6f..600b51303931 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -56,16 +56,16 @@ default = ["reqwest/rustls-tls", "executors-tokio", "services-memory"] # # You should never enable this feature unless you are developing opendal. tests = [ - "dep:rand", - "dep:sha2", - "dep:dotenvy", - "layers-blocking", - "services-azblob", - "services-fs", - "services-http", - "services-memory", - "internal-tokio-rt", - "services-s3", + "dep:rand", + "dep:sha2", + "dep:dotenvy", + "layers-blocking", + "services-azblob", + "services-fs", + "services-http", + "services-memory", + "internal-tokio-rt", + "services-s3", ] # Enable path cache. @@ -109,20 +109,20 @@ services-aliyun-drive = [] services-alluxio = [] services-atomicserver = ["dep:atomic_lib"] services-azblob = [ - "dep:sha2", - "dep:reqsign", - "reqsign?/services-azblob", - "reqsign?/reqwest_request", + "dep:sha2", + "dep:reqsign", + "reqsign?/services-azblob", + "reqsign?/reqwest_request", ] services-azdls = [ - "dep:reqsign", - "reqsign?/services-azblob", - "reqsign?/reqwest_request", + "dep:reqsign", + "reqsign?/services-azblob", + "reqsign?/reqwest_request", ] services-azfile = [ - "dep:reqsign", - "reqsign?/services-azblob", - "reqsign?/reqwest_request", + "dep:reqsign", + "reqsign?/services-azblob", + "reqsign?/reqwest_request", ] services-b2 = [] services-cacache = ["dep:cacache"] @@ -130,9 +130,9 @@ services-chainsafe = [] services-cloudflare-kv = [] services-compfs = ["dep:compio"] services-cos = [ - "dep:reqsign", - "reqsign?/services-tencent", - "reqsign?/reqwest_request", + "dep:reqsign", + "reqsign?/services-tencent", + "reqsign?/reqwest_request", ] services-d1 = [] services-dashmap = ["dep:dashmap"] @@ -143,14 +143,14 @@ services-foundationdb = ["dep:foundationdb"] services-fs = ["tokio/fs", "internal-tokio-rt"] services-ftp = ["dep:suppaftp", "dep:bb8", "dep:async-tls"] services-gcs = [ - "dep:reqsign", - "reqsign?/services-google", - "reqsign?/reqwest_request", + "dep:reqsign", + "reqsign?/services-google", + "reqsign?/reqwest_request", ] services-gdrive = ["internal-path-cache"] services-ghac = [] services-github = [] -services-gridfs = ["dep:mongodb"] +services-gridfs = ["dep:mongodb", "dep:mongodb-internal-macros"] services-hdfs = ["dep:hdrs"] services-hdfs-native = ["hdfs-native"] services-http = [] @@ -165,20 +165,20 @@ services-memcached = ["dep:bb8"] services-memory = [] services-mini-moka = ["dep:mini-moka"] services-moka = ["dep:moka"] -services-mongodb = ["dep:mongodb"] +services-mongodb = ["dep:mongodb", "dep:mongodb-internal-macros"] services-monoiofs = ["dep:monoio", "dep:flume"] services-mysql = ["dep:sqlx", "sqlx?/mysql"] services-nebula-graph = ["dep:rust-nebula", "dep:bb8", "dep:snowflaked"] services-obs = [ - "dep:reqsign", - "reqsign?/services-huaweicloud", - "reqsign?/reqwest_request", + "dep:reqsign", + "reqsign?/services-huaweicloud", + "reqsign?/reqwest_request", ] services-onedrive = [] services-oss = [ - "dep:reqsign", - "reqsign?/services-aliyun", - "reqsign?/reqwest_request", + "dep:reqsign", + "reqsign?/services-aliyun", + "reqsign?/reqwest_request", ] services-pcloud = [] services-persy = ["dep:persy", "internal-tokio-rt"] @@ -188,10 +188,10 @@ services-redis = ["dep:redis", "dep:bb8", "redis?/tokio-rustls-comp"] services-redis-native-tls = ["services-redis", "redis?/tokio-native-tls-comp"] services-rocksdb = ["dep:rocksdb", "internal-tokio-rt"] services-s3 = [ - "dep:reqsign", - "reqsign?/services-aws", - "reqsign?/reqwest_request", - "dep:crc32c", + "dep:reqsign", + "reqsign?/services-aws", + "reqsign?/reqwest_request", + "dep:crc32c", ] services-seafile = [] services-sftp = ["dep:openssh", "dep:openssh-sftp-client", "dep:bb8"] @@ -237,12 +237,12 @@ backon = { version = "1.2", features = ["tokio-sleep"] } base64 = "0.22" bytes = "1.6" chrono = { version = "0.4.28", default-features = false, features = [ - "clock", - "std", + "clock", + "std", ] } futures = { version = "0.3", default-features = false, features = [ - "std", - "async-await", + "std", + "async-await", ] } http = "1.1" log = "0.4" @@ -252,7 +252,7 @@ once_cell = "1" percent-encoding = "2" quick-xml = { version = "0.36", features = ["serialize", "overlapped-lists"] } reqwest = { version = "0.12.2", features = [ - "stream", + "stream", ], default-features = false } serde = { version = "1", features = ["derive"] } serde_json = "1" @@ -272,7 +272,7 @@ prost = { version = "0.13", optional = true } sha1 = { version = "0.10.6", optional = true } sha2 = { version = "0.10", optional = true } sqlx = { version = "0.8.0", features = [ - "runtime-tokio-rustls", + "runtime-tokio-rustls", ], optional = true } # For http based services. @@ -285,8 +285,8 @@ ouroboros = { version = "0.18.4", optional = true } atomic_lib = { version = "0.39.0", optional = true } # for services-cacache cacache = { version = "13.0", default-features = false, features = [ - "tokio-runtime", - "mmap", + "tokio-runtime", + "mmap", ], optional = true } # for services-dashmap dashmap = { version = "6", optional = true } @@ -294,8 +294,8 @@ dashmap = { version = "6", optional = true } etcd-client = { version = "0.14", optional = true, features = ["tls"] } # for services-foundationdb foundationdb = { version = "0.9.0", features = [ - "embedded-fdb-include", - "fdb-7_3", + "embedded-fdb-include", + "fdb-7_3", ], optional = true } # for services-hdfs hdrs = { version = "0.3.2", optional = true, features = ["async_file"] } @@ -314,8 +314,8 @@ mongodb-internal-macros = { version = ">=3,<3.2.0", optional = true } # for services-sftp openssh = { version = "0.11.0", optional = true } openssh-sftp-client = { version = "0.15.2", optional = true, features = [ - "openssh", - "tracing", + "openssh", + "tracing", ] } # for services-persy persy = { version = "1.4.6", optional = true } @@ -323,9 +323,9 @@ persy = { version = "1.4.6", optional = true } redb = { version = "2", optional = true } # for services-redis redis = { version = "0.27", features = [ - "cluster-async", - "tokio-comp", - "connection-manager", + "cluster-async", + "tokio-comp", + "connection-manager", ], optional = true } # for services-rocksdb rocksdb = { version = "0.21.0", default-features = false, optional = true } @@ -333,9 +333,9 @@ rocksdb = { version = "0.21.0", default-features = false, optional = true } sled = { version = "0.34.7", optional = true } # for services-ftp suppaftp = { version = "6.0.3", default-features = false, features = [ - "async-secure", - "rustls", - "async-rustls", + "async-secure", + "rustls", + "async-rustls", ], optional = true } # for services-tikv tikv-client = { version = "0.3.0", optional = true, default-features = false } @@ -345,10 +345,10 @@ hdfs-native = { version = "0.10", optional = true } surrealdb = { version = "2", optional = true, features = ["protocol-http"] } # for services-compfs compio = { version = "0.12.0", optional = true, features = [ - "runtime", - "bytes", - "polling", - "dispatcher", + "runtime", + "bytes", + "polling", + "dispatcher", ] } # for services-s3 crc32c = { version = "0.6.6", optional = true } @@ -358,10 +358,10 @@ snowflaked = { version = "1", optional = true, features = ["sync"] } # for services-monoiofs flume = { version = "0.11", optional = true } monoio = { version = "0.2.4", optional = true, features = [ - "sync", - "mkdirat", - "unlinkat", - "renameat", + "sync", + "mkdirat", + "unlinkat", + "renameat", ] } # Layers @@ -400,7 +400,7 @@ fastrace = { version = "0.7", features = ["enable"] } fastrace-jaeger = "0.7" libtest-mimic = "0.8" opentelemetry = { version = "0.27", default-features = false, features = [ - "trace", + "trace", ] } opentelemetry-otlp = "0.27" opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] } @@ -411,6 +411,6 @@ size = "0.4" tokio = { version = "1.27", features = ["fs", "macros", "rt-multi-thread"] } tracing-opentelemetry = "0.28.0" tracing-subscriber = { version = "0.3", features = [ - "env-filter", - "tracing-log", + "env-filter", + "tracing-log", ] }