From f70cea60a0bdf446e44fb7a736ced86933d76c2f Mon Sep 17 00:00:00 2001 From: flupkede Date: Tue, 15 Sep 2026 21:19:15 +0200 Subject: [PATCH] =?UTF-8?q?[worker]=20fase=20D8:=20klein=20goed-batch=20?= =?UTF-8?q?=E2=80=94=20dirs=207,=20sha2=200.11,=20scip=200.10,=20sysinfo?= =?UTF-8?q?=200.39;=20tower/tower-http=20direct=20deps=20verwijderd=20(doo?= =?UTF-8?q?d)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sha2 0.11: digest arrays implen LowerHex niet meer — twee hex-sites encoderen expliciet (output ongewijzigd). dirs/scip/sysinfo drop-in. tower + tower-http waren nergens geïmporteerd: directe entries weg (blijven transitief via axum/reqwest/hf-hub). Validation: fmt + clippy -D warnings + 1386 tests green. --- CHANGELOG.md | 2 + Cargo.lock | 154 +++++++++++++---------------------------- Cargo.toml | 10 ++- src/cache/file_meta.rs | 7 +- src/chunker/mod.rs | 7 +- 5 files changed, 68 insertions(+), 112 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d41692d6..b81d87bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,8 @@ finalized in place with a date — no renaming/migration step needed. - **tree-sitter 0.26 → 0.27, tree-sitter-proto 0.4 → 0.6.** Zero call-site changes — the chunker sits on the stable `Parser`/`Language` surface and grammars load through the ABI-stable `LANGUAGE.into()` (`tree-sitter-language`) route, so all 17 grammar crates stay pinned while the core moves a major. +- **Small majors batch: dirs 7, sha2 0.11, scip 0.10, sysinfo 0.39; dead `tower`/`tower-http` direct deps removed.** dirs/scip/sysinfo were drop-in. sha2 0.11's digest arrays no longer implement `LowerHex`, so the two hash-to-hex sites (`file_meta.rs`, `chunker/mod.rs`) hex-encode the digest bytes explicitly — output unchanged. `tower` and `tower-http` were declared as direct dependencies but never imported anywhere (CORS/trace middleware never wired in); removing them shrinks the direct dependency surface (both remain in the lock transitively via axum/reqwest/hf-hub, which is upstream's business). + ## [1.3.19] ### Changed diff --git a/Cargo.lock b/Cargo.lock index 0b68f309..34ebd1d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,7 +727,7 @@ dependencies = [ "crossterm", "ctrlc", "dashmap", - "dirs 5.0.1", + "dirs 7.0.0", "fastembed", "fs2", "heed", @@ -754,15 +754,13 @@ dependencies = [ "serde", "serde_json", "serial_test", - "sha2 0.10.9", - "sysinfo", + "sha2 0.11.0", + "sysinfo 0.39.6", "tantivy", "tempfile", "thiserror 2.0.20", "tokio", "tokio-util", - "tower", - "tower-http", "tracing", "tracing-appender", "tracing-subscriber", @@ -1379,34 +1377,22 @@ dependencies = [ "crypto-common 0.2.2", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", -] - [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys 0.5.0", + "dirs-sys", ] [[package]] -name = "dirs-sys" -version = "0.4.1" +name = "dirs" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" dependencies = [ - "libc", - "option-ext", - "redox_users 0.4.6", - "windows-sys 0.48.0", + "dirs-sys", ] [[package]] @@ -1417,7 +1403,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users 0.5.2", + "redox_users", "windows-sys 0.61.2", ] @@ -3446,6 +3432,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.13.2", + "dispatch2", + "objc2", ] [[package]] @@ -3454,6 +3442,16 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "objc2", +] + [[package]] name = "objc2-io-kit" version = "0.3.2" @@ -3464,6 +3462,17 @@ dependencies = [ "objc2-core-foundation", ] +[[package]] +name = "objc2-open-directory" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb82bed227edf5201dfedf072bba4015a33d3d4a98519837295a90f0a23f676d" +dependencies = [ + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + [[package]] name = "objc2-system-configuration" version = "0.3.2" @@ -4420,17 +4429,6 @@ dependencies = [ "bitflags 2.13.2", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 1.0.69", -] - [[package]] name = "redox_users" version = "0.5.2" @@ -4861,9 +4859,9 @@ dependencies = [ [[package]] name = "scip" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a72133c2d6fd45c9a3a343bcb3db2faa30f68f0919bfa3370ca85add5460c3" +checksum = "d7f651fbd0f98742a47b58623a7bcfd8fad14455912689e4867a1f43ee7e02c6" dependencies = [ "protobuf", ] @@ -5343,6 +5341,21 @@ dependencies = [ "windows", ] +[[package]] +name = "sysinfo" +version = "0.39.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "objc2-open-directory", + "windows", +] + [[package]] name = "system-configuration" version = "0.7.0" @@ -5901,7 +5914,6 @@ dependencies = [ "tower", "tower-layer", "tower-service", - "tracing", "url", ] @@ -6850,15 +6862,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -6895,21 +6898,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -6952,12 +6940,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -6970,12 +6952,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -6988,12 +6964,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -7018,12 +6988,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -7036,12 +7000,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -7054,12 +7012,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -7072,12 +7024,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -7230,7 +7176,7 @@ dependencies = [ "serde", "serde_json", "shellexpand", - "sysinfo", + "sysinfo 0.38.4", "thiserror 2.0.20", "tokio", "tokio-util", diff --git a/Cargo.toml b/Cargo.toml index 6e441417..292e6d81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,8 +72,6 @@ regex = "1.12" # Server axum = "0.8" -tower = "0.5" -tower-http = { version = "0.6", features = ["cors", "trace"] } # TUI ratatui = "0.30" @@ -87,12 +85,12 @@ serde_json = "1.0" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } tracing-appender = "0.2" -sha2 = "0.10" +sha2 = "0.11" uuid = { version = "1.11", features = ["v4", "serde"] } chrono = { version = "0.4", features = ["serde"] } colored = "2.1" indicatif = "0.17" -dirs = "5.0" +dirs = "7" num_cpus = "1.16" async-trait = "0.1" # Vector database @@ -101,7 +99,7 @@ heed = "0.22" bincode = "1.3" # SCIP symbol indexing — parses standard SCIP protobuf (.scip) emitted by # Sourcegraph indexers (e.g. scip-typescript) for the TypeScript symbol adapter. -scip = "0.9" +scip = "0.10" protobuf = "3.7" rand = "0.10" # Aikido 34247111: 1.8.0 carries 5 advisories (CVE-2026-64684/317735/617985 + 2 more). @@ -110,7 +108,7 @@ rand = "0.10" rmcp = { version = "3.3.0", features = ["server", "client", "transport-io", "transport-streamable-http-server", "transport-streamable-http-client-reqwest", "macros"] } schemars = { version = "1.1.0", features = ["derive"] } reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] } -sysinfo = { version = "0.38.4", default-features = true } +sysinfo = { version = "0.39", default-features = true } [target.'cfg(unix)'.dependencies] libc = "0.2" diff --git a/src/cache/file_meta.rs b/src/cache/file_meta.rs index 43991204..dab5f38e 100644 --- a/src/cache/file_meta.rs +++ b/src/cache/file_meta.rs @@ -343,7 +343,12 @@ impl FileMetaStore { let content = fs::read(path)?; let mut hasher = Sha256::new(); hasher.update(&content); - Ok(format!("{:x}", hasher.finalize())) + // sha2 0.11: the digest array no longer impls LowerHex — hex-encode manually + Ok(hasher + .finalize() + .iter() + .map(|b| format!("{b:02x}")) + .collect()) } /// Get file modification time as unix timestamp diff --git a/src/chunker/mod.rs b/src/chunker/mod.rs index 972dd32b..f2bbbe1b 100644 --- a/src/chunker/mod.rs +++ b/src/chunker/mod.rs @@ -94,7 +94,12 @@ impl Chunk { pub fn compute_hash(content: &str) -> String { let mut hasher = Sha256::new(); hasher.update(content.as_bytes()); - format!("{:x}", hasher.finalize()) + // sha2 0.11: the digest array no longer impls LowerHex — hex-encode manually + hasher + .finalize() + .iter() + .map(|b| format!("{b:02x}")) + .collect::() } /// TEST METHOD: Estimate memory usage of this chunk in bytes