refactor(progress): replace byte-tracking bar with spinner + elapsed#99
Merged
Conversation
Remove CacheTracker, FetchFormulaSizes/FetchCaskSizes, byte/speed/EMA fields from StickyProgress, and the scroll-region bar render. Replace with a simple spinner + [N/M] pkgname + per-package elapsed time. Cask installs already let brew's own download output scroll through; formula installs stay silent. Both show the sticky spinner line at the bottom, which never freezes because it has nothing to measure. Deletes: cache.go, cache_test.go, sizecheck.go, sizecheck_test.go, httputil/head.go, httputil/head_test.go (-1146 lines net).
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.
Summary
CacheTracker,FetchFormulaSizes,FetchCaskSizes, byte/speed/EMA fields fromStickyProgress, and the scroll-region bar renderercache.go,cache_test.go,sizecheck.go,sizecheck_test.go,httputil/head.go,httputil/head_test.goMotivation
The byte-proportional bar froze during brew's install phase (after download completes) because there was nothing left to poll. Attempts to fix it (show "installing...", indeterminate animation) added complexity without solving the root problem. Simpler answer: don't promise what we can't measure.
Test plan
make test-unitpasses (L1 suite including archtest)install_progress_behavior_test.goupdated — size pre-fetch call removed, alias resolution still batched correctlygo vet ./...clean