Repository navigation
Stop building sight binaries whose console can't start - #339
Merged
Merged
Conversation
A native binary embeds the Bun runtime that compiled it. Bun before 1.3.5 has no Bun.Terminal, so `sight console` in such a binary fails with "this runtime has no pseudo-terminal support". The build now stops with an upgrade hint instead, and compiles with the Bun it checked (process.execPath) rather than whichever bun is on PATH. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sight consolefailed in a locally built binary with "this runtime has no pseudo-terminal support". A compiled binary embeds the Bun that built it, and the console's PTY (Bun.Terminal) only exists in Bun 1.3.5 and later. Building with an older Bun silently produced a binary whose console could never start.scripts/build-binary.tsnow refuses to compile with Bun older than 1.3.5 and tells you to runbun upgrade. It also compiles with the Bun that runs the script (process.execPath) rather than whicheverbunis first onPATH, so the version it checks is the version that compiles. CI and release builds already use Bun 1.3.13 and are unaffected.Proof: at
main, a Bun 1.3.1 build reproduced the PTY error under a real terminal. On this branch the same build exits 1 with the upgrade message, and a Bun 1.4.4 build starts Stata's console. Typecheck, lint, line-endings andbun test ./tests(8166 tests) pass.Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code (T3 Code), reviewed by gpt-6.1-sol.
🤖 Generated with Claude Code
Summary by CodeRabbit
PATH.