From 97e706c791eb068db6fd13abd6b653061ee2b636 Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Fri, 25 Sep 2026 15:37:40 -0400 Subject: [PATCH 1/2] build: bolt v1.8.0 as a tool, relock in ez 1.2.0's layout flake.lock pins ez v1.2.0 (94d441e) and bend 2.0.27; ez.lock.toml is rewritten once by ez 1.2.0's lock, in eztoml 0.4.0's layout. No package content changes. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Vp3SCG5bcKMF4fUytZTwPj --- ez.lock.toml | 6 +++--- ez.toml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ez.lock.toml b/ez.lock.toml index 41dc6f7..9dfd90d 100644 --- a/ez.lock.toml +++ b/ez.lock.toml @@ -106,7 +106,7 @@ narHash = "sha256-FLTyFw5HkOrl/T6E8hbs/XVwL05oGmcJARW9I9eHdgA=" [tools] [tools.bolt] git = "https://github.com/Emerging-Patterns/bolt" -rev = "bee8f22cc127b2336a46f6af5c9cca51122759c5" -tag = "v1.3.4" +rev = "02fb09377f5c0fbddb5f6b7c32c8ab4ae14240df" +tag = "v1.8.0" root = "." -narHash = "sha256-ufakKA4HHNdx9vXD1z1x6GxtxHhUtr2LbiS1A+hf2M8=" +narHash = "sha256-53zE+3lZ/jn9GvIeGoavvNMaFyUs5dEFWd7fwP49TlM=" diff --git a/ez.toml b/ez.toml index 037c181..d03715c 100644 --- a/ez.toml +++ b/ez.toml @@ -45,7 +45,7 @@ entry = "main.bend" [tools] [tools.bolt] git = "https://github.com/Emerging-Patterns/bolt" -rev = "bee8f22cc127b2336a46f6af5c9cca51122759c5" -tag = "v1.3.4" +rev = "02fb09377f5c0fbddb5f6b7c32c8ab4ae14240df" +tag = "v1.8.0" root = "." -narHash = "sha256-ufakKA4HHNdx9vXD1z1x6GxtxHhUtr2LbiS1A+hf2M8=" +narHash = "sha256-53zE+3lZ/jn9GvIeGoavvNMaFyUs5dEFWd7fwP49TlM=" From 0c06020958a40d10f384d568376bc46afa043bf3 Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Fri, 25 Sep 2026 15:44:26 -0400 Subject: [PATCH 2/2] fix: build the table path by prepending, not appending (bolt U004) tables() appended each level's name to the path, which bolt 1.8.0's concat rule flags as a quadratic copy. The path is now kept innermost first, each level prepends, and the header reverses it once. Headers are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Vp3SCG5bcKMF4fUytZTwPj --- toml/toml.bend | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/toml/toml.bend b/toml/toml.bend index 603057e..7467daa 100644 --- a/toml/toml.bend +++ b/toml/toml.bend @@ -265,12 +265,14 @@ def head.of(segs: List<&2, String>) -> String: # a table's section, when it holds a pair or no table. A table that holds # only tables is the parent a dotted header implies, which ez never writes a # pair into; old ledgers and locks name no such table, so it is no section. +# (segs arrive innermost first, as `tables` builds them; the header reads +# them outermost first) def sect.put(skip: Bool, +ps: List<&2, Kv>, +segs: List<&2, String>) -> List<&2, Sect>: match skip: case True{}: [] case False{}: - [Sect{head.of(segs), ps}] + [Sect{head.of(List.reverse(&2, String, segs)), ps}] def sect.keep(+ps: List<&2, Kv>, parent: Bool, +segs: List<&2, String>) -> List<&2, Sect>: sect.put(Bool.and(List.is_empty(&2, Kv, ps), parent), ps, segs) @@ -280,13 +282,14 @@ def table.sects(+segs: List<&2, String>, +sub: List<&2, E.Val>, inner: List<&2, List.append(&2, Sect, sect.keep(pairs.of(sub), has.table(sub), segs), inner) # the sections of every table among a table's rows, in document order: each -# table's own section, then the tables in it, then the tables after it +# table's own section, then the tables in it, then the tables after it. The +# path to the table is kept innermost first, so a level prepends its name. def tables(rows: List<&2, E.Val>, +segs: List<&2, String>) -> List<&2, Sect>: match rows: case []: [] case E.VPair{name, E.VHead{_path, +sub}} <> tl: - +at = List.append(&2, String, segs, [name]) + +at : List<&2, String> = name <> segs List.append(&2, Sect, table.sects(at, sub, tables(sub, at)), tables(tl, segs)) case _hd <> tl: tables(tl, segs)