nvim-neorocks / rocks.nvim

🌒 Neovim plugin management inspired by Cargo, powered by luarocks
GNU General Public License v3.0
704 stars 14 forks source link

`:Rocks update` ignores transitive dependency updates for `scm` plugins #534

Closed Nsidorenco closed 1 month ago

Nsidorenco commented 1 month ago

When running :Rocks update all plugins with version=scm will be updated to their latest version but any transitive dependencies will remain at the original version.

This, particularly, is a problem for plugins with tree-sitter parsers as transitive dependencies, since you can end up with incompatible queries.

Example

  1. tree-sitter-javascript is installed with version = scm. tree-sitter-javascript depends on tree-sitter-ecma.
  2. Run :Rocks update when a new parser version of tree-sitter-javascript is available.
    • tree-sitter-javascript will have its latest version installed
    • tree-sitter-ecma will remain with the originally installed version.
  3. javascript queries might now be broken, since the parser could have changed node names but the tree-sitter-ecma rock was not updated to the latest queries.
mrcjkb commented 1 month ago

hey 👋

thanks for reporting. I'll look into this when I have some more time. I think this is actually a luarocks issue.

mrcjkb commented 1 month ago

I've added a change to the workflow that publishes versioned tree-sitter parsers to the root manifest (with a 0.0.x version) to declare exact dependencies.

For example, tree-sitter-javascript version 0.0.4 has the following dependencies:

It will take some time for the updated parsers to be available on our binary server.

We recommend switching to the versioned parsers (we have an open issue to add something like a :Rocks promote command, which should simplify this).

dev/scm luarocks packages are by definition unstable and luarocks cannot guarantee stability for scm dependencies, even if they are updated.