M1 check-needs: a manifest names at its top level the seats a package outside every artifact's from needs
A package no artifact's from holds (the forge module's seatgit whole test) has no artifact to carry its check-needs, so the module says it once at its level, in the artifact's form (H-A-453 (2)). Builds: design 47 H2 §800, H-A-453 (2)
This commit is contained in:
@@ -136,7 +136,7 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) {
|
||||
|
||||
// The registry milestone's words round-trip the same (design 32): a config value's old name, an artifact's series
|
||||
// and contracts marker, the series a module accepts of a package; absent, a series is 0.1.
|
||||
declared := []byte(`{"module":"c","version":"1","config":{"font":{"type":"string","renamed-from":"font-name"}},
|
||||
declared := []byte(`{"module":"c","version":"1","check-needs":["node-build-node"],"config":{"font":{"type":"string","renamed-from":"font-name"}},
|
||||
"packages":{"mesh-sdk":"0.2"},
|
||||
"build":{"artifacts":[{"name":"go","kind":"package","language":"go","paths":["go"],"series":"0.2",
|
||||
"generated-from":"seats","check-needs":["node-build-node"]},{"name":"lib","kind":"package","language":"typescript"}]}}`)
|
||||
@@ -148,7 +148,8 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) {
|
||||
m.AcceptedSeries("mesh-contracts") != DefaultSeries || m.Build.Artifacts[0].SeriesOf() != "0.2" ||
|
||||
m.AcceptedSeries("mesh-sdk", "0.1") != "0.2" || m.AcceptedSeries("mesh-contracts", "0.10", "x", "0.3", "1.0") != "0.3" ||
|
||||
m.Build.Artifacts[0].GeneratedFrom != "seats" || m.Build.Artifacts[1].SeriesOf() != "0.1" ||
|
||||
!slices.Equal(m.Build.Artifacts[0].CheckNeeds, []string{"node-build-node"}) || m.Build.Artifacts[1].CheckNeeds != nil {
|
||||
!slices.Equal(m.Build.Artifacts[0].CheckNeeds, []string{"node-build-node"}) || m.Build.Artifacts[1].CheckNeeds != nil ||
|
||||
!slices.Equal(m.CheckNeeds, []string{"node-build-node"}) {
|
||||
t.Fatalf("read %+v", m)
|
||||
}
|
||||
raw, _ = json.Marshal(m)
|
||||
@@ -158,6 +159,9 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) {
|
||||
t.Errorf("written back without %s: %s", said, raw)
|
||||
}
|
||||
}
|
||||
if strings.Count(string(raw), `"check-needs":["node-build-node"]`) != 2 { // H-A-453 (2): the module's own and the artifact's
|
||||
t.Errorf("the module's check-needs is not written back: %s", raw)
|
||||
}
|
||||
if strings.Count(string(raw), `"series"`) != 1 {
|
||||
t.Errorf("a series nobody said is written: %s", raw)
|
||||
}
|
||||
|
||||
@@ -746,6 +746,11 @@ type Manifest struct {
|
||||
// wrong the moment anybody edits anything.
|
||||
Build *Build `json:"build,omitempty"`
|
||||
|
||||
// CheckNeeds are the seats the integration tests of a package outside every artifact's `from` need the node to hold, by
|
||||
// name, in an artifact's form (Artifact.CheckNeeds): the Go build module reads them for the packages no artifact's
|
||||
// `from` holds (design 47 H2 H-A-453 (2)). Empty needs nothing.
|
||||
CheckNeeds []string `json:"check-needs,omitempty"`
|
||||
|
||||
// Templates is the module's directory its template files are kept in, and its build packs into its templates
|
||||
// archive: files/ when it says none (DefaultTemplatesDir; novox/hq ADR 0349 §2, issue 731). A module whose files/
|
||||
// is already an archive unpacked onto the machine names another, so its templates neither land beside what it
|
||||
|
||||
Reference in New Issue
Block a user