fix(rockspec): Check for Lua 5.1 header files. #2028
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, rockspec.lua checked if Lua 5.1 was installed to determine if LuaRocks could build packages for Lua 5.1. This was not sufficient since the Lua version does not matter as long as the development headers for Lua 5.1 are available. So Lua 5.1 could be installed and the LuaRocks packages could still fail to install.
Note: this also checks if a suitable version of Lua is installed since
the command will fail if Lua is not installed at all.
I tested this on Fedora and Mac, but do not have a Windows machine to test on. Let me know if anything needs tweaked!
The
Health.check()
function could probably be simplified now, but I did not touch that function. I can if that is desired.Related Issue(s)
Fixes #1570
Fixes #2020
Follow up to #2022