From bdff45e0c8cbe61cc6ad8f9884253c2872f7bb59 Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Fri, 25 Sep 2026 16:01:47 -0400 Subject: [PATCH 1/4] fix: register the wire effect the way bend 2.0.28 asks bend 2.0.28 registers a JS effect with io_eff(CID(Name), run, need), as a C effect does, runs each effect .js in a closure of its own, and no longer defines the CID_ macros the C side used. Unported, the JS lane stops at "no effect registers ezhttp/wire.ezwire.talk" and the native build at an undeclared CID_EZWIRE_TALK. - ezhttp/effs/wire.js: ends with io_eff(CID(ezwire.talk), ezwire_talk) (no need: it answers at once, as the C side's 0 does); the header note about one concatenated script now says the file runs in its own closure. - ezhttp/effs/wire.c: io_eff(CID_EZWIRE_TALK, ...) becomes io_eff(CID(ezwire.talk), ...). No def is renamed. Plain GET/POST, a refused port, an HTTPS GET and a failed TLS handshake answer the same on both lanes under 2.0.28 as under 2.0.27. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Vp3SCG5bcKMF4fUytZTwPj --- ezhttp/effs/wire.c | 2 +- ezhttp/effs/wire.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ezhttp/effs/wire.c b/ezhttp/effs/wire.c index 0a8672d..884ff78 100644 --- a/ezhttp/effs/wire.c +++ b/ezhttp/effs/wire.c @@ -338,5 +338,5 @@ Term ezwire_talk_run(Env e, Term* f, IoWork* w) { } static void __attribute__((constructor)) ezwire_talk_use(void) { - io_eff(CID_EZWIRE_TALK, ezwire_talk_run, 0); + io_eff(CID(ezwire.talk), ezwire_talk_run, 0); } diff --git a/ezhttp/effs/wire.js b/ezhttp/effs/wire.js index e2a72be..544aaa2 100644 --- a/ezhttp/effs/wire.js +++ b/ezhttp/effs/wire.js @@ -7,8 +7,9 @@ // same way too, with dlopen at run time, because neither lane has a link line // that could name -lssl. // -// Every name here is a `function`, never a top-level `const`: each effect's JS -// lands in one concatenated script, and a redeclared `const` there is fatal. +// The file runs once in a closure of its own and registers the effect at its +// foot with io_eff, as wire.c does. The helpers are still `function`s and the +// loaded libraries still live on globalThis, so each is opened once per process. // libc's resolver. io_sys() already carries the socket calls; getaddrinfo is // the one it does not, and it is the whole of ez's DNS. @@ -259,3 +260,5 @@ function ezwire_talk(spec) { io_sys().close(fd); return out; } + +io_eff(CID(ezwire.talk), ezwire_talk); From 441c01e01c4f0d0f4bb357caec68d5712307ec5e Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Fri, 25 Sep 2026 16:01:47 -0400 Subject: [PATCH 2/4] chore: bench argv helpers named by words, not digits bend 2.0.28 refuses a name segment that starts with a digit ("expected a name (words joined by dots, got 'argv.3')"). bench/main.bend is not in the hub walk. Renamed, with every use: - argv.0 -> argv.w0 - argv.1 -> argv.w1 - argv.2 -> argv.w2 - argv.3 -> argv.w3 Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Vp3SCG5bcKMF4fUytZTwPj --- bench/main.bend | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bench/main.bend b/bench/main.bend index db013dc..1d0e4da 100644 --- a/bench/main.bend +++ b/bench/main.bend @@ -76,7 +76,7 @@ def die.msg(msg: String) -> IO(Unit): IO.die(Unit, 1, msg) # command plus three words; further words are ignored -def argv.3(a: String, b: String, c: String, xs: List) -> String & String & String & String: +def argv.w3(a: String, b: String, c: String, xs: List) -> String & String & String & String: match xs: case Nil{}: (a, b, c, "") @@ -84,28 +84,28 @@ def argv.3(a: String, b: String, c: String, xs: List) -> String & String (a, b, c, d) # third word -def argv.2(a: String, b: String, xs: List) -> String & String & String & String: +def argv.w2(a: String, b: String, xs: List) -> String & String & String & String: match xs: case Nil{}: (a, b, "", "") case c <> t: - argv.3(a, b, c, t) + argv.w3(a, b, c, t) # second word -def argv.1(a: String, xs: List) -> String & String & String & String: +def argv.w1(a: String, xs: List) -> String & String & String & String: match xs: case Nil{}: (a, "", "", "") case b <> t: - argv.2(a, b, t) + argv.w2(a, b, t) # split argv in one walk (the list is affine) -def argv.0(xs: List) -> String & String & String & String: +def argv.w0(xs: List) -> String & String & String & String: match xs: case Nil{}: ("", "", "", "") case a <> t: - argv.1(a, t) + argv.w1(a, t) # plain text content type def ctype.plain() -> String: @@ -610,7 +610,7 @@ def main.go.un(quad: String & String & String & String) -> IO(Unit): # unpack argv and run the named command def main.go(args: List) -> IO(Unit): - main.go.un(argv.0(args)) + main.go.un(argv.w0(args)) # CLI entry def main() -> IO(Unit): From 29e4013e7b8dff3429f15698fd083ecb2d90e0a7 Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Fri, 25 Sep 2026 16:01:47 -0400 Subject: [PATCH 3/4] build: bend 2.0.28 in the flake nix flake update bend moves the bend input to bendlang/bend main (2.0.28). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Vp3SCG5bcKMF4fUytZTwPj --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 21b5b2c..3fe98e4 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1790348040, - "narHash": "sha256-6oh+6jj7kyl4xJsmq4p3BtU/BUl2f2LlC/5kH081D1M=", + "lastModified": 1790359392, + "narHash": "sha256-z0Xwg46QesyRnlb7+sQue2GRq90v9M2XVaNVVSdd5Vs=", "owner": "bendlang", "repo": "bend", - "rev": "774ef644dccf9c3f8053f7276d8901ad23da006c", + "rev": "11c65a2572e16d0bfc2e83068b23ed8fb180ccc0", "type": "github" }, "original": { From 711d9db9dfc4f578f94b0bd5ff7565b27f124e40 Mon Sep 17 00:00:00 2001 From: Noah Gardner Date: Fri, 25 Sep 2026 16:15:48 -0400 Subject: [PATCH 4/4] build: ez keeps its own bend (2.0.27) ez 1.2.0 does not build on bend 2.0.28 (its sha256 dependency declares `type Window`, now a Base name), so the ez input no longer follows this flake's bend: ez, `ez prove` and bolt (packages.bolt and mkLint) use the bend ez 1.2.0 locks, and the package's own builds use 2.0.28. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Vp3SCG5bcKMF4fUytZTwPj --- flake.lock | 41 +++++++++++++++++++++++++++++++++++++---- flake.nix | 7 +++++-- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 3fe98e4..e2c72df 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,28 @@ "type": "github" } }, + "bend_2": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1790200275, + "narHash": "sha256-huYLnKbMUukFhFLypIXx/wLVU3EmgsUEe9l67mU6CDw=", + "owner": "bendlang", + "repo": "bend", + "rev": "d37909174ebd664338ae3194799a9e0899dedd51", + "type": "github" + }, + "original": { + "owner": "bendlang", + "repo": "bend", + "rev": "d37909174ebd664338ae3194799a9e0899dedd51", + "type": "github" + } + }, "ez": { "inputs": { - "bend": [ - "bend" - ], + "bend": "bend_2", "nixpkgs": [ "nixpkgs" ] @@ -44,6 +61,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1790185690, + "narHash": "sha256-xJ+X4hBtOcAFGBOe5nAMyMUeF9foJBmIOu3NjBqBycU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4975466d324710c576dc11ad614684e6bd8cad8e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1789921291, "narHash": "sha256-Ft/BRnIqw1MywFoXydKobjjWmDFgDdYtSpJliE8+yUw=", @@ -63,7 +96,7 @@ "inputs": { "bend": "bend", "ez": "ez", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index ce0153e..966f41d 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,10 @@ inputs.ez = { url = "github:Emerging-Patterns/ez"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.bend.follows = "bend"; + # not `inputs.bend.follows = "bend"`: ez 1.2.0 does not build on bend + # 2.0.28, so ez (and `ez prove`, and bolt through mkLint) keep the bend + # ez 1.2.0 locks, 2.0.27 + inputs.bend.url = "github:bendlang/bend/d37909174ebd664338ae3194799a9e0899dedd51"; }; outputs = { self, nixpkgs, ... }@inputs: @@ -20,7 +23,7 @@ ez = inputs.ez.lib.${system}; ezBin = inputs.ez.packages.${system}.default; bend = inputs.bend.packages.${system}.default; - bolt = ez.toolPackage { name = "bolt"; src = self; inherit bend; wrapFlags = [ "--gpu" "off" ]; }; + bolt = ez.toolPackage { name = "bolt"; src = self; wrapFlags = [ "--gpu" "off" ]; }; bend-cc = ez.bend-cc; bench = import ./bench {