Skip to content

fix: flush stdout after print in r_write_console_ex#44

Merged
eitsupi merged 1 commit intomainfrom
fix/stdout-flush-write-console
Feb 4, 2026
Merged

fix: flush stdout after print in r_write_console_ex#44
eitsupi merged 1 commit intomainfrom
fix/stdout-flush-write-console

Conversation

@eitsupi
Copy link
Copy Markdown
Owner

@eitsupi eitsupi commented Feb 4, 2026

Summary

  • Add explicit stdout flush after print!() in r_write_console_ex so that R output using \r without newline (e.g., progress bars from pak::pak()) is displayed immediately instead of accumulating in the buffer and appearing in choppy bursts.

Test plan

  • Manual test: confirmed progress bar animations display smoothly

🤖 Generated with Claude Code

R's progress bars (e.g. pak::pak()) use carriage return (\r) without
newline to overwrite lines. Since Rust's stdout is line-buffered, the
output was accumulating in the buffer and displaying in choppy bursts.

Add an explicit flush after print!() so output appears immediately.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@eitsupi eitsupi merged commit 044d167 into main Feb 4, 2026
10 checks passed
@eitsupi eitsupi deleted the fix/stdout-flush-write-console branch February 4, 2026 12:31
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