Skip to content

polling: import PollerIocpExt for the Windows waitable API - #869

Merged
eval-exec merged 1 commit into
mainfrom
fix/windows-poller-iocp-import
Nov 27, 2026
Merged

eval-exec merged 1 commit into
mainfrom
fix/windows-poller-iocp-import

Conversation

@eval-exec

Copy link
Copy Markdown
Owner

Problem

cargo check workspace (windows-msvc-aarch64) is red on main (first observed on PR #868 and reproducible from the merged tree). The Windows arms of the serial Device poller registration in crates/neovm-eval/src/emacs_core/runtime/eval/data/process_state.rs call add_waitable, modify_waitable and remove_waitable, but those methods are not inherent on polling::Poller — they belong to the Windows-only PollerIocpExt extension trait, which the file never imports.

Three errors, all the same cause:

error[E0599]: no method named `add_waitable` found for reference `&Poller`
  --> crates/neovm-eval/src/emacs_core/runtime/eval/data/process_state.rs:869:29
help: trait `PollerIocpExt` which provides `add_waitable` is implemented but not in scope;
      perhaps you want to import it: `use polling::os::iocp::PollerIocpExt;`

error[E0599]: no method named `modify_waitable` ... :892:24
error[E0599]: no method named `remove_waitable` ... :912:61

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 with cargo check -p neovm-eval --target aarch64-pc-windows-msvc stops earlier, in ring's build script, because the Nix clang wrapper injects -fPIC for that target; that failure is environmental and unrelated.

Root Cause

polling exposes 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 only use polling::Poller, while the #[cfg(windows)] arms needed the trait in scope. crates/neovm-system/src/emacs_core/system/process/sys/serial/w32_backend.rs already imports the same trait for its own poller-facing code.

Solution

#[cfg(windows)]
use polling::os::iocp::PollerIocpExt;

A cfg-gated import next to the existing use polling::Poller;. polling 3.11 defines all three methods on PollerIocpExt (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-aarch64 workspace 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.
  • Local --target aarch64-pc-windows-msvc check cannot reach the crate (ring's build script + Nix clang wrapper, described above).
  • CI 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.

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.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes

Windows IOCP Import

Layer / File(s) Summary
Import IOCP polling extension trait
crates/neovm-eval/src/emacs_core/runtime/eval/data/process_state.rs
Adds a Windows-only import of PollerIocpExt from polling::os::iocp.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: davidawad

Merge Risk: Minimal · up to 0ae5e

This adds a Windows-only import so the serial poller code can compile. It does not change runtime behavior, and the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: importing PollerIocpExt so the Windows waitable API (add_waitable, modify_waitable, remove_waitable) is in scope. The raw summary confirms a single cfg(windows) import…
Description check Passed The description explains the problem (Windows CI check failing on E0599 errors because PollerIocpExt is not in scope), the one-line cfg(windows) import fix, the root cause, and verification steps. It …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: importing PollerIocpExt so the Windows waitable API (add_waitable, modify_waitable, remove_waitable) is in scope. The raw summary confirms a single cfg(windows) import in process_state.rs that matches this title.

Full details: Description check

Explanation

The description explains the problem (Windows CI check failing on E0599 errors because PollerIocpExt is not in scope), the one-line cfg(windows) import fix, the root cause, and verification steps. It is directly related to the changeset.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c8dac4c7-2777-4349-afd3-6d435379b782
Commits

Reviewing files that changed from the base of the PR and between 3d549e6 and 0ae5ee0.

Files selected for processing: 1

  • crates/neovm-eval/src/emacs_core/runtime/eval/data/process_state.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@kilo-code-bot

kilo-code-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • crates/neovm-eval/src/emacs_core/runtime/eval/data/process_state.rs

Reviewed by free · Input: 62.6K · Output: 3.9K · Cached: 104.1K

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · This focused compile fix appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This focused compile fix appears safe to merge.

Summary

Adds the Windows-only PollerIocpExt import so the existing serial poller calls can find add_waitable, modify_waitable, and remove_waitable.

  • Windows serial poller code can now use its waitable calls.

Reviews (1) · Last reviewed commit: "polling: import PollerIocpExt for the Wi..." · Reviewed by Greptile

@eval-exec
eval-exec merged commit ee3ac2f into main Nov 27, 2026
29 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant