Repository navigation
Conversation
…r and run do (#2634, #1097) Root cause: src/main.w run_cli applied the #2198 unknown-flag refusal only when `cli_cmd == "check" or cli_cmd == "ir" or cli_cmd == "run"`; every other command ignored a flag it did not know. `with build x.w --emit-llvm -o x.ll` wrote a Mach-O executable to x.ll (#1097), and `build`, `test` and `analyze` exited 0 over any misspelled flag (#2634). The condition now covers build, test and analyze; cli_known_flags already holds every flag those commands parse (DriverOptions), and `run` keeps trimming the program's own arguments (cli_driver_argc). Evidence (stage1 of this tree, test/hello.w): before build --emit-llvm rc=0; build/test --no-such-flag-2634 rc=0 after error: unknown option `--emit-llvm` for `with build` (rc=2) error: unknown option `--no-such-flag-2634` for `with test` (rc=2), likewise build and analyze Test: deep-debug-tool-tests (build.w deep_debug_unknown_flag_refused) now checks check, build (twice), test and analyze.
ehartford
marked this pull request as ready for review
October 25, 2026 20:07
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.
Root cause: src/main.w run_cli applied the #2198 unknown-flag refusal only
when
cli_cmd == "check" or cli_cmd == "ir" or cli_cmd == "run"; everyother command ignored a flag it did not know.
with build x.w --emit-llvm -o x.llwrote a Mach-O executable to x.ll (#1097), andbuild,testandanalyzeexited 0 over any misspelled flag (#2634).The condition now covers build, test and analyze; cli_known_flags already
holds every flag those commands parse (DriverOptions), and
runkeepstrimming the program's own arguments (cli_driver_argc).
Evidence (stage1 of this tree, test/hello.w):
before build --emit-llvm rc=0; build/test --no-such-flag-2634 rc=0
after error: unknown option
--emit-llvmforwith build(rc=2)error: unknown option
--no-such-flag-2634forwith test(rc=2), likewise build and analyzeTest: deep-debug-tool-tests (build.w deep_debug_unknown_flag_refused) now
checks check, build (twice), test and analyze.
Closes #2634 1097