internal/pkg: make checksum available to cure
All checks were successful
Test / Create distribution (push) Successful in 50s
Test / Sandbox (push) Successful in 2m54s
Test / ShareFS (push) Successful in 4m41s
Test / Sandbox (race detector) (push) Successful in 5m21s
Test / Hpkg (push) Successful in 5m37s
Test / Hakurei (push) Successful in 5m49s
Test / Hakurei (race detector) (push) Successful in 7m27s
Test / Flake checks (push) Successful in 1m43s

This enables deduplication by value as implemented in execArtifact.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-19 20:10:51 +09:00
parent 1c49c75f95
commit d933234784
8 changed files with 195 additions and 71 deletions

View File

@@ -10,6 +10,7 @@ import (
"path/filepath"
"runtime"
"syscall"
"unique"
"hakurei.app/command"
"hakurei.app/container"
@@ -113,7 +114,7 @@ func main() {
_, _, _, stage3 := rosa.Std.NewLLVM()
var (
pathname *check.Absolute
checksum [2]pkg.Checksum
checksum [2]unique.Handle[pkg.Checksum]
)
if pathname, checksum[0], err = cache.Cure(stage2); err != nil {
@@ -127,8 +128,8 @@ func main() {
if checksum[0] != checksum[1] {
err = &pkg.ChecksumMismatchError{
Got: checksum[0],
Want: checksum[1],
Got: checksum[0].Value(),
Want: checksum[1].Value(),
}
}
return