folke / lazy.nvim

💤 A modern plugin manager for Neovim
https://lazy.folke.io/
Apache License 2.0
14.32k stars 344 forks source link

fix(luarocks): try to install from root manifest #1687

Closed mrcjkb closed 1 month ago

mrcjkb commented 2 months ago

Description

When passing the --dev flag to luarocks, it will prioritise dev versions when resolving dependencies (treating dev or scm as greater than a SemVer version) if the rockspec doesn't specify an upper version constraint (which is often the case).

Dev packages are often unstable and may cause more problems, especially for Windows users (an example I've seen is git for windows trying and failing to checkout submodules).

For now , a good compromise between too many retries and not retrying at all could be to try luarocks install from the root manifest first, but to keep the --dev flag in luarocks make.

If that still causes problems, it might be better to fall back to luarocks make without --dev first, and then to try luarocks ---dev make as a last resort. In rocks.nvim, we only fall back to adding the --dev flag if the install error message contains the string "No results matching query were found"; assuming that stable non-dev packages shouldn't depend on dev packages.

github-actions[bot] commented 1 month ago

This PR is stale because it has been open 30 days with no activity.

mrcjkb commented 1 month ago

not stale

folke commented 1 month ago

ty!