Cover the ancestor clash and name what drawCheck compares by
This commit is contained in:
+2
-1
@@ -226,7 +226,8 @@ func newDrawWalk() *drawWalk {
|
||||
|
||||
// walk follows what rendering n renders. A repeat renders over draws of its own, so the walk stops
|
||||
// there. A cell whose row the pins keep out has no case: a pinned table renders its pinned row
|
||||
// alone, so that cell never renders on this route.
|
||||
// alone and an unpinned one draws a row inside its nearest pinned ancestor's, so that cell never
|
||||
// renders on this route.
|
||||
func (w *drawWalk) walk(n node, at drawAt) {
|
||||
v := nodeVisit{n, at.group, at.rowsKey()}
|
||||
if w.seen[v] {
|
||||
|
||||
@@ -102,10 +102,10 @@ func checkFamilies(reads []pathRead) error {
|
||||
return replayPairs(reads)
|
||||
}
|
||||
|
||||
// replayPairs replays every two reads of one draw group that can render together into
|
||||
// one draws, the earlier read first. Pairs find every conflict a full replay would: a
|
||||
// read pins a row's ancestors with it, and clash judges a row against one pinned table,
|
||||
// so a conflict is between two reads' pins and a third read adds nothing to it.
|
||||
// replayPairs replays every two reads that can render together into one draws, the earlier
|
||||
// read first. Pairs find every conflict a full replay would: clash judges a row against one
|
||||
// pinned table, and the read that pinned it holds that pin itself, since a read's pins carry
|
||||
// its rows' ancestors, so the pair of those two reads clashes the same way.
|
||||
func replayPairs(reads []pathRead) error {
|
||||
for i, r := range reads {
|
||||
if r.tr == nil {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ func heldCheck(path string, n node) error {
|
||||
readers := boundReaders(t.ops, t.bound)
|
||||
for _, head := range heldHeads(t) {
|
||||
if _, isPath := t.bound[head]; isPath && isRef(head) {
|
||||
continue // held for the render: drawCheck compares it across the render and its groups
|
||||
continue // held for the render: drawCheck compares every read of it, by path, across the render and its groups
|
||||
}
|
||||
if err := checkHeadHeld(t, head, readers); err != nil {
|
||||
return fmt.Errorf("%s: %w", path, err)
|
||||
|
||||
Reference in New Issue
Block a user