[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A tricky way to determine Lua version
- From: Alexey Melnichuk <alexeymelnichuck@...>
- Date: Mon, 23 May 2016 16:00:06 +0300
Здравствуйте, Jonathan.
Вы писали 21 мая 2016 г., 11:01:08:
> On Sat, May 21, 2016 at 3:42 AM, Sean Conner <sean@conman.org> wrote:
>> It was thus said that the Great Ulrich Schmidt once stated:
> After looking at the suggestions in this thread and experimenting with
> a few of them, I like the version by Egor in the OP the best. Why?
> Because unlike the other suggestions, it works without any environment
> at all.
> That means that a rock requiring different dependencies depending on
> version (such as one requiring a third-party bitwise operations
> library on 5.1 but using the native bitwise stuff on 5.2 and later)
> should be able to use that test in the rockspec (which luarocks
> executes in a completely empty environment) to adjust dependencies on
> the fly during installation based on the Lua version it's running
> through. That would not be possible with any of the other methods
> proposed, because they rely on the standard libraries.
But in real life it will not works ether :) I have different LuaRocks
for each Lua version. But all LuaRocks runs using Lua 5.1. So version
in such case will be always `Lua 5.1`.
--
С уважением,
Alexey mailto:alexeymelnichuck@gmail.com
---
Это сообщение проверено на вирусы антивирусом Avast.
https://www.avast.com/antivirus