diff --git a/README.md b/README.md index b576ac9..9b9b1ca 100644 --- a/README.md +++ b/README.md @@ -17,20 +17,19 @@ written in Bend, with a VS Code extension. ## Install -bolt needs a Bend 2, and any Bend 2 will do: the one +bolt needs Bend 2.0.32 or later; it is built and checked on Bend 2.0.34, the +version `flake.lock` pins. Any install of it will do: the one `curl -fsSL https://bend-lang.com/install.sh | sh` installs, one from nix, or one built from source. You do not need ez or nix. Building bolt needs clang -14+ as well, since bolt is one native binary. +14+ as well, since bolt is one native binary. `bolt check` and `bolt lsp` run +the `bend` on your PATH, so that `bend` is the one to keep at the tested +version. -**Bend version.** bolt is built and tested with Bend 2.0.34, the version -`flake.lock` pins. `bolt check` and `bolt lsp` run the `bend` on your PATH, -so that `bend` is the one to keep at the tested version. +With an installed `bend` and nothing else, build bolt v1.12.0 from the Bend +hub, where it is published as `bolt@1.12.0.0`. Put this in `t.bend`: -With an installed `bend` and nothing else, build bolt v1.9.0 from the Bend -hub, where it is `0xd96f2ab40f5df4925c42e96d0ba857ff`. Put this in `bolt.bend`: - -``` -import 0xd96f2ab40f5df4925c42e96d0ba857ff/main.bend as Bolt +```bend +import bolt@1.12.0.0/main.bend as Bolt def main() -> IO(Unit): Bolt.main() @@ -39,10 +38,14 @@ def main() -> IO(Unit): and build it: ``` -bend bolt.bend -o bolt.bin # fetches bolt and its libraries from the hub -./bolt.bin --version # bolt 1.9.0 +bend t.bend -o bolt # fetches bolt and its libraries from the hub +./bolt --version # bolt 1.12.0 ``` +There is no install step: `bend` fetches the package on the first build. +`bolt@1.12.0.0` resolves to `0x582b4b0fdf3dafdeecc8c3bfddc5e4db`, and +`import 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/main.bend` pins it by content. + Or from a clone, at the head of `main`: ``` @@ -160,11 +163,13 @@ The gate is [ez](https://github.com/Emerging-Patterns/ez), a separate binary from a separate repo: ``` -ez test every */tests/*.bend on both lanes, every PROOF.bend +ez prove every PROOF.bend: the proof gate +ez test every */tests/*.bend on both lanes ez build bin/bolt.bin the binary people run ``` -`ez test` checks every `PROOF.bend`, then runs each stay-list +`ez prove` passes when every `PROOF.bend` prints `ALL PROOFS CHECK`. `ez test` +runs each stay-list host/integration test on the JS lane and the native lane against the `#|` trailer the file ends in, caps each `bend` at `EZ_CAP` gigabytes, and caches a lane on the content of everything it reads, so a second run over an diff --git a/flake.lock b/flake.lock index c802fd4..cc682bf 100644 --- a/flake.lock +++ b/flake.lock @@ -31,11 +31,11 @@ ] }, "locked": { - "lastModified": 1790728355, - "narHash": "sha256-rqK6Ih2pdfInfGv81X0LOnt37+VaNYdcis77NMwliHg=", + "lastModified": 1790728722, + "narHash": "sha256-6SDNpCeAfR66xuSO8vkoBMZAQ24ZUyGYLc9GFadFYy8=", "owner": "Emerging-Patterns", "repo": "ez", - "rev": "8748a3505c2b46c0320cf3345eb743443dd8f2f5", + "rev": "b5693ce28337e770b2c70c99d53d311cd044dc24", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d533f36..8e3e5ce 100644 --- a/flake.nix +++ b/flake.nix @@ -51,21 +51,9 @@ ${old.buildPhase} ''; }); - # the proof gate: every PROOF.bend on this flake's bend, its first line - # ALL PROOFS CHECK. ez.mkProofs comes back when ez runs on 2.0.34. - proofs = pkgs.runCommand "bolt-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 - ''; + # the proof gate: `ez prove`, every PROOF.bend on this flake's bend, + # each passing only on a first line of ALL PROOFS CHECK + proofs = ez.mkProofs { ez = inputs.ez.packages.${system}.default; src = self; }; # bolt, built from this tree, over this tree: exit 1 on any error lint = ez.mkLint { inherit bolt; src = self; }; in {