internal/pkg: move dependency flooding to cache
All checks were successful
Test / Create distribution (push) Successful in 47s
Test / Sandbox (push) Successful in 2m50s
Test / ShareFS (push) Successful in 4m46s
Test / Sandbox (race detector) (push) Successful in 5m16s
Test / Hpkg (push) Successful in 5m24s
Test / Hakurei (push) Successful in 5m40s
Test / Hakurei (race detector) (push) Successful in 7m27s
Test / Flake checks (push) Successful in 1m42s

This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-09 01:51:39 +09:00
parent f2430b5f5e
commit f712466714
11 changed files with 680 additions and 409 deletions

View File

@@ -2,7 +2,6 @@ package pkg
import (
"crypto/sha512"
"syscall"
)
// A fileArtifact is an [Artifact] that cures into data known ahead of time.
@@ -31,10 +30,5 @@ func (a fileArtifact) Checksum() Checksum {
return Checksum(h.Sum(nil))
}
// Data returns the caller-supplied data.
func (a fileArtifact) Data() ([]byte, error) { return a, nil }
// Cure returns syscall.ENOTSUP. Callers should use Data instead.
func (a fileArtifact) Cure(*CureContext) (err error) {
return syscall.ENOTSUP
}
// Cure returns the caller-supplied data.
func (a fileArtifact) Cure() ([]byte, error) { return a, nil }