Skip to content

Rewatch: improve watch output and add clear-screen#8373

Merged
cknitt merged 4 commits intomasterfrom
bushuo/terminal-output
Apr 19, 2026
Merged

Rewatch: improve watch output and add clear-screen#8373
cknitt merged 4 commits intomasterfrom
bushuo/terminal-output

Conversation

@Bushuo
Copy link
Copy Markdown
Collaborator

@Bushuo Bushuo commented Apr 19, 2026

Summary

  • surface warning state in completion messages with CompilationOutcome
  • add opt-in rescript watch --clear-screen for interactive watch mode
  • print explicit rebuild and failure markers so stale output is easier to distinguish from current output

--clear-screen only runs for interactive watch output, so scripted and non-TTY stdout stays unchanged. Screen clearing uses console::Term::stdout().clear_screen() for better cross-platform terminal support.

Closes #8139, #8161

Testing

  • cargo test --manifest-path rewatch/Cargo.toml

Bushuo added 3 commits April 19, 2026 15:37
Make screen clearing opt-in so scripted stdout stays stable while
interactive watch mode can drop stale warnings and errors between
rebuilds.

Also print explicit rebuild and failure markers so fixed vs broken
state is easier to spot.

Refs #8139

Signed-off-by: Paul Kim <paul.bushuo@gmail.com>
@Bushuo Bushuo force-pushed the bushuo/terminal-output branch from 336ba68 to 7756388 Compare April 19, 2026 13:38
@Bushuo Bushuo linked an issue Apr 19, 2026 that may be closed by this pull request
@Bushuo Bushuo changed the title ewatch: improve watch output and add clear-screen Rewatch: improve watch output and add clear-screen Apr 19, 2026
@Bushuo
Copy link
Copy Markdown
Collaborator Author

Bushuo commented Apr 19, 2026

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 19, 2026

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8373

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8373

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8373

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8373

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8373

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8373

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8373

commit: 27abc66

Signed-off-by: Paul Kim <paul.bushuo@gmail.com>
@Bushuo
Copy link
Copy Markdown
Collaborator Author

Bushuo commented Apr 19, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt cknitt enabled auto-merge (squash) April 19, 2026 17:37
@cknitt cknitt merged commit c6bf334 into master Apr 19, 2026
43 of 44 checks passed
@cknitt cknitt deleted the bushuo/terminal-output branch April 19, 2026 17:57
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.

Make bottom of the compilation results more informative Rewatch should clear screen in watch mode

3 participants