Repository navigation
polling: import PollerIocpExt for the Windows waitable API - #869
Conversation
cargo check workspace (windows-msvc-aarch64) fails on main in process_state.rs. The serial Device arms call add_waitable, modify_waitable and remove_waitable, which polling exposes through the Windows-only PollerIocpExt extension trait. The Unix equivalents (add_with_mode, modify_with_mode, delete) are inherent methods, so the file imported only polling::Poller and the Windows arms could not resolve the trait. Import PollerIocpExt under cfg(windows). polling 3.11 defines all three methods on that trait. Verified: cargo check -p neovm-eval on the host (no new warnings). A local cross-check for aarch64-pc-windows-msvc stops in ring's build script because the Nix clang wrapper injects -fPIC for the target; the windows-msvc-aarch64 CI job is the check for the fixed arms.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by free · Input: 62.6K · Output: 3.9K · Cached: 104.1K |
[Low impact] This focused compile fix appears safe to merge. SummaryAdds the Windows-only
Reviews (1) · Last reviewed commit: "polling: import PollerIocpExt for the Wi..." · Reviewed by Greptile |
Problem
cargo check workspace (windows-msvc-aarch64)is red onmain(first observed on PR #868 and reproducible from the merged tree). The Windows arms of the serialDevicepoller registration incrates/neovm-eval/src/emacs_core/runtime/eval/data/process_state.rscalladd_waitable,modify_waitableandremove_waitable, but those methods are not inherent onpolling::Poller— they belong to the Windows-onlyPollerIocpExtextension trait, which the file never imports.Three errors, all the same cause:
Reproduction
The CI job log for
cargo check workspace (windows-msvc-aarch64), which runs a Windows target check from a Linux runner. A local cross-check withcargo check -p neovm-eval --target aarch64-pc-windows-msvcstops earlier, in ring's build script, because the Nix clang wrapper injects-fPICfor that target; that failure is environmental and unrelated.Root Cause
pollingexposes its Unix poller registration as inherent methods (add_with_mode,modify_with_mode,delete), but the IOCP waitable API is an extension trait. The Unix arms therefore compiled with onlyuse polling::Poller, while the#[cfg(windows)]arms needed the trait in scope.crates/neovm-system/src/emacs_core/system/process/sys/serial/w32_backend.rsalready imports the same trait for its own poller-facing code.Solution
A cfg-gated import next to the existing
use polling::Poller;.polling3.11 defines all three methods onPollerIocpExt(src/os/iocp.rs:101,147,193).Design Horizon
No broader design question: this is a one-line compile fix with no behavior change. The shape is dictated by
polling's Windows API (an extension trait rather than inherent methods); the existing w32 backend is the precedent.Regression Tests
Compile-only fix; there is no runtime behavior to test. The
windows-msvc-aarch64workspace check is the regression gate, and it exercises exactly this file's#[cfg(windows)]arms.Verification
cargo check -p neovm-eval(host): passes; the cfg-gated import is absent on Unix and adds no warning.cargo fmt -p neovm-eval: clean.--target aarch64-pc-windows-msvccheck cannot reach the crate (ring's build script + Nix clang wrapper, described above).cargo check workspace (windows-msvc-aarch64)on this PR is the Windows verification.Oracle mode: not applicable (build fix; no Elisp semantics).
Limitations
The fix is verified by the CI Windows check, not by running Windows tests locally. No Windows runtime behavior changes.