Skip to content

Commit 450fbfa

Browse files
authored
feat: add cargo-machete in CI (#18030)
* feat: add detect-unused-dependencies job and configure cargo-machete * fix: Avoid three-party action * chore * feat: Lock cargo-machete version
1 parent 556eb9b commit 450fbfa

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

.github/workflows/dependencies.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,14 @@ jobs:
5656
run: |
5757
cd dev/depcheck
5858
cargo run
59+
60+
detect-unused-dependencies:
61+
runs-on: ubuntu-latest
62+
container:
63+
image: amd64/rust
64+
steps:
65+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
66+
- name: Install cargo-machete
67+
run: cargo install cargo-machete --version ^0.9 --locked
68+
- name: Detect unused dependencies
69+
run: cargo machete --with-metadata

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/catalog-listing/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ datafusion-expr = { workspace = true }
4141
datafusion-physical-expr = { workspace = true }
4242
datafusion-physical-expr-common = { workspace = true }
4343
datafusion-physical-plan = { workspace = true }
44-
datafusion-session = { workspace = true }
4544
futures = { workspace = true }
4645
log = { workspace = true }
4746
object_store = { workspace = true }

datafusion/core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ sysinfo = "0.37.1"
182182
test-utils = { path = "../../test-utils" }
183183
tokio = { workspace = true, features = ["rt-multi-thread", "parking_lot", "fs"] }
184184

185+
[package.metadata.cargo-machete]
186+
ignored = ["datafusion-doc", "datafusion-macros", "dashmap"]
187+
185188
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
186189
nix = { version = "0.30.1", features = ["fs"] }
187190

datafusion/wasmtest/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ object_store = { workspace = true }
6161
tokio = { workspace = true }
6262
url = { workspace = true }
6363
wasm-bindgen-test = "0.3.54"
64+
65+
[package.metadata.cargo-machete]
66+
ignored = ["chrono", "getrandom"]

0 commit comments

Comments
 (0)