Closed windwp closed 3 years ago
Sorry, are you saying _G.__luacache.cache[packname] = nil
doesn't work? And when you say it doesn't work, how exactly? Can you be a little more specific?
in normal case when i call that reload function it will delete the cache in package.loaded then when i require again i will get a new code but when i using your plugin i still get the old code. i try to delete it in __luacache.cache but after i require again i get the error
What error?
It will be much easier if you can provide some reproducible steps with exact commands and steps.
I just update and check again with a latest commit and the issue is fixed now I can reload a module without an error
Hey @windwp, what did you use for getting your startup time? Just --startuptime
? Or was it a plugin?
nvim --startuptime /tmp/vim.log -c "quit" && nvim /tmp/vim.log
just startuptime
For people reading this later, I added this automatically in plenary: https://github.com/nvim-lua/plenary.nvim/commit/e4e631f1056ef1dc4ce0f8ea944e2be42758a286 (Not sure if it's wise to do so, but I did it anyway)
thank for your plugin my startuptime reduce from 99ms to 66ms :+1:
https://github.com/nvim-lua/plenary.nvim/blob/master/lua/plenary/reload.lua i usually use that function to reload 1 module without reopen neovim. but it is not working with your plugin.
i try to do that but it is not working.
_G.__luacache.cache[packname] = nil
so can you provide a method to delete a cache module then reload it again.