codex - 💡(How to fix) Fix 'codex-utils-pty' assumes winapi "std" feature

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

I suspect this works in the main workspace because the lockfile/dependency graph already enables winapi/std, but downstream standalone builds can fail.

Code Example

winapi::um::winnt::HANDLE
// internally uses winapi's c_void

pub type HPCON = HANDLE;

PseudoCon::raw_handle() -> HPCON
RAW_BUFFERClick to expand / collapse

codex-utils-pty appears to implicitly rely on winapi/std.

Without the std feature, winapi defines c_void as an opaque empty struct instead of aliasing std::ffi::c_void.

Relevant chain:

winapi::um::winnt::HANDLE
// internally uses winapi's c_void

pub type HPCON = HANDLE;

PseudoCon::raw_handle() -> HPCON

But RawConPty::pseudoconsole_handle() returns std's RawHandle, which is based on std::ffi::c_void.

When winapi/std is enabled, both resolve compatibly, so this passes. But when building without that feature, the types diverge and compilation fails.

I suspect this works in the main workspace because the lockfile/dependency graph already enables winapi/std, but downstream standalone builds can fail.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix 'codex-utils-pty' assumes winapi "std" feature