rocks.nvim icon indicating copy to clipboard operation
rocks.nvim copied to clipboard

Rocks sync/install take suspiciously long time to finish

Open merv1n34k opened this issue 4 months ago • 4 comments

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.nvim via Rocks 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.nvim version: 2.43.0
  • nvim: NVIM v0.11.4, Build type: Release, LuaJIT 2.1.1753364724
  • system: macOS Sonoma 14.7.2

merv1n34k avatar Sep 07 '25 11:09 merv1n34k

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.

mrcjkb avatar Sep 08 '25 18:09 mrcjkb

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.

merv1n34k avatar Sep 08 '25 19:09 merv1n34k

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).

mrcjkb avatar Sep 08 '25 20:09 mrcjkb

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.

merv1n34k avatar Sep 09 '25 15:09 merv1n34k