install.sh: draw a real progress bar during the build steps - #192
Closed
mmelnich wants to merge 1 commit into
Closed
install.sh: draw a real progress bar during the build steps#192mmelnich wants to merge 1 commit into
mmelnich wants to merge 1 commit into
Conversation
Three rendering tiers, chosen by probing the terminal: 2 a terminal with colour and UTF-8: a bar redrawn in place, block glyphs 1 a terminal without one of those: the same bar in ASCII 0 not a terminal: one line per step, no escapes, no carriage returns Tier 0 is a requirement rather than a fallback. Redirected output becomes install.log, CI transcripts and bug reports, and control characters make all three unreadable, so run_build_step falls straight through to run_step there and the bytes are identical to before this change. CI already asserts that redirected output contains no escape sequence and no carriage return. The bar is determinate. Both build tools already report progress on the stream being captured anyway -- Ninja writes "[12/34]" and Make writes "[ 42%]" -- so it tracks real work rather than elapsed time. A spinner would have conveyed nothing. Steps with no parseable progress keep their existing one-line form rather than growing a fake bar. Implementation note: the parsing loop necessarily runs in a subshell, so the build command's exit status is passed back through a file rather than a variable, and checked explicitly. Verified: redirected output byte-identical and escape-free; under a pty the bar advances through 5%, 20%, 49% during the RandBLAS build and each step resolves to a "done" line.
rileyjmurray
force-pushed
the
randblas-install-progress
branch
from
August 13, 2026 17:11
9c41218 to
417f33e
Compare
Contributor
Author
|
Folded into #187 at Riley's request ("please combine PRs 187, 190, and 191 — they have no business landing separately"). The commit is unchanged, now sitting on |
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.
What this adds
A determinate progress bar during the three long build steps, with three rendering tiers chosen by probing the terminal.
━/─NO_COLOR,TERM=dumb, or a non-UTF-8 locale#/-Tier 0 is a requirement, not a fallback. Redirected output becomes
install.log, CI transcripts and bug reports, and control characters make all three unreadable.run_build_stepfalls straight through to the existingrun_stepthere, so redirected bytes are identical to before this change — and theinstall-scriptworkflow already asserts that redirected output contains no escape sequence and no carriage return, so this cannot regress silently.The bar is determinate. Both build tools already report progress on the stream being captured anyway — Ninja writes
[12/34], Make writes[ 42%]— so it tracks real work rather than elapsed time. Steps with no parseable progress (clone, configure, verify) keep their existing one-line form rather than growing a bar that means nothing.Verification
doneline.Notes for reviewers