Skip to content

Search for tools in download_prebuilt #876

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RReverser
Copy link
Member

@RReverser RReverser commented Jul 9, 2020

Unlike other tools, wasm-opt doesn't have an option to cargo install, so the which check in download_prebuilt_or_cargo_install wasn't applicable.

It makes more sense to move such check to the more generic function download_prebuilt, in which case it's going to work for all tools in the same way.

Additionally, if the found version doesn't match the expected one, but user has specified --mode=no-install, try to use the tool anyway - most likely user knows what they're doing, and the version is backward-compatible, but if not, worst case the tool will error out on invalid params.

Fixes #869.


Make sure these boxes are checked! 📦✅

  • You have the latest version of rustfmt installed
$ rustup component add rustfmt
  • You ran cargo fmt on the code base before submitting
  • You reference which issue is being closed in the PR text

✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨

Unlike other tools, wasm-opt doesn't have an option to `cargo install`, so the `which` check in `download_prebuilt_or_cargo_install` wasn't applicable.

It makes more sense to move such check to the more generic function `download_prebuilt`, in which case it's going to work for all tools in the same way.

Additionally, if the found version doesn't match the expected one, but user has specified `--mode=no-install`, try to use the tool anyway - most likely user knows what they're doing, and the version is backward-compatible, but if not, worst case the tool will error out on invalid params.

Fixes rustwasm#869.
@ctron
Copy link

ctron commented Dec 17, 2020

Is there any reason why this is not getting merged?

@ashleygwilliams
Copy link
Member

@ctron the reason it's not getting merged is that this tool has suffered a lag in maintenance and currently our CI is not functioning. I'm hoping to sort this today which should help with merging things. I apologize for the delay.

@ashleygwilliams ashleygwilliams self-requested a review December 17, 2020 13:30
@ashleygwilliams ashleygwilliams added this to the 0.10.0 milestone Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasm-pack fails to locate wasm-opt in PATH
3 participants