fix(oxfmt): Use std(out/err)._handle.setBlocking(true) to handle WouldBlock error in Rust#17950
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
std(out/err)._handle.setBlocking(true) to handle WouldBlock error in Rust
There was a problem hiding this comment.
Pull request overview
This PR fixes a WouldBlock error that occurs when writing large output in Rust through NAPI bindings. The issue arises because Node.js sets stdio to non-blocking mode by default, which conflicts with Rust's blocking I/O operations when using --stdin-filepath.
Changes:
- Added code to set stdout and stderr to blocking mode before calling Rust NAPI bindings
- Added comprehensive comments explaining the fix and why it differs from the
yargs/set-blockingapproach
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dff70f4 to
82bc59a
Compare
82bc59a to
6dad761
Compare
Merge activity
|
6dad761 to
9d96cc6
Compare

Fixes #17939, closes #17943 and #17946.