[BUG] Output failures panic instead of returning an error #4
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/boot-tool#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Boot-tool prints responses and diagnostics with panicking stdio macros. A broken
or full output stream can terminate the command with a panic instead of its
ordinary operational error status.
Reproduction
On Linux, direct
boot-tool --helpto/dev/full, or close the receiving end ofits stdout pipe. Also cover a response failure after
buildhas published itsoutputs, and a failed stderr while reporting a usage error.
Expected and actual behavior
Return operational status one for a failed write or flush, make one best-effort
diagnostic attempt, and preserve any completed file effects without retrying
them. The existing
print!,println!andeprint!routes can panic instead.Successful bytes and established command/file error order should remain stable.
Environment and identity
Boot-tool
e2a59008fcd9ddea6e4fe7717b17a2880287d50a, Linux entry insrc/main.rsand command responses in
src/cli.rs. No native EriX runtime is involved.Evidence and prior checks
This report follows a complete source read of the printing routes. The
reproducer above has not been executed for this report. The platform-I/O work
will add controlled short-write, partial-write, flush and diagnostic failures.
Tracking
after an output failure.
Related: native build-tool separation.
Fixed in 3040a592. Checked writes and flushes now return operational failure without panicking or replaying a completed publication. Debug and release tests cover short writes, a partial write followed by BrokenPipe, diagnostic failures and publication order. The original process-level reproducer remains unexecuted; the adapter controls exercise these failure paths directly.