Skip to content

oxfmt: Large files truncated when using --stdin-filepath option #17939

@kyle-b2

Description

@kyle-b2

Large files are unexpectedly truncated and formatting fails when using the --stdin-filepath option.

Environment

  • oxfmt version: 0.24.0
  • OS: macOS (Sequoia 15.7.3), M3 chip
  • Context: conform.nvim integration for nvim format-on-save

Repro

  • Find a large file. In my case, the file I was editing was ~1500 lines.
  • wc -l /path/to/large.file.ts See what the line count is before invoking oxfmt
  • cat /path/to/large.file.ts | oxfmt --stdin-filepath /path/to/large.file.ts | wc -l See failure and the modified line count

Getting this error:

thread 'tokio-runtime-worker' (656208) panicked at apps/oxfmt/src/core/utils.rs:52:74:
called `Result::unwrap()` on an `Err` value: Os { code: 35, kind: WouldBlock, message: "Resource temporarily unavailable" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior

Formats entire file without truncation

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions