Skip to content

feat!: bend 2.0.34, argv drops the program name, --help asks for help - #49

Merged
noah-emp merged 1 commit into
mainfrom
feat/bend-2.0.34
Sep 29, 2026
Merged

noah-emp merged 1 commit into
mainfrom
feat/bend-2.0.34

Conversation

@noah-emp

Copy link
Copy Markdown
Collaborator

Ports shake to bend 2.0.34.

  • argv: bend 2.0.32 puts the program as invoked first in IO.args. argv() now drops it (src/args.bend words), so Shake.argv() callers still get just the arguments. SHAKE-ARGS-1 gains words_keeps; SHAKE-TRUST-2 restates bend 2.0.34's C main (runtime takes --threads/--gpu + value, exits on --bend-help/--gpu-build, takes the first --; --help now reaches the program); SHAKE-TRUST-4 names words.
  • --help: a bare --help, before -- and before any positional of the current command is bound, is a request for help like help (SHAKE-PARSE-8; new laws dash_help_step, dash_help_path). A command that declares its own long help keeps it, since only an unknown --help asks for help, so check reports nothing new. unknown_long* laws gain the premise that the word is not such a --help (SHAKE-TOK-7 says so).
  • Proofs: string_eq_self re-proved against String.eq = Cmp.is_eq(String.order(..)) (String.eq.fin is gone). The walker invariants (gw/gv/gn/nd/nu) cover the new take_long.found / take_long.help steps.
  • Flake: bend pinned at 777ee0b (2.0.34), ez's bend pinned at af569d4 (2.0.31), and a proofs runCommand that requires ALL PROOFS CHECK in place of ez.mkProofs. bolt [tools.bolt] moves v1.8.0 → v1.9.0, because v1.8.0 no longer builds on ez's bend (duplicate declaration: Set).
  • README: the example reads Shake.argv(), with a note that code passing IO.args() straight to parse must drop the first word on bend ≥ 2.0.32; the runtime section is updated for 2.0.34.

bend src/PROOF.bend → ALL PROOFS CHECK; nix flake check passes (demo, proofs, lint clean).

BREAKING CHANGE: needs bend 2.0.32+; --help is now a help request.

🤖 Generated with Claude Code

Bend 2.0.32 puts the program as invoked first in IO.args, so argv now
drops that word (args.words) and every Shake.argv() caller still gets just
the arguments; SHAKE-ARGS-1 gains words_keeps. Compiled binaries pass
--help through since 2.0.29, and shake now reads a bare --help, before --
and before any positional of the current command is bound, as a request
for help exactly like `help` (SHAKE-PARSE-8, laws dash_help_step and
dash_help_path). A command that declares its own long `help` keeps it:
the help request only takes an unknown --help, so check reports nothing
new.

The proofs port to the new String.eq (Cmp.is_eq of String.order), SPEC's
trust rows restate bend 2.0.34's C main and the ALL PROOFS CHECK gate, and
the flake pins bend 2.0.34 with a proofs check that runs PROOF.bend on it,
ez pinned to its own bend 2.0.31. bolt moves to v1.9.0, since v1.8.0 does
not build on that bend.

BREAKING CHANGE: shake needs bend 2.0.32 or later: argv() drops the first
word of IO.args, which on older bend is a real argument. A bare --help is
now a request for help (help_path is Some) instead of an UnknownFlag error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noah-emp
noah-emp enabled auto-merge (squash) September 29, 2026 23:54
@noah-emp
noah-emp merged commit 4957476 into main Sep 29, 2026
1 check passed
@noah-emp
noah-emp deleted the feat/bend-2.0.34 branch September 29, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants