Commit Graph

10 Commits

Author SHA1 Message Date
M 64a0d29496 Say why an empty name is rejected, and finish what that removed
Tests / vet + fmt + tests (push) Failing after 42s
The reason given was wrong. A dot path did reach an empty-named field:
Fake("a.") returned it, Fake("a.b.") returned a nested one, and {..a.} bound
it. What was true is narrower — List never offered it, because an empty name
is no path segment — so the engine accepted spellings it would not advertise.
The message, the test comment and the README say that instead.

Two things the rejection finished off:

A {} token still reported "no field \"\"", pointing at a fix the loader now
rejects — two errors for one rule. It is told the name can never exist, like
an option token already is.

addressable is dead: both halves of "not empty and no dot" are now rejected
where a name is authored. Mutating it to panic leaves the suite green here
and panics on main, so it was live and is not. Keeping it would preserve the
silent-hiding this change removes — List quietly omitting a name rather than
New refusing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 07:31:18 +02:00
Mikael Göransson 362c484825 Advertise only spellable paths, and name what a choice's variants share 2026-08-28 13:15:14 +02:00
Mikael Göransson 1665b37cad Precompute each choice's shared paths so a dotted path stays O(1) 2026-08-28 13:15:14 +02:00
lilleman af5b8c9abd Require every choice variant to carry a path, and list only what Fake accepts 2026-08-28 13:15:14 +02:00
lilleman f03825671e Report the canonical node path in load errors 2026-08-28 12:59:28 +02:00
lilleman 5b6480a094 Updates from reviewers 2026-06-09 10:03:53 +02:00
lilleman cde56b7924 Add session-scoped seq() builtin; move uuid v4 from locales to misc only 2026-06-09 01:52:39 +02:00
lilleman 8db65ac598 Replace locale dirs with a data-folder namespace model: New([]paths), folder dot-paths, last-wins merge 2026-06-08 23:52:37 +02:00
lilleman 3e1cd3ee2a Add repeat/separator templates; validate at compile time; support Go 1.22+ via GO_VERSION 2026-06-08 21:11:58 +02:00
lilleman 943a1d9f1b Add fakes library: recursive JSON template engine, i18n locales, Docker workflow 2026-06-05 19:51:18 +02:00