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

cargo-wasix does not work when the toolchain is installed in a deleted directory #30

Open
Arshia001 opened this issue Aug 1, 2023 · 0 comments

Comments

@Arshia001
Copy link
Contributor

Arshia001 commented Aug 1, 2023

If the toolchain is installed and the directory where it's installed is later removed, cargo-wasix fails to detect the missing toolchain and fails instead.

Steps to reproduce:

  1. Remove or rename the toolchain directory: mv /home/arshia/.local/share/cargo-wasix/toolchains/x86_64-unknown-linux-gnu_v2023-07-21.1/rust /home/arshia/.local/share/cargo-wasix/toolchains/x86_64-unknown-linux-gnu_v2023-07-21.1/rust-backup
  2. Run rustup toolchain list. The wasix toolchain will still be listed.
  3. Run rustup default wasix. Rustup will complain that the toolchain is not installed.
  4. Run cargo wasix build. It will fail to detect the missing toolchain and report an error instead:
$ cargo wasix build
error: toolchain 'wasix' is not installed
error: Could not execute rustc

Caused by:
    failed to execute "rustc" "+wasix" "--print" "sysroot"
        status: exit status: 1

Expected behaviour:
cargo-wasix should detect the missing/invalid toolchain and download it again.

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

1 participant