Skip to content

fix: fail on unknown x.py commands - #833

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
Ehtasham-Yasin:fix/unknown-x-command
Oct 1, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
Ehtasham-Yasin:fix/unknown-x-command

Conversation

@Ehtasham-Yasin

@Ehtasham-Yasin Ehtasham-Yasin commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

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.

Signed-off-by: Ehtasham-Yasin <ehtasham.yasin.dev@gmail.com>
@Ehtasham-Yasin

Copy link
Copy Markdown
Contributor Author

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.

@Ehtasham-Yasin

Copy link
Copy Markdown
Contributor Author

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.

@LunaStev
LunaStev merged commit 3b894b3 into wavefnd:master Oct 1, 2026
21 of 26 checks passed
@LunaStev LunaStev mentioned this pull request Oct 1, 2026
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.

Return a failure exit status for unknown x.py commands

2 participants