Skip to content

fix(progress): show bytes/speed/ETA during formula installs#97

Merged
fullstackjam merged 1 commit into
mainfrom
fix/formula-progress-head
May 19, 2026
Merged

fix(progress): show bytes/speed/ETA during formula installs#97
fullstackjam merged 1 commit into
mainfrom
fix/formula-progress-head

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

  • runSerialInstallWithProgress now starts a CacheTracker per formula and pumps SetCurrentBytes — mirroring installCasksWithProgress. Formula installs in a Tart VM showed only [1/5] vhs 2% while casks showed 12M/189M · 7M/s · ~24s; the head now matches.
  • CacheTracker is parameterized by CacheKind (cask|formula) so it resolves the right cache path via brew --cache --formula <name> for bottles. Same .incomplete → rename polling works for both.
  • formatFormulaHead and formatCaskHead collapse into one formatHead. SetPhase stays — it still does the per-package byte-state reset on phase transition.

Test plan

  • go vet ./...
  • make test-unit (L1 — archtest baseline regen included since brewInstallCmd shifted from line 400 → 433; same exec.Command call site)
  • New unit tests: NewCacheTracker table-test for both kinds; formatHead shows bytes/speed/ETA for both phases and falls back to — · — · — when data is missing
  • Manual verification in Tart VM during next openboot install (the original repro environment)

Formula installs only rendered "[n/N] pkg" in the bottom status line
while casks showed "[n/N] pkg  12M/189M · 7M/s · ~24s" — the head split
was the visible inconsistency users noticed during longer formula
downloads like vhs.

Parameterize CacheTracker by CacheKind (cask|formula) so it queries
`brew --cache --formula <name>` for bottles, wire a tracker into the
formula install loop the same way installCasksWithProgress does, and
collapse formatFormulaHead / formatCaskHead into a single formatHead.
SetPhase stays — it still gates the per-package byte-state reset.
@github-actions github-actions Bot added brew Homebrew related tests Tests only ui Terminal UI labels May 19, 2026
@fullstackjam fullstackjam merged commit 980bf5a into main May 19, 2026
12 checks passed
@fullstackjam fullstackjam deleted the fix/formula-progress-head branch May 19, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brew Homebrew related tests Tests only ui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant