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

feature: print useful error message upon wit_version mismatch #168

Open
nick1udwig opened this issue May 30, 2024 · 0 comments
Open

feature: print useful error message upon wit_version mismatch #168

nick1udwig opened this issue May 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nick1udwig
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
When I forget to add a "wit_version" to my metadata.json I get this error:

ERROR src/main.rs:896: 
   0: Command `wasm-tools ["component", "wit", "/home/nick/git/kit/foo_bar/test/foo_bar_test/foo_bar_test/target/wit", "-o", "/home/nick/git/kit/foo_bar/test/foo_bar_test/foo_bar_test/target/bindings/foo_bar_test/target.wasm", "--wasm"]` failed with exit code 1
      stdout: 
      stderr: error: failed to resolve directory while parsing WIT for path [/home/nick/git/kit/foo_bar/test/foo_bar_test/foo_bar_test/target/wit]

      Caused by:
          0: failed to parse package: /home/nick/git/kit/foo_bar/test/foo_bar_test/foo_bar_test/target/wit
          1: interface or world `process-v0` not found in package
                  --> /home/nick/git/kit/foo_bar/test/foo_bar_test/foo_bar_test/target/wit/tester:sys-v0.wit:26:13
                   |
                26 |     include process-v0;
                   |             ^---------
   0: 

Location:
   src/build/mod.rs:51

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   0: kit::build::run_command
      at src/build/mod.rs:42
   1: kit::build::compile_rust_wasm_process
      at src/build/mod.rs:239
   2: kit::build::compile_package_item
      at src/build/mod.rs:460

Describe the solution you'd like
Ideally we should print a USEFUL error message for the user.

@nick1udwig nick1udwig added the enhancement New feature or request label May 30, 2024
@nick1udwig nick1udwig changed the title feature: feature: print useful error message upon wit_version mismatch May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant