-
Notifications
You must be signed in to change notification settings - Fork 156
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
Cache never invalidates when changing config or updating the plugin #253
Comments
I had an idea to fix this but have not got around to it. Thinking of going the workflow route. |
#254 cannot fully resolve the environment or configuration change issue (vimrc is also in nix store). I'd still ask for an option to fully disable the cache. Currently I have to vim.fn.delete(vim.fn.stdpath("cache") .. "/nightfox/stat")
require("nightfox").setup {} |
I created a PR that hashes the file name as well as the mine time. This will handle files in the |
@EdenEast Can you review catppuccin/nvim#352 |
Description
Currently we relies on mtime, which never work with content-address-like system like Nix. It resets mtime of all sources and programs and relies purely on hashes to be pure and deterministic.
nightfox.nvim/lua/nightfox/init.lua
Lines 82 to 84 in 7413662
We should better ONLY use hash of config, plugin version, and nvim version to determine cache validity. Note that this is still kind of fragile, since the Lua version, user patches for the plugin or nvim, and a lot of other things cannot be taking into account.
Personally, I'd rather to have an option to disable the fragile cache. It's already fast to setup without any "compiled" cache.
Behavior
Expected behavior
Additional info / context
I'm on NixOS and using Nix to manage all plugins.
The text was updated successfully, but these errors were encountered: