From c15a80972dd134840a31582c5c0d9f1615693ce5 Mon Sep 17 00:00:00 2001 From: Vipul Vaibhaw Date: Mon, 8 Jul 2024 21:29:22 +0530 Subject: [PATCH] add cargo machete to remove udeps --- .github/actions/rust-test/action.yaml | 6 +++ native/Cargo.lock | 74 ++------------------------- native/core/Cargo.toml | 7 --- 3 files changed, 10 insertions(+), 77 deletions(-) diff --git a/.github/actions/rust-test/action.yaml b/.github/actions/rust-test/action.yaml index b543bcf00..3aeba0666 100644 --- a/.github/actions/rust-test/action.yaml +++ b/.github/actions/rust-test/action.yaml @@ -37,6 +37,12 @@ runs: cd native cargo check --benches + - name: Check unused dependencies + shell: bash + run: | + cd native + cargo install cargo-machete && cargo machete + - name: Cache Maven dependencies uses: actions/cache@v4 with: diff --git a/native/Cargo.lock b/native/Cargo.lock index ccb6433d9..6136e0339 100644 --- a/native/Cargo.lock +++ b/native/Cargo.lock @@ -843,11 +843,9 @@ dependencies = [ "arrow-buffer", "arrow-data", "arrow-schema", - "arrow-string", "assertables", "async-trait", "brotli", - "byteorder", "bytes", "chrono", "chrono-tz 0.8.6", @@ -862,7 +860,6 @@ dependencies = [ "flate2", "futures", "half", - "hashbrown", "hex", "itertools 0.11.0", "jni", @@ -873,9 +870,7 @@ dependencies = [ "mimalloc", "num", "once_cell", - "parking_lot", "parquet", - "parquet-format", "paste", "pprof", "prost 0.12.6", @@ -887,9 +882,7 @@ dependencies = [ "snap", "tempfile", "thiserror", - "thrift 0.17.0", "tokio", - "tokio-stream", "twox-hash", "unicode-segmentation", "zstd", @@ -1500,12 +1493,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "integer-encoding" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48dc51180a9b377fd75814d0cc02199c20f8e99433d6762f650d39cdbbd3b56f" - [[package]] name = "integer-encoding" version = "3.0.4" @@ -1994,15 +1981,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "ordered-float" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-float" version = "2.10.1" @@ -2049,19 +2027,10 @@ dependencies = [ "num-bigint", "paste", "seq-macro", - "thrift 0.17.0", + "thrift", "twox-hash", ] -[[package]] -name = "parquet-format" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0c06cdcd5460967c485f9c40a821746f5955ad81990533c7fae95dbd9bc0b5" -dependencies = [ - "thrift 0.13.0", -] - [[package]] name = "parse-zoneinfo" version = "0.3.1" @@ -2486,7 +2455,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ - "ordered-float 2.10.1", + "ordered-float", "serde", ] @@ -2745,28 +2714,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "thrift" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6d965454947cc7266d22716ebfd07b18d84ebaf35eec558586bbb2a8cb6b5b" -dependencies = [ - "byteorder", - "integer-encoding 1.1.7", - "log", - "ordered-float 1.1.1", - "threadpool", -] - [[package]] name = "thrift" version = "0.17.0" @@ -2774,10 +2721,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" dependencies = [ "byteorder", - "integer-encoding 3.0.4", - "log", - "ordered-float 2.10.1", - "threadpool", + "integer-encoding", + "ordered-float", ] [[package]] @@ -2838,17 +2783,6 @@ dependencies = [ "syn 2.0.68", ] -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - [[package]] name = "tracing" version = "0.1.40" diff --git a/native/core/Cargo.toml b/native/core/Cargo.toml index c3e924a44..bd0a3d5e4 100644 --- a/native/core/Cargo.toml +++ b/native/core/Cargo.toml @@ -32,19 +32,16 @@ include = [ ] [dependencies] -parquet-format = "4.0.0" # This must be kept in sync with that from parquet crate arrow = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1", features = ["prettyprint", "ffi", "chrono-tz"] } arrow-array = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1" } arrow-buffer = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1" } arrow-data = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1" } arrow-schema = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1" } -arrow-string = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1" } parquet = { git = "https://github.com/apache/arrow-rs.git", rev = "0a4d8a1", default-features = false, features = ["experimental"] } half = { version = "2.4.1", default-features = false } futures = "0.3.28" mimalloc = { version = "*", default-features = false, optional = true } tokio = { version = "1", features = ["rt-multi-thread"] } -tokio-stream = { version = "0.1.8" } async-trait = "0.1" log = "0.4" log4rs = "1.2.0" @@ -52,9 +49,7 @@ thiserror = "1" serde = { version = "1", features = ["derive"] } lazy_static = "1.4.0" prost = "0.12.1" -thrift = "0.17" jni = "0.21" -byteorder = "1.4.3" snap = "1.1" brotli = "3.3" flate2 = "1.0" @@ -63,8 +58,6 @@ zstd = "0.11" rand = "0.8" num = "0.4" bytes = "1.5.0" -hashbrown = { version = "0.14", features = ["raw"] } -parking_lot = "0.12" tempfile = "3.8.0" ahash = { version = "0.8", default-features = false } itertools = "0.11.0"