Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more small refactors towards better caching #743

Merged
merged 2 commits into from
May 21, 2023
Merged

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented May 21, 2023

(see commit messages - please do not squash)

mvdan added 2 commits May 21, 2023 09:42
Since we will start importing github.com/rogpeppe/go-internal/cache,
and I don't want to have to rename it or leave confusion around.
First, rename "component" to "hash", since it's shorter and more useful.
A full build ID is two or four hashes joined with slashes.

Second, add sanity checks that buildIDHashLength is being followed.
Otherwise the use of []byte could lead to human error.

Third, move all the hash encoding and decoding logic together.
@mvdan mvdan requested review from lu4p and pagran May 21, 2023 11:26
@mvdan mvdan merged commit 414e3b7 into burrowers:master May 21, 2023
@mvdan mvdan deleted the cache-3 branch May 25, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants