From 99ddb2d0fb7558879355d510f96b7243c769da82 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Sun, 31 Dec 2023 10:35:36 +0000 Subject: [PATCH] ci: format and use `--all-targets` to detect used deps (#1388) --- .github/workflows/main.yml | 2 +- .github/workflows/pull_request.yml | 2 +- Cargo.lock | 176 +---------------------------- crates/biome_lsp/Cargo.toml | 5 +- xtask/bench/Cargo.toml | 12 +- xtask/libs_bench/Cargo.toml | 14 +-- 6 files changed, 20 insertions(+), 191 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7f1eec98c10..51ad8d048544 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,7 +63,7 @@ jobs: - name: Install udeps run: cargo install cargo-udeps --locked - name: Run udeps - run: cargo +nightly udeps + run: cargo +nightly udeps --all-targets test: name: Test diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index c534696184f7..b2c7a5565f05 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -63,7 +63,7 @@ jobs: - name: Install udeps run: cargo install cargo-udeps --locked - name: Detect unused dependencies using udeps - run: cargo +nightly udeps + run: cargo +nightly udeps --all-targets test: name: Test diff --git a/Cargo.lock b/Cargo.lock index ec894faca589..e62d7fa985fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -642,7 +642,6 @@ dependencies = [ "biome_text_edit", "futures", "indexmap", - "proptest", "rustc-hash", "serde", "serde_json", @@ -841,21 +840,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -1346,17 +1330,6 @@ dependencies = [ "regex", ] -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.2" @@ -1405,15 +1378,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d922f481ae01f2a3f1fff7b9e0e789f18f0c755a38ec983a3e6f37762cdcc2a2" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "filetime" version = "0.2.20" @@ -1764,15 +1728,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-lifetimes" version = "1.0.6" @@ -1791,7 +1746,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.2", "io-lifetimes", - "rustix 0.37.7", + "rustix", "windows-sys 0.48.0", ] @@ -1864,12 +1819,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "libm" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" - [[package]] name = "libmimalloc-sys" version = "0.1.30" @@ -1909,12 +1858,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2085,7 +2028,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -2295,27 +2237,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proptest" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" -dependencies = [ - "bit-set", - "bitflags 1.3.2", - "byteorder", - "lazy_static", - "num-traits", - "quick-error 2.0.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.6.28", - "rusty-fork", - "tempfile", - "unarray", -] - [[package]] name = "pulldown-cmark" version = "0.9.2" @@ -2337,18 +2258,6 @@ dependencies = [ "unreachable", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quickcheck" version = "1.0.3" @@ -2388,7 +2297,7 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ "getrandom 0.1.16", "libc", - "rand_chacha 0.2.2", + "rand_chacha", "rand_core 0.5.1", "rand_hc", ] @@ -2399,8 +2308,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "libc", - "rand_chacha 0.3.1", "rand_core 0.6.4", ] @@ -2414,16 +2321,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_core" version = "0.5.1" @@ -2451,15 +2348,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "rayon" version = "1.7.0" @@ -2617,20 +2505,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustix" -version = "0.36.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" -dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", -] - [[package]] name = "rustix" version = "0.37.7" @@ -2638,10 +2512,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" dependencies = [ "bitflags 1.3.2", - "errno 0.3.2", + "errno", "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", + "linux-raw-sys", "windows-sys 0.45.0", ] @@ -2677,18 +2551,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error 1.2.3", - "tempfile", - "wait-timeout", -] - [[package]] name = "ryu" version = "1.0.13" @@ -2947,19 +2809,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "tempfile" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall 0.2.16", - "rustix 0.36.9", - "windows-sys 0.42.0", -] - [[package]] name = "termcolor" version = "1.2.0" @@ -3310,12 +3159,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - [[package]] name = "ungrammar" version = "1.16.1" @@ -3451,15 +3294,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - [[package]] name = "walkdir" version = "2.4.0" @@ -3861,8 +3695,6 @@ dependencies = [ name = "xtask_libs_bench" version = "0.0.0" dependencies = [ - "biome_js_analyze", - "case", "criterion 0.4.0", "fastbloom-rs", "fst", diff --git a/crates/biome_lsp/Cargo.toml b/crates/biome_lsp/Cargo.toml index 9930b9948459..b0c487c72af3 100644 --- a/crates/biome_lsp/Cargo.toml +++ b/crates/biome_lsp/Cargo.toml @@ -34,9 +34,8 @@ tower-lsp = { version = "0.19.0" } tracing = { workspace = true, features = ["attributes"] } [dev-dependencies] -proptest = "1.0.0" -tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] } -tower = { version = "0.4.12", features = ["timeout"] } +tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] } +tower = { version = "0.4.12", features = ["timeout"] } [lints] workspace = true diff --git a/xtask/bench/Cargo.toml b/xtask/bench/Cargo.toml index 007941a86da0..6512a95336bb 100644 --- a/xtask/bench/Cargo.toml +++ b/xtask/bench/Cargo.toml @@ -23,12 +23,12 @@ biome_parser = { workspace = true } biome_rowan = { workspace = true } -ansi_rgb = "0.2.0" -criterion = "0.5.1" -regex = "1.5.5" -ureq = "2.7.1" -url = "2.2.2" -codspeed-criterion-compat = { version = "2.3.3", optional = true} +ansi_rgb = "0.2.0" +codspeed-criterion-compat = { version = "2.3.3", optional = true } +criterion = "0.5.1" +regex = "1.5.5" +ureq = "2.7.1" +url = "2.2.2" countme = { workspace = true } diff --git a/xtask/libs_bench/Cargo.toml b/xtask/libs_bench/Cargo.toml index b9ddef603da6..01e5638110e3 100644 --- a/xtask/libs_bench/Cargo.toml +++ b/xtask/libs_bench/Cargo.toml @@ -8,14 +8,12 @@ version = "0.0.0" regex = { version = "1.6.0" } [dev-dependencies] -biome_js_analyze = { workspace = true } -case = "1.0.0" -criterion = "0.4.0" -fastbloom-rs = "0.3.0" -fst = "0.4.7" -iai = "0.1.1" -memchr = "2.5.0" -qp-trie = "0.8.0" +criterion = "0.4.0" +fastbloom-rs = "0.3.0" +fst = "0.4.7" +iai = "0.1.1" +memchr = "2.5.0" +qp-trie = "0.8.0" [[bench]] harness = false