Repository navigation
Replies: 3 comments
|
Thanks for the detailed write-up. I opened #14776, which adds It points at AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.299. |
0 replies
|
Implemented in #14776: feat(vfox): add RUNTIME.cacheDirPath for plugins |
0 replies
|
Fixed in v2026.10.17 by #14776. Update with |
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.
Uh oh!
There was an error while loading. Please reload this page.
Problem
Backend plugins can't find a persistent cache directory.
RUNTIMEexposespluginDirPath, but nothing points at the cache.MISE_CACHE_DIRreaches asdf plugins throughscript_manager.rs, but backend plugin hooks only see it if the user set it themselves. Backend plugins that need a cache have to rebuild mise's default paths for each platform, or write intopluginDirPath, where a reinstall wipes it andmise cache clearnever reaches it.Why mise's own caching doesn't cover this
The docs say hooks rarely need a cache of their own because mise caches version lists and environments. That cache stores a hook's output, one entry per tool. A backend plugin serves a whole registry, so its hooks can need a large input that every tool from that backend shares, and rebuilding it on every cache miss is expensive.
My case is mise-cabal, a backend plugin for Hackage packages. To support
minimum_release_age(#14695),BackendListVersionsneeds an upload date for each version. Hackage has no endpoint per package that returns all upload times, and/package/<pkg-ver>/upload-timereturns the latest revision's time, not the original upload. The complete source is the Hackage index (01-index.tar). Each entry carries its upload time, so the first entry for a version is its upload date.cabal updatedoes it: the last 18 days took about 680 KB.mise-cabal:*tool, while mise's version cache is per tool.Caching only the version list would download the 140 MB again for each new tool, after every
fetch_remote_versions_cacheexpiry and after everymise cache clear. With a directory that persists, the download happens once and later updates are small. The same directory would also letBackendInstallshare one index. Today each install runs its owncabal update, so every tool gets its own 140 MB download and 1 GB copy.Proposal
Add
RUNTIME.cacheDirPathfor backend plugins, a directory underMISE_CACHE_DIRowned by the plugin, for example$MISE_CACHE_DIR/plugins/<plugin-name>:BackendListVersions,BackendInstall,BackendExecEnv, ...).mise cache clearcovers it, and so doesmise cache pruneif that fits. Plugins must handle it being deleted at any time.pluginDirPathincrates/vfox/src/runtime.rsand intypes/mise-plugin.lua.Tool plugins could get the same field for free, but backend plugins are where the need comes up, since a single backend plugin serves many tools.
AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.303.
All reactions