Draw a plan's order per module from the graph and the manifests' change, and read no after: line (issue 977, part B, ADR 0419)
This commit is contained in:
@@ -38,6 +38,9 @@ type Edge struct {
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
Kind string `json:"kind"`
|
||||
// Why is the rule and the fact that drew an edge of a plan's order, in the words the plan shows (novox/hq ADR
|
||||
// 0419 clause 5): "verb before caller: <seat>.<verb>". Empty on the catalogue's own edges, which Kind names.
|
||||
Why string `json:"why,omitempty"`
|
||||
}
|
||||
|
||||
// Dependencies is the catalogue's dependency relation, whole: every module the mesh holds, with
|
||||
|
||||
@@ -42,12 +42,12 @@ func TestDependenciesAreOneRelationWithTheirKinds(t *testing.T) {
|
||||
return false
|
||||
}
|
||||
for _, want := range []Edge{
|
||||
{"shop", "mesh-tools", EdgeStandsOn},
|
||||
{"builder", "mesh-tools", EdgeStandsOn},
|
||||
{"shop-plugin", "shop", EdgeDeclared},
|
||||
{"shop", "builder", EdgeBuiltBy},
|
||||
{"mesh-controller", "builder", EdgeBuiltBy},
|
||||
{"mesh-tools", "builder", EdgeBuiltBy},
|
||||
{From: "shop", To: "mesh-tools", Kind: EdgeStandsOn},
|
||||
{From: "builder", To: "mesh-tools", Kind: EdgeStandsOn},
|
||||
{From: "shop-plugin", To: "shop", Kind: EdgeDeclared},
|
||||
{From: "shop", To: "builder", Kind: EdgeBuiltBy},
|
||||
{From: "mesh-controller", To: "builder", Kind: EdgeBuiltBy},
|
||||
{From: "mesh-tools", To: "builder", Kind: EdgeBuiltBy},
|
||||
} {
|
||||
if !has(want.From, want.To, want.Kind) {
|
||||
t.Errorf("missing %+v in %+v", want, got)
|
||||
|
||||
@@ -292,6 +292,9 @@ type PlanModule struct {
|
||||
FirstAt *time.Time `json:"first_at,omitempty"`
|
||||
Commit string `json:"commit,omitempty"`
|
||||
Why string `json:"why,omitempty"`
|
||||
// Placed is the edge that put the module after another, and the rule that drew it (novox/hq ADR 0419 clause 5):
|
||||
// "after <module> (verb before caller: <seat>.<verb>)". Empty for a module placed first by nothing.
|
||||
Placed string `json:"placed,omitempty"`
|
||||
// Made is what the walk's build of it did (novox/hq ADR 0350 §4): "reused from <check build>", naming the pull
|
||||
// request's head, the trunk commit and the digests, or "built: <why>". Said in `plan-moved` and kept here.
|
||||
Made string `json:"made,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user