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

Download and install packages via .tar.gz URLs and improve installation error message #3416

Merged
merged 18 commits into from
Dec 12, 2022

Conversation

fschutt
Copy link
Contributor

@fschutt fschutt commented Dec 9, 2022

Fixes #3404.

Copy link
Contributor

@theduke theduke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is much cleaner now!

Just some relatively small modifications.

tests/integration/cli/tests/run.rs Show resolved Hide resolved
lib/cli/src/commands/run.rs Show resolved Hide resolved
lib/cli/src/package_source.rs Show resolved Hide resolved
@theduke
Copy link
Contributor

theduke commented Dec 9, 2022

I tested "wrong" urls.
Gives a reasonable error:

❯ cargo run -F cranelift,webc_runner -- https://google.com/
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `/home/theduke/dev/github.com/wasmerio/wasmer/target/debug/wasmer 'https://google.com/'`
error: could not install package from URL https://google.com/
│   1: Could not unpack file downloaded from https://google.com/
╰─▶ 2: failed to unpack /tmp/download.7TKmZ2Pv9hN0/package.tar.gz: xz error: Invalid XZ magic, expected [253, 55, 122, 88, 90, 0]

Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great also from my side. Let's merge and release 3.1 once tests pass. It actually removes lines of code in our codebase, so that's a great win (-52 total lines)

@fschutt
Copy link
Contributor Author

fschutt commented Dec 12, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 12, 2022

Build succeeded:

  • Code lint

@bors bors bot merged commit 0e9d02b into master Dec 12, 2022
@bors bors bot deleted the fix-error-nonexistent-path-2 branch December 12, 2022 11:59
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

Successfully merging this pull request may close these issues.

wasmer run shows wrong message when a program path is not found
3 participants