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

feat: add cache clearing to repair mode, improve uv cache handling #54

Open
psychedelicious opened this issue Feb 12, 2025 · 0 comments

Comments

@psychedelicious
Copy link
Collaborator

Like pip, uv caches package downloads to support quick installation.

Currently, the launcher uses the system uv cache. Occasionally, a package gets borked - presumably during or after the wheel is extracted, because the actual downloads from PyPI (i.e. the wheels) are hashed and checked.

When this happens, we need to evict the offending packages from the uv cache. The launcher docs and Invoke quick-start docs both describe how to clear the uv cache by running a command in the dev console.

It would be nice if repair mode did this for the user. Unfortunately, the command cleans the whole uv cache. This is rather rude to those who use uv for things other than Invoke - it wipes out their cache and forces all packages to be re-downloaded.

Well, what if we had uv use a separate cache for Invoke? It's possible, but those who use uv for other things could have a lot of duplicated cached packages. So that's also kinda rude.

If we did make the switch to using a separate cache, we'd be doubling disk usage for existing users. Their uv system cache would still be full from their last Invoke install, but then we are we are making and downloading everything to a new cache!

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