relspec templ's @TableIndex ordering is non-deterministic #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found a real upstream bug while checking codegen reproducibility: relspec templ's @TableIndex ordering is non-deterministic (content-identical, order differs) on 6 of the 18 tables — this will cause spurious failures on the "clean diff" CI gates both docs promise for regeneration. Worth filing against relspecgo.
PR opened: #11
Branch:
fix/issue-10-deterministic-table-indexCommit:
c2def00bcfe9a0529dea08efc7edafabb3489826Verification completed:
TMPDIR=$PWD/.tmp GOCACHE=$PWD/go-cache go test ./pkg/writers/template -run TestWriterTableIndexValuesDeterministic -count=1TMPDIR=$PWD/.tmp GOCACHE=$PWD/go-cache go test ./pkg/writers/template ./pkg/reflectutil -count=1TMPDIR=$PWD/.tmp GOCACHE=$PWD/go-cache go test ./pkg/writers/... -count=1TMPDIR=$PWD/.tmp GOCACHE=$PWD/go-cache go test ./... -count=1TMPDIR=$PWD/.tmp GOCACHE=$PWD/go-cache make testgit diff --checkNot merging or closing; ready for independent review.
Completed and merged via PR #11. Independent review confirmed the template values path now sorts map keys deterministically, repeatedly generated TableIndex output is byte-identical and lexically ordered, gofmt and git diff --check pass, and go test ./... passes. Feature SHA:
c2def00bcf.