Delete the reported-order clauses and checkRecordDraws' record-only comment
This commit is contained in:
@@ -46,7 +46,6 @@ func (f *drawFence) checkRecordDraws(path string, n node) error {
|
||||
if !ok || !t.isRecord {
|
||||
return nil
|
||||
}
|
||||
// A record-only template's format renders nothing, so weigh the columns, not the format.
|
||||
columns := sortedNames(t.fields)
|
||||
reads := false
|
||||
for _, name := range columns {
|
||||
|
||||
@@ -6,8 +6,7 @@ import (
|
||||
)
|
||||
|
||||
// walkNodes calls fn once per contained node, passing the dot path that reaches it,
|
||||
// visiting keys in sorted order so which of several broken nodes gets reported does
|
||||
// not depend on map iteration.
|
||||
// visiting keys in sorted order.
|
||||
func walkNodes(root map[string]node, fn func(path string, n node) error) error {
|
||||
for _, name := range sortedNames(root) {
|
||||
if err := eachNode(root[name], name, fn); err != nil {
|
||||
|
||||
+2
-4
@@ -28,8 +28,7 @@ func heldCheck(path string, n node) error {
|
||||
}
|
||||
|
||||
// heldNames lists a template's held names, operands' first, then paths', each
|
||||
// in name order: a level read both ways is reported by the operand's fence, and
|
||||
// which overlap is reported does not vary.
|
||||
// in name order: a level read both ways is reported by the operand's fence.
|
||||
func heldNames(t *template) []string {
|
||||
names := make([]string, 0, len(t.compiled.held))
|
||||
for name := range t.compiled.held {
|
||||
@@ -172,8 +171,7 @@ func renders(n node, want, seen map[node]bool) bool {
|
||||
// checkNoOverlap rejects a format that both renders a sibling level and reads a path
|
||||
// into it — {p} beside {p.first}, {p.addr} beside {p.addr.city}. The path reads the
|
||||
// level's held draw while rendering the level expands it afresh, so their values would
|
||||
// disagree. Reads are compared in sorted order, so which pair is reported does not
|
||||
// depend on where the tokens sit.
|
||||
// disagree.
|
||||
// docs/decisions.md#a-bare-reference-draws-each-time-a-reference-path-is-held
|
||||
func checkNoOverlap(c formatOps) error {
|
||||
names := pathHeadReaders(c)
|
||||
|
||||
@@ -371,8 +371,7 @@ func readOptions(m map[string]any, pos position) (templateOptions, error) {
|
||||
return o, nil
|
||||
}
|
||||
|
||||
// compileFields compiles every non-option key of a template object, in name order
|
||||
// so which of several bad fields is reported does not vary.
|
||||
// compileFields compiles every non-option key of a template object, in name order.
|
||||
func compileFields(m map[string]any, pos position) (map[string]node, error) {
|
||||
fields := make(map[string]node, len(m))
|
||||
keys := make([]string, 0, len(m))
|
||||
|
||||
+2
-3
@@ -214,8 +214,7 @@ func (r *tableRead) replay(d *pinSet) error {
|
||||
|
||||
// check refuses what one draw per reference path cannot answer for: a read selecting a row its route
|
||||
// pinned another of, a read of a level beside a path another read takes into it, and two reads of one
|
||||
// table family that select different rows. Reads are compared in path order, so which pair is
|
||||
// reported does not vary.
|
||||
// table family that select different rows.
|
||||
func (s *readSurvey) check() error {
|
||||
if s.clash != nil {
|
||||
return s.clash
|
||||
@@ -242,7 +241,7 @@ func (s *readSurvey) check() error {
|
||||
// checkFamilies refuses reads of one table family in one draw group that cannot
|
||||
// read one consistent draw: a table rendered whole beside a path into the family,
|
||||
// a table one read draws that another pins, and two reads pinning different rows.
|
||||
// The reads come sorted by group and path, so which pair is reported does not vary.
|
||||
// The reads come sorted by group and path.
|
||||
func checkFamilies(reads []pathRead) error {
|
||||
for i, r := range reads {
|
||||
if r.tr == nil {
|
||||
|
||||
@@ -34,9 +34,6 @@ ranking `readSurvey.walk` and `edge` hardest and the unit they would least modif
|
||||
|
||||
This round, in order:
|
||||
|
||||
- Delete the "so which … is reported does not vary" clause at its five sites past
|
||||
`checkNodeFences`, and `checkRecordDraws`' "A record-only template's format renders
|
||||
nothing", which runs over templates with a format too.
|
||||
- Run the nine-seat panel again and file what it names here.
|
||||
|
||||
### Data
|
||||
|
||||
Reference in New Issue
Block a user