-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Platform version overrides #148
Open
whoopdedo
wants to merge
10
commits into
luarocks:master
Choose a base branch
from
whoopdedo:platform-version-overrides
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Platform strings used in override tables or the supported_platform list is a dependency string. The deps.match_platform function will compare this string to the detected platform and system name. The old cfg.is_platform function matches only plain strings against built-in platform names (like it always has).
This looks good, but creates an incompatibility in the rockspec format. But it definitely sounds like something to be added in the next major version of LuaRocks. So let's keep this patch on hold for a while and add it later. |
Conflicts: Makefile src/luarocks/deps.lua src/luarocks/util.lua
hishamhm
force-pushed
the
master
branch
2 times, most recently
from
September 30, 2017 00:54
e237af3
to
0477604
Compare
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.
Platform names can include version information. The platform string is treated as a dependency string.
Internally, LuaRocks maintains a list of generic platform types, and an additional canonical name for the current system. The function
luarocks.cfg.is_platform
will compare a string with the generic types regardless of system version. The functionluarocks.deps.match_platform
compares a string to the generic and canonical names with version numbers.The version of a system is determined with
uname -r
on Unix-like platforms, andVER
on Windows. It is set as the variableLUAROCKS_UNAME_R
in the site config upon installation.TODO: Possible use an external program to read the WIndows version because
VER
may not be reliable. The Windows build should set a variable WINVER that can be optionally used by rockspecs to set a compiler macro.