Did you check docs and existing issues?
Neovim version (nvim -v)
v0.12.0-dev-2363+gea3942f222
Operating system/version
Arch Linux
Describe the bug
It seems that the pkg-cache.lua file does not get updated when uninstalling a plugin that also has a rockspec file.
I noticed this in LazyVim by enabling lang.python and dap.core Extras. Afterwards when disabling dap.core Extra nvim-dap and nvim-dap-python don't get uninstalled. I noticed that the pkg-cache.lua file contains an entry
{
name = "nvim-dap-python",
file = "nvim-dap-python-scm-1.rockspec",
source = "rockspec",
spec = { "nvim-dap-python", build = false, specs = { { "mfussenegger/nvim-dap" } } },
dir = "/home/jrn23/.local/share/test_configs/test/lazy/nvim-dap-python",
},
Even if you manually try to uninstall the plugins from Lazy UI, they get re-installed in the next Neovim restart. Unless you manually remove the above entry from pkg-cache.lua file the plugins won't be uninstalled.
Also tested with lang.go and dap.core and in this case, disabling dap.core Extra successfully removes the Go dap adapter. By looking through its repo, I noticed it doesn't have a rockspec file, so maybe this is related?
Steps To Reproduce
Just use LazyVim and enable/disable the aforementioned Extras.
Expected Behavior
All plugins installed by the corresponding Extra should get uninstalled.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
-- add any other plugins here
},
})
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.12.0-dev-2363+gea3942f222
Operating system/version
Arch Linux
Describe the bug
It seems that the
pkg-cache.luafile does not get updated when uninstalling a plugin that also has a rockspec file.I noticed this in LazyVim by enabling
lang.pythonanddap.coreExtras. Afterwards when disablingdap.coreExtranvim-dapandnvim-dap-pythondon't get uninstalled. I noticed that thepkg-cache.luafile contains an entry{ name = "nvim-dap-python", file = "nvim-dap-python-scm-1.rockspec", source = "rockspec", spec = { "nvim-dap-python", build = false, specs = { { "mfussenegger/nvim-dap" } } }, dir = "/home/jrn23/.local/share/test_configs/test/lazy/nvim-dap-python", },Even if you manually try to uninstall the plugins from Lazy UI, they get re-installed in the next Neovim restart. Unless you manually remove the above entry from
pkg-cache.luafile the plugins won't be uninstalled.Also tested with
lang.goanddap.coreand in this case, disablingdap.coreExtra successfully removes the Go dap adapter. By looking through its repo, I noticed it doesn't have a rockspec file, so maybe this is related?Steps To Reproduce
Just use LazyVim and enable/disable the aforementioned Extras.
Expected Behavior
All plugins installed by the corresponding Extra should get uninstalled.
Repro