From fdcc20ed7678a12fbfb54280476c2bfc6adb2e8d Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Tue, 29 Sep 2026 21:12:01 -0400 Subject: [PATCH] build: ez 1.3.0 and bolt 1.11.0 tooling, README imports by hub name - flake: ez follows bend again (ez 1.3.0 runs on 2.0.34); ez locked at b5693ce (v1.3.0); the interim runCommand proof check is back to ez.mkProofs - [tools.bolt] at v1.11.0 (rev 91efe4b); no new lint errors - README: install and snippets import the named hub release Co-Authored-By: Claude Opus 5.5 --- README.md | 20 ++++++++++++-------- ez.lock.toml | 6 +++--- ez.toml | 6 +++--- flake.lock | 47 +++++++---------------------------------------- flake.nix | 23 ++++------------------- 5 files changed, 29 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index e964112..549fee6 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,18 @@ JSON for [Bend 2](https://github.com/bendlang/bend). ## Install With [Bend](https://github.com/bendlang/bend) alone there is nothing to -install: import ezjson by its hub name and `bend` fetches it from -[the hub](https://hub.bend-lang.com) into `~/.bend/lib` on the first run. -`0x81c67699424929b5c44cd8577e18117f` is ezjson v1.1.0. +install: import ezjson by its hub name and version, and `bend` fetches it +from [the hub](https://hub.bend-lang.com) into `~/.bend/lib` on the first +run; no install step. ezjson is built and checked on Bend 2.0.34. ``` -import 0x81c67699424929b5c44cd8577e18117f/main.bend as Ezjson +import emerging-ezjson@1.1.0.0/main.bend as Ezjson ``` +`emerging-ezjson@1.1.0.0` is ezjson v1.1.0 and resolves to +`0x81c67699424929b5c44cd8577e18117f`; to pin by content, import +`0x81c67699424929b5c44cd8577e18117f/main.bend` instead. + Or with [ez](https://github.com/Emerging-Patterns/ez), which records the package in `ez.toml` (`ez init` makes one): @@ -34,8 +38,8 @@ builds null when the text is not a JSON number. The `Json` type is `match` on a result its own def, since Bend matches only a parameter. ``` -import 0x81c67699424929b5c44cd8577e18117f/main.bend as Ezjson -import 0x81c67699424929b5c44cd8577e18117f/src/value.bend as Value +import emerging-ezjson@1.1.0.0/main.bend as Ezjson +import emerging-ezjson@1.1.0.0/src/value.bend as Value def shown(got: Maybe<&2, Value.Json>) -> String: match got: @@ -79,8 +83,8 @@ Walk a large object or array one event at a time. `skip` drops a subtree you do not need. `text` copies an owned string when you need one. ``` -import 0x81c67699424929b5c44cd8577e18117f/main.bend as Ezjson -import 0x81c67699424929b5c44cd8577e18117f/src/pull.bend as Pull +import emerging-ezjson@1.1.0.0/main.bend as Ezjson +import emerging-ezjson@1.1.0.0/src/pull.bend as Pull def owned.go(step: (Pull.Ev & Pull.Cur)) -> (String & Pull.Cur): (ev, rest) = step diff --git a/ez.lock.toml b/ez.lock.toml index d45c797..36a46c0 100644 --- a/ez.lock.toml +++ b/ez.lock.toml @@ -4,8 +4,8 @@ hub = "https://hub.bend-lang.com" [tools] [tools.bolt] git = "https://github.com/Emerging-Patterns/bolt" -rev = "d5a67600a96ba423f2212bd661a30c1fba38eb55" -tag = "v1.9.0" +rev = "91efe4bbaad91953652794ad55be7b49c10a2eff" +tag = "v1.11.0" root = "." -narHash = "sha256-HmJ8J1xDshBdSWXIiEp48GZ9qHsm+bmpHw06ZWwcDVE=" +narHash = "sha256-0xjoxoByI8PKBrbFy4eYGbKQ3ZVscknZLKkWQroYAUI=" entry = "main.bend" diff --git a/ez.toml b/ez.toml index b4cb9a3..b5e1f1c 100644 --- a/ez.toml +++ b/ez.toml @@ -4,8 +4,8 @@ entry = "main.bend" [tools.bolt] git = "https://github.com/Emerging-Patterns/bolt" -rev = "d5a67600a96ba423f2212bd661a30c1fba38eb55" -tag = "v1.9.0" +rev = "91efe4bbaad91953652794ad55be7b49c10a2eff" +tag = "v1.11.0" root = "." -narHash = "sha256-HmJ8J1xDshBdSWXIiEp48GZ9qHsm+bmpHw06ZWwcDVE=" +narHash = "sha256-0xjoxoByI8PKBrbFy4eYGbKQ3ZVscknZLKkWQroYAUI=" entry = "main.bend" diff --git a/flake.lock b/flake.lock index c1c07c1..cc682bf 100644 --- a/flake.lock +++ b/flake.lock @@ -21,38 +21,21 @@ "type": "github" } }, - "bend_2": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1790482124, - "narHash": "sha256-Gv309ikt48M8cISbwSo6V0md2572iieIRiyl3noF1cA=", - "owner": "bendlang", - "repo": "bend", - "rev": "af569d4826913b2ce3557e9829ccad31fcf86f94", - "type": "github" - }, - "original": { - "owner": "bendlang", - "repo": "bend", - "rev": "af569d4826913b2ce3557e9829ccad31fcf86f94", - "type": "github" - } - }, "ez": { "inputs": { - "bend": "bend_2", + "bend": [ + "bend" + ], "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1790514265, - "narHash": "sha256-NrMlq4aruqBVCNsy9TZtcMayDn3HEhb1I8AyiE233Kw=", + "lastModified": 1790728722, + "narHash": "sha256-6SDNpCeAfR66xuSO8vkoBMZAQ24ZUyGYLc9GFadFYy8=", "owner": "Emerging-Patterns", "repo": "ez", - "rev": "f37f6d20dc144cd74bb0cd51f9ec4e6925826548", + "rev": "b5693ce28337e770b2c70c99d53d311cd044dc24", "type": "github" }, "original": { @@ -62,22 +45,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1790578696, - "narHash": "sha256-ZoxIApko70jCdbH3l20HWXOBaT2HZd87orzd2yJ9dVE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7a0f122f5090cf4c2ade2a13a0e229d4e19ba71f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1789546076, "narHash": "sha256-zVxLZiSnmaaPLwnhj7pwmqe3axBg/C6nG5JZsJMh2g4=", @@ -97,7 +64,7 @@ "inputs": { "bend": "bend", "ez": "ez", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 6c275ea..a52c39e 100644 --- a/flake.nix +++ b/flake.nix @@ -8,13 +8,11 @@ url = "github:bendlang/bend/777ee0b55c485afdd7e68bd917b3d23a88d77371"; inputs.nixpkgs.follows = "nixpkgs"; }; - # ez and its bolt stay on the bend ez's own flake.lock records until ez - # releases on 2.0.34, so ez's inputs.bend is pinned, not followed. The - # package's own builds and its proofs (checks.proofs) run on 2.0.34. + # ez 1.3.0 runs on 2.0.34, so ez (and the bolt it builds) follows this bend inputs.ez = { url = "github:Emerging-Patterns/ez"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.bend.url = "github:bendlang/bend/af569d4826913b2ce3557e9829ccad31fcf86f94"; + inputs.bend.follows = "bend"; }; outputs = { self, nixpkgs, ... }@inputs: @@ -46,21 +44,8 @@ apps.${system} = bench.apps; checks.${system} = { - # every PROOF.bend on this flake's bend: its first line must be - # ALL PROOFS CHECK. ez.mkProofs comes back when ez runs on 2.0.34. - proofs = pkgs.runCommand "ezjson-proofs" { - nativeBuildInputs = [ bend ]; - BEND_LIB = ez.bendLib ./ez.lock.toml; - } '' - export HOME=$TMPDIR - cp -r ${self} src && chmod -R u+w src && cd src - for p in $(find . -name PROOF.bend -not -path './.ez/*' | sort); do - first=$(cd "$(dirname "$p")" && bend "$(basename "$p")" | head -n 1) - echo "$p: $first" - [ "$first" = "ALL PROOFS CHECK" ] || exit 1 - done - touch $out - ''; + # every PROOF.bend must print ALL PROOFS CHECK (ez prove) + proofs = ez.mkProofs { ez = ezBin; src = self; }; lint = ez.mkLint { src = self; }; } // bench.checks // scale.checks;