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

How to prevent the cli to redownload the crates #320

Open
afidegnum opened this issue May 1, 2024 · 1 comment
Open

How to prevent the cli to redownload the crates #320

afidegnum opened this issue May 1, 2024 · 1 comment
Labels
A-cli Area: command line interface C-bug Category: bug tribble-reported This issue was reported through Tribble.

Comments

@afidegnum
Copy link
Contributor

This issue is reporting a bug in the code of Perseus. Details of the scope will be available in issue labels.
The author described their issue as follows:

running perseus build or perseus serve redownloads wasb-bindgen is there a way to stop the download to instead work with already downloaded crates?
For some of us using metered bandwidth, it can be costly.

The steps to reproduce this issue are as follows:

perseus build
perseus serve

A minimum reproducible example is available at <>.

  • Hydration-related: false
  • The author is willing to attempt a fix: false
Tribble internal data

dHJpYmJsZS1yZXBvcnRlZCxDLWJ1ZyxBLWNsaQ==

@github-actions github-actions bot added A-cli Area: command line interface C-bug Category: bug tribble-reported This issue was reported through Tribble. labels May 1, 2024
@arctic-hen7
Copy link
Member

Redownloading should only happen when the cached artefacts are no longer available. Assuming you're on Linux, what's the output of ls ~/.cache/perseus_cli/tools?

If this is happening continuously, it might be that your cache is being cleared very regularly, which might be to do with the amount of storage space left on your system? If that is the case, you could always copy the artefacts out of the cache path in the above command and provide paths to the binaries manually with the --wasm-bindgen-path and --wasm-opt-path arguments (both take a path afterward). The cache will contain folders for wasm-bindgen-<version> and wasm-opt-<version>. You should copy the appropriate binaries (wasm-bindgen for bindgen and bin/wasm-opt for wasm-opt) and then put those somewhere that won't be cleared. Then you could alias perseus="perseus --wasm-bindgen-path <path> --wasm-opt-path <path>" so you don't have to type that every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: command line interface C-bug Category: bug tribble-reported This issue was reported through Tribble.
Projects
None yet
Development

No branches or pull requests

2 participants