Skip to content

Replace a stale cached source when its hash no longer matches the recipe - #79

Merged
jhuntwork merged 1 commit into
mainfrom
replace-stale-cached-source
Nov 3, 2026
Merged

jhuntwork merged 1 commit into
mainfrom
replace-stale-cached-source

Conversation

@jhuntwork

Copy link
Copy Markdown
Owner

When a recipe source's contents and blake3 change, the file in the shared
source cache fails the hash check and is queued for download. The download
is verified in a .part file, but without force it is not moved over the
existing cache file, so the stale file stays. The new workspace copy then
conflicts with it and the build stops with "existing workspace source
conflicts with cached source" until the source cache is cleared by hand.

Set force on the download when the recipe declares a blake3, so the
verified file replaces the stale one. Add a test with a stale cache entry.

Fixes #78

When a recipe source's contents and blake3 change, the file in the shared
source cache fails the hash check and is queued for download. The download
is verified in a .part file, but without force it is not moved over the
existing cache file, so the stale file stays. The new workspace copy then
conflicts with it and the build stops with "existing workspace source
conflicts with cached source" until the source cache is cleared by hand.

Set force on the download when the recipe declares a blake3, so the
verified file replaces the stale one. Add a test with a stale cache entry.

Fixes #78
@jhuntwork
jhuntwork merged commit ff724d1 into main Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing a source's contents and blake3 leaves the stale file in the source cache and fails the build

1 participant