E1: read another part's values tolerantly
The generated decoders keep unknown fields and return the form read, so a want the assigner writes with run, or any field added later, is applied rather than refused: the node-engine that reads run runs before the assigner writes it. Builds: design 47 H2 §780; §813 (1) (the edge)
This commit is contained in:
@@ -331,6 +331,14 @@ func TestAWantAndItsCompositionApplyTheModuleAndTheHaveNamesBoth(t *testing.T) {
|
||||
ckn, crawn, dign := composition(t, "web", fpn, false, archive("a", d1), archive("b", d2))
|
||||
b.comps.put(ckn, crawn)
|
||||
wkn, wrawn := wantFor(t, "web", fpn, dign, "")
|
||||
// Design 47 H2 §780, §813 (1): the want is read tolerantly, a field this engine does not know and a later form kept
|
||||
// rather than refused, so the engine that reads run runs before the assigner writes it.
|
||||
var later map[string]any
|
||||
if err := json.Unmarshal(wrawn, &later); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
later["form"], later["a-later-field"] = 3, "x"
|
||||
wrawn, _ = json.Marshal(later)
|
||||
b.wants.put(wkn, wrawn)
|
||||
b.idle()
|
||||
if got := len(b.appliedList()) - before; got != 1 {
|
||||
|
||||
Reference in New Issue
Block a user