diff --git a/go/delivery/builder.go b/go/delivery/builder.go index 51d6d17..47bcab7 100644 --- a/go/delivery/builder.go +++ b/go/delivery/builder.go @@ -147,6 +147,9 @@ const ( VersionTaken = "version taken: " // RefusedKind: no build module builds this kind of artifact in its language. RefusedKind = "refused kind: " + // WaitsFor: a fetch found the module's lock naming a package version the registry does not hold yet; the builder + // writes the key queued with Waits (novox/hq ADR 0500 clause 6), and it is built once the package is published. + WaitsFor = "waits for: " ) // FailedUntilChanged says whether a failed key's error is one that is not built again until the module's fingerprint diff --git a/go/delivery/builder_reference_test.go b/go/delivery/builder_reference_test.go index cbe206d..4a0dd3c 100644 --- a/go/delivery/builder_reference_test.go +++ b/go/delivery/builder_reference_test.go @@ -133,3 +133,11 @@ func TestADoneKeyWithNoArtifactIsReferenced(t *testing.T) { t.Fatalf("Referenced = %v, %v; want true", ok, missing) } } + +// A Node fetch that finds the lock naming a package version the registry does not hold fails with WaitsFor; the +// builder then writes the key queued with Waits, and the error is not one that waits for the fingerprint to change. +func TestWaitsForIsAPrefixThatIsBuiltAgain(t *testing.T) { + if WaitsFor != "waits for: " || FailedUntilChanged(WaitsFor+"@novox/mesh-sdk@0.1.15") { + t.Fatalf("WaitsFor = %q", WaitsFor) + } +}