Repository navigation
fix(hardware): keep Windows Clippy clean in mesh-llm-system - #3231
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…aller is The Windows survey in default_collector.rs is built without skippy-devices or with dynamic-native-runtime, but the adapter helpers it calls were built on every Windows target, and the Windows read_system_ram_bytes only serves the skippy-devices path. Clippy with -D warnings on Windows failed on them as dead code without features and with skippy-devices alone. Gate each on its caller's cfg.
d18ad0c to
d326fd9
Compare
Original problem
cargo clippy -p mesh-llm-system --all-targets -- -D warningsfails on Windows without features and withskippy-devicesalone, on dead code inhardware/mod.rs. Thedynamic-native-runtimebuilds are clean. CI lints on Ubuntu only, so it never shows up there; anyone running clippy on Windows hits it before their own change.skippy-devices:windows_per_gpu_vram,merge_adapter_memory,read_windows_adapter_memoryandread_windows_video_controllersare never used. Their only caller is the Windows survey indefault_collector.rs, which is built withoutskippy-devicesor withdynamic-native-runtime, while they were built on every Windows target.read_system_ram_bytesis never used. Its only caller issurvey_system_ram, which is gated onskippy-devicesortest; the Windows survey readsread_windows_total_ram_bytesdirectly.Fix
Each helper takes its caller's
cfg. The two pure helpers keeptest, so their tests still run on every platform. The Windowsread_system_ram_bytesgets the gate the macOS one already has. No behaviour changes.Validation
On Windows 11, from this branch:
cargo clippy -p mesh-llm-system --all-targets -- -D warningsis clean with no features,skippy-devices,dynamic-native-runtime, and both. On main the first two fail and the last two are clean.cargo test -p mesh-llm-system --lib hardware: 106 passed. Withskippy-devices, 104 pass and 6 tests that go through the Skippy device probe (test_query_*,test_survey_returns_all_metrics,test_detect_collector_returns_default_on_non_tegra) panic inskippy-ffi(dynamic.rs:79), also withSKIPPY_NATIVE_RUNTIME_BUNDLE_DIRset.test_query_vram_onlypanics the same way on main on this machine.rustfmt --checkis clean.Summary by CodeRabbit