fix(health, rockspec): accept Lua 5.1+ for luarocks compatibility#2022
Closed
slg95 wants to merge 1 commit intofolke:mainfrom
Closed
fix(health, rockspec): accept Lua 5.1+ for luarocks compatibility#2022slg95 wants to merge 1 commit intofolke:mainfrom
slg95 wants to merge 1 commit intofolke:mainfrom
Conversation
Previously, lazy.nvim health checks required exactly Lua 5.1, causing warnings on systems with newer Lua versions (5.2, 5.3, 5.4). This was unnecessarily restrictive since LuaRocks can run on any Lua version 5.1+ to build packages. Its true that Neovim plugins must be Lua 5.1 compatible (due to LuaJIT), but the `--lua-version 5.1` flag tells luarocks to build for 5.1. After some light testing, I verified a system with Lua 5.4 should be able to build Lua 5.1-compatible packages just fine. The key point is that this removes false warnings while maintaining the same safety guarantees - LuaRocks with any modern Lua version can still build packages targeting Lua 5.1 compatibility for Neovim. Closes: folke#2020
Collaborator
|
Thanks, but this warning is intended. You can work around this if you know your way around luarocks, but that is not the reason for this warning (which is just that: a warning). |
Author
|
@clason But why is this warning intended? From the discussions in #2020 and #1570, there were no concrete reasons given for why this warning exists. Just because Neovim requires plugins use Lua 5.1 doesn't mean you actually need to have Lua 5.1 installed to build LuaRocks packages that are compatible with Lua 5.1. There are of course plenty of workarounds, such as installing Lua 5.1 or just ignoring the warning. But why should people have to work around this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Previously, lazy.nvim health checks required exactly Lua 5.1, causing warnings on systems with newer Lua versions (5.2, 5.3, 5.4). This was unnecessarily restrictive since LuaRocks can run on any Lua version 5.1+ to build packages.
Its true that Neovim plugins must be Lua 5.1 compatible (due to LuaJIT), but the
--lua-version 5.1flag tells luarocks to build for 5.1.After some light testing, I verified a system with Lua 5.4 should be able to build Lua 5.1-compatible packages just fine.
I tested with image.nvim (shown in screenshot below).
The key point is that this removes false warnings while maintaining the same safety guarantees - LuaRocks with any modern Lua version can still build packages targeting Lua 5.1 compatibility for Neovim.
Related Issue(s)
Fixes: #2020
Fixes: #1570
Screenshots
To test, I added the following to my init.lua: