Performance improvements
This release is focussed predominantly on performance. It includes several algorithmic improvements that eliminate possible exponential processing and in general takes more care to avoid recomputation.
Aside from algorithmic changes, these changes also prepare for numerous further optimizations. The algorithmic changes already already give enough of an improvement (especially for some large files) to warrant another release.
Language change
This release also introduces a slight language change regarding disjunctions. Consider
x: *1 | a
a: *2 | 3
Previously, the result of x
would be *1 | *2 | 3
, in other words, a default value of 1 | 2
. With the new semantics, the default in this case will be 1
. In general, with the new semantics, if a disjunction has a term with a default, the other terms can never result in a default value.
Superficially, this makes it easier to see where defaults may come from and eliminates the need to check all terms of a disjunction. But this change also prevents some unintuitive behavior and even cases where making values more specific may lead to a less specific result.
Backwards compatibility
The changed disjunction rule may cause backwards incompatibility.
There are some minor bug fixes as a result of these changes that may change the behavior For instance, [...] | []
was previously normalized to []
.
There are also some changes to error messages as a result of these changes.
Changelog
cc41853 doc/ref/spec.md: change disjunction rule
d5b4ca8 internal/core/adt: add logging utilities for debugging
0c3791e internal/core/adt: add memory management
008d37d internal/core/adt: catch errors for circular failures
b619e0c internal/core/adt: consider closed status for equality
396202c internal/core/adt: don't pre-expand disjunctions
69e0c96 internal/core/adt: introduce HasDefaults for Disjunction
514082a internal/core/adt: keep nodeContext in Vertex
a595db2 internal/core/adt: skip partial unify if unnencessary
02ff29b internal/core/convert: fix faulty label update
778719e internal/core/eval: breadth-first disjunction resolution
2be20f8 internal/core/eval: do not precompute matchers
399ba76 internal/core/eval: export fieldSet fields
0ef6caa internal/core/eval: make arcMap a list
1fa69d5 internal/core/eval: recursive disjunctions
9ca9e04 internal/core/eval: separate out dynamic fields
0e1e7b5 internal/core/eval: small cleanup of evaluation code
062b3d8 internal/core/eval: sort empty disjunction message to top of group
359685a internal/core/eval: use env from fieldSet
d4c600f internal/core/export: extract docs from nested Vertex values
c62d8a0 internal/core: merge adt with eval package
cea55b2 internal/core: reimplementation of closedness algorithm
93c79a3 tools/flow: record dependencies per value based on path