Closed nialov closed 3 years ago
We can still cache them, for the hash we just need to strip the path prefix and replace it with something predictable. Maybe the version? The filename in the cache wont be very usable but the cache itself should be fine.
Only running an M1 MacBook at the moment so just trying to install an x64 VM so I can test this.
So I wasn't able to figure out how to create a unique ID for a Neovim version. The closest I got was lua print(vim.inspect(vim.version()))
.
So instead I've fixed it so modules loaded from /tmp
are never cached.
Calls to
vim.loop.fs_stat
will fail for builtin lua files of neovim (such as/tmp/.mount_nvimYb1LQX/usr/share/nvim/runtime/lua/vim/treesitter/query.lua
) in theimpatient.lua
hash
function when neovim is installed as an AppImage. *I imagine the main cause is that AppImage makes a new `.mount_` directory on each launch (?).**Because the call fails it returns nil which doesn't have the
mtime
key/attribute resulting in error on thefs_stat
line.Could check that the file exists and as at least temporary fix skip these builtin lua files if they have the
.mount_
directory as a parent in their filetree? E.g.