Rocks sync/install take suspiciously long time to finish
Hi!
Recently, I've been having issues with installing and syncing plugins using :Rocks isntall and :Rocks sync, which is usually happens with pluings installed via rocks.nvim default install method, not with rocks-git.
Example:
I try to install
diffview.nvimviaRocks install diffview.nvim: Takes ~10min, then:diffview.nvim has only a `dev` version. Install anyway? to skip this prompt, run 'Rocks! install {rock}' [Y]es, (N)o:The same happens with
:Rocks! install {rock}
Eventually the plugin is installed, but I'm confused why it takes so much time.
Note: this does not reproducible with all plugins, only some show this long install, and I don't see the pattern, unless this is connected to having dev version only.
Installing with rocks-git by passing github URL usually solves the long install issue, but I am still wondering whether this is expected behaviour or this is fault of my rocks.nvim?
Info
-
rocks.nvimversion: 2.43.0 -
nvim: NVIM v0.11.4, Build type: Release, LuaJIT 2.1.1753364724 -
system: macOS Sonoma 14.7.2
Hey 👋
Based on what you're describing, it sounds like it may be luarocks downloading the luarocks.org manifest. It gets cashed, but if the cache gets invalidated, luarocks will block and download it again. That would explain the inconsistency.
We're working on rewriting rocks.nvim to replace luarocks with lux (#539, #644). That will solve this issue, as lux downloads zipped manifests. And we will eventually host our own server that doesn't use huge manifest files as a package database.
I see.
Is there a temporary solution?
I think I will be fine using rocks-git for now, but I'd like to turn off/skip luarocks sync to speed up the process.
Not that I know of, as that would involve tweaking luarocks itself. I suppose you could try adding something like this to your rocks.toml:
[luarocks]
servers = [
"https://nvim-neorocks.github.io/rocks-binaries/"
]
I haven't tried it (I don't have a laptop right now), but that should prevent luarocks from using luarocks.org (the URL in the example is our static binary server).
Tried, but the long install is still present with mentioned commands. I thinks I'll wait for luarocks replacement, it isn't a critical issue.