Replies: 2 comments
|
I think the right behavior should be that mise is able to refetch missing http installs automatically rather than avoiding deleting the cache files |
0 replies
|
Same disease class, different victim: the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When a tool is installed via the
http:backend, mise stores the downloaded artifact under the cache directory (e.g.~/.cache/mise/http-tarballs/...) and the “install” path under~/.local/share/mise/installs/...is a symlink into that cache.As a result, running
mise cache clearcan delete the underlying cached artifact and leave the installed tool as a dangling symlink, breaking the tool until it is reinstalled.This is surprising because
cache clearsounds like it should only remove transient caches, not remove “installed” tools.Why this matters
mise cache clearwhile troubleshooting unrelated issues.http:tools even though they appear “installed”.~/.cache/mise, which is misleading whenhttp:installs are backed by the cache.Reproduction steps
Install an
http:tool (example:claude).Verify the executable works.
Inspect the install directory.
ls -la ~/.local/share/mise/installs/claudeYou’ll see something like:
<version>->~/.cache/mise/http-tarballs/<hash>Clear the cache.
Try to run the tool again.
Observed: tool no longer runs (dangling symlink / missing binary). Reinstall is required.
Expected behavior
One of the following:
Add a safety option such as:
mise cache clear --keep-installed~/.local/share/mise/installs/**).Or: make safe behavior default and require
--forceto remove cache entries backing active installs.Or, clarify docs and CLI messaging:
mise cache clearhelp text warns that forhttp:tools, installs may live in cache and will be removed.~/.cache/misecan removehttp:tool installs.Actual behavior
mise cache cleardeletes the cache storage thathttp:installs point to.Proposed implementation idea (high level)
Before deleting cache entries, detect whether they are referenced by any symlink inside
~/.local/share/mise/installs/**.If
--keep-installedis set (or by default), skip those referenced cache paths.Optionally print a summary like:
All reactions