aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/file.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-09 01:51:39 +0900
committerOphestra <cat@gensokyo.uk>2026-01-09 05:20:34 +0900
commitf7124667145d1f7c614d9fc644bc07bb6174454a (patch)
tree9585573da6d016a27ce7fd066b795f611d1ce877 /internal/pkg/file.go
parentf2430b5f5ef7ac0361d1c4976b7ec7bebaa15f63 (diff)
internal/pkg: move dependency flooding to cache
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>
Diffstat (limited to 'internal/pkg/file.go')
-rw-r--r--internal/pkg/file.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/internal/pkg/file.go b/internal/pkg/file.go
index d7ac933f..50a161a4 100644
--- a/internal/pkg/file.go
+++ b/internal/pkg/file.go
@@ -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 }