You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make x.py return a failure status for unsupported commands while preserving its existing diagnostic output.
Motivation
Fixes#823. Invalid commands currently print an error but exit successfully, which makes scripts treat failed invocations as successful.
Target and compatibility impact
Only invalid CLI command dispatch changes: unsupported commands now exit with status 1. Supported commands, help/usage output, and target selection are unchanged.
Validation
python3 -m unittest tools.test_x
python3 -m py_compile x.py tools/test_x.py
git diff --check
Checklist
Commit includes a DCO Signed-off-by line.
Test covers the new behavior.
User-facing diagnostics are preserved; no documentation update is needed.
The change does not affect the compiler/std/ license boundary.
CI investigation: the three failing WebAssembly jobs reproduce on the current master commit b384e64 in run 36709793033, before this PR. The failures report WebAssembly.instantiate(): Import #0 module="env" function="printf": function import requires a callable; this PR only changes the unsupported-command branch in x.py and cannot affect that runtime path.
Additional CI investigation: the Windows amd64/arm64 failures are existing test portability issues, not caused by this PR. Both jobs fail assertions that expect POSIX paths such as examples/std/example.wave and missing/wavec, while Windows correctly reports backslash-separated paths. The Windows packaging steps complete successfully. The WebAssembly failures remain the pre-existing env.printf runtime-import issue documented above.
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
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.
Summary
Make
x.pyreturn a failure status for unsupported commands while preserving its existing diagnostic output.Motivation
Fixes #823. Invalid commands currently print an error but exit successfully, which makes scripts treat failed invocations as successful.
Target and compatibility impact
Only invalid CLI command dispatch changes: unsupported commands now exit with status 1. Supported commands, help/usage output, and target selection are unchanged.
Validation
python3 -m unittest tools.test_xpython3 -m py_compile x.py tools/test_x.pygit diff --checkChecklist
Signed-off-byline.std/license boundary.