fix(luarocks): try to install from root manifest #1687
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When passing the
--dev
flag toluarocks
, it will prioritisedev
versions when resolving dependencies (treatingdev
orscm
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 inluarocks make
.If that still causes problems, it might be better to fall back to
luarocks make
without--dev
first, and then to tryluarocks ---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.