cli: option-surface audit — spellable --engine auto, uniform usage exit codes (sweep S3) - #171
Closed
chaploud wants to merge 1 commit into
Closed
cli: option-surface audit — spellable --engine auto, uniform usage exit codes (sweep S3)#171chaploud wants to merge 1 commit into
chaploud wants to merge 1 commit into
Conversation
…e exit 2, reference doc aligned - --engine accepts 'auto' as the explicit spelling of the default (JIT-preferring with interp fallback, last-flag-wins); the help/usage strings and the error message name all three values. - compile usage errors now exit 2 with a usage line, matching run and the dispatch layer — exit 1 stays for build/IO failures. - docs/reference/cli.md updated to match; env-var inventory audited (ZWASM_DEBUG / ZWASM_DIAG real + documented; ZWASM_ENGINE_* / ZWASM_TRAP_* are C-header macros; no undocumented flags). - drops p2_sockets' unused test-section skip import (same one-line deletion as #169/#170; merges cleanly).
Contributor
Author
|
Consolidated into #175 (all six sweep axes as one merge unit; this branch's commits are included there verbatim). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The sweep's S3 axis: the runtime/CLI option surface, audited against the あるべき論 bar.
--engine autois now spellable: the help text has always describedautoas the default, but the value itself was rejected. It now parses as the explicit spelling of the default (JIT-preferring with interp fallback, last-flag-wins); usage strings and the error message name all three values.2uniformly:compileusage errors previously exited1(lumped with build/IO failures) whilerunand the dispatcher used2.compileusage now prints a usage line and exits2;1stays for genuine build/IO failures. The exit-code table indocs/reference/cli.mddrops its asymmetry footnote.ZWASM_DEBUG/ZWASM_DIAGare the only real runtime env vars and both were already documented;ZWASM_ENGINE_*/ZWASM_TRAP_*are C-header macros (not env vars);ZWASM_TEST_SENTINEL_KEYis test-internal. All 13 parsed CLI flags are documented — no hidden surface.p2_sockets.zig's unused test-sectionskipimport (same one-line deletion as refactor: three-way split of component_wasi_p2.zig (D-444, ADR-0207) — sweep S1 #169/build: -D option surface audit — retire -Dgc + run-repro, loud sanitize rejection, document the table (sweep S2) #170 — identical hunks merge cleanly).Verification
--engine autoruns with trap exit 1 on both engines · bogus engine value exits 2 ·compilewith no args exits 2 + usage line · unit tests 3049 pass / 12 skip · lint No issues · pre-commit gate all green.