aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-15 00:26:36 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-15 00:26:36 +0200
commitf12f3f1356e4e96d419d66d13c2e67b73a50346f (patch)
treec3d83c41030b0fae8252cc18783c40fa9c8d0f9d /internal
parent8a046c897e42e9459aa99377589c80c773601efc (diff)
downloadkrino-f12f3f1356e4e96d419d66d13c2e67b73a50346f.tar.gz
krino-f12f3f1356e4e96d419d66d13c2e67b73a50346f.zip
an earlier directory's applied results stay claimed for later ones
Diffstat (limited to 'internal')
-rw-r--r--internal/plan/chain.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/plan/chain.go b/internal/plan/chain.go
index b32cc7d..bb4876b 100644
--- a/internal/plan/chain.go
+++ b/internal/plan/chain.go
@@ -28,6 +28,12 @@ func NewClaims() *Claims {
return &Claims{taken: claimed{}}
}
+// Claim marks path as spoken for: a later Build call of the run treats it
+// as another step's result, never displacing it (spec ยง7.4).
+func (c *Claims) Claim(path string) {
+ c.taken[path] = true
+}
+
// Input is one file and the rules that matched it, in match order.
type Input struct {
File scan.File