Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return an error for invalid CLI args and build failures #49

Open
parasyte opened this issue Nov 12, 2024 · 0 comments
Open

Return an error for invalid CLI args and build failures #49

parasyte opened this issue Nov 12, 2024 · 0 comments

Comments

@parasyte
Copy link
Contributor

run_wasm_cli_with_css() should return Result<(), Error>.

When the CLI args cannot be parsed, or one of the required arguments are not passed, it must return an error. Without an error, the bin cannot return an error code to the system. And without a useful exit code indicating errors, using cargo-run-wasm in bash scripts and CI will not properly report failures.

We hit this issue over in parasyte/pixels#406, where a bug in CI went undetected since cargo-run-wasm was introduced two years ago.

Additionally, an error should be returned when the build fails. For obvious reasons.

parasyte added a commit to parasyte/pixels that referenced this issue Nov 13, 2024
Adds CI steps to check and lint the example. And fixes build failures introduced by updating `winit` and `wgpu` in #391.

`run-wasm` still won't fail out the WASM CI job when there are build errors. That is tracked upstream in rukai/cargo-run-wasm#49

Closes #406
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

No branches or pull requests

1 participant