fix(hid): declare Win32_System_IO feature for windows-sys WriteFile - #458
fix(hid): declare Win32_System_IO feature for windows-sys WriteFile#458Stanley5249 wants to merge 1 commit into
Conversation
Greptile SummaryThis PR fixes a missing
Confidence Score: 5/5Safe to merge — a targeted, correct addition of one missing feature flag that fixes a real package-scoped build failure on Windows without affecting workspace builds or any runtime behaviour. The change adds a single No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[cargo check -p openlogi-hid] --> B{Win32_System_IO\nfeature enabled?}
B -- No\n(before this PR) --> C["E0432: unresolved import\nwindows_sys::Win32::Storage::FileSystem::WriteFile"]
B -- Yes\n(after this PR) --> D[Compiles successfully]
E[cargo check --workspace] --> F[Feature unification from\nanother workspace dep\nenables Win32_System_IO]
F --> G[Compiles — masks the bug]
Reviews (1): Last reviewed commit: "fix(hid): declare Win32_System_IO featur..." | Re-trigger Greptile |
Summary
openlogi-hidusesWriteFile(native HID report writes inwindows_hid.rs) but does not enable thewindows-sysfeature that gates it. Inwindows-sys0.61.2,WriteFile's signature referencesOVERLAPPED, so the function is only exported whenWin32_System_IOis enabled.Workspace builds still compile because another workspace dependency enables
Win32_System_IOand cargo unifies features across the graph — which is why CI stays green. But any package-scoped build on Windows fails:This declares the feature the crate actually uses instead of relying on feature unification.
Changes
openlogi-hid: addWin32_System_IOto thewindows-sysfeature list, with a comment mirroring the existingWin32_Securitynote.Testing
On Windows 11 (windows-sys 0.61.2 from the committed
Cargo.lock):cargo check -p openlogi-hid— fails with E0432 before, passes aftercargo check --workspace— passes before and after (feature unification masks the bug in workspace builds)cargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— all pass