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

Improvement: print worlds to choose from in the error message for multi-world packages #996

Open
tschneidereit opened this issue Jul 4, 2024 · 1 comment

Comments

@tschneidereit
Copy link
Member

When trying to create bindings for a package with multiple worlds, one has to choose which world to target. It'd be great if the error message printed when no choice has been made would print the available options, and ideally also what the option name is for choosing them.

@primoly
Copy link
Contributor

primoly commented Jul 4, 2024

I extended the error message in: bytecodealliance/wasm-tools#1654. This does not fully address the issue about the specific cli option, since this is wit-bindgen specific. This would have to go here:

let world = resolve.select_world(&pkgs, opts.world.as_deref())?;
I don’t know how to best go about this since the select_world method returns an error for other reasons as well.

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

2 participants