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

wasmer wasmer/wabt not working as expected (multiple commands) #3345

Closed
syrusakbary opened this issue Nov 21, 2022 · 3 comments · Fixed by #3402
Closed

wasmer wasmer/wabt not working as expected (multiple commands) #3345

syrusakbary opened this issue Nov 21, 2022 · 3 comments · Fixed by #3402
Assignees
Labels
bug Something isn't working 📦 lib-cli About wasmer-cli priority-low Low priority issue
Milestone

Comments

@syrusakbary
Copy link
Member

When multiple commands are found, we should show the commands available. Right now we just directly try to run one of the commands without it being the entrypoint:

➜  ~ wasmer wasmer/wabt

wat2wasm: expected filename argument.
Try '--help' for more information.
@syrusakbary syrusakbary added the bug Something isn't working label Nov 21, 2022
@syrusakbary syrusakbary changed the title wasmer wasmer/wabt wasmer wasmer/wabt not working as expected (multiple commands) Nov 21, 2022
@fschutt
Copy link
Contributor

fschutt commented Nov 21, 2022

Should work with --command wabt

but yeah, we should show the commands

@fschutt fschutt self-assigned this Nov 22, 2022
@fschutt fschutt added 📦 lib-cli About wasmer-cli priority-low Low priority issue labels Nov 22, 2022
@fschutt
Copy link
Contributor

fschutt commented Nov 28, 2022

Seems that --command-name wabt is ignored. I'll investigate this.

@syrusakbary
Copy link
Member Author

No, the issue is that when multiple commands are given (unless there's an entrypoint), it should do something like:

$ wasmer run wasmer/wabt
The `wabt` package doesn't have a default entrypoint, but has multiple available commands: `wasm2wat`, `wat2wasm`, ...
You can run any of those by using the --command=COMMAND flag.
  -> wasmer run wasmer/wabt --command=wasm2wat ...

Also, we need to make sure that wapm2pirita only puts an entrypoint if there's only one command. If multiple commands are present, no default entrypoint should be set.

@ptitSeb ptitSeb added this to the v3.1 milestone Nov 30, 2022
bors bot added a commit that referenced this issue Dec 2, 2022
3402: Do not run first command of wapm file and print all commands instead r=fschutt a=fschutt

Fixes #3345.

Co-authored-by: Felix Schütt <felix@wasmer.io>
@bors bors bot closed this as completed in 01daa24 Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-cli About wasmer-cli priority-low Low priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants