[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] New lib: semver.lua
- From: Sam Roberts <vieuxtech@...>
- Date: Tue, 17 Jan 2012 14:05:50 -0800
On Tue, Jan 17, 2012 at 12:58 PM, Thijs Schreijer
<thijs@thijsschreijer.nl> wrote:
>> > _VERSION uses a format (most common) of name followed by version; eg.
>> 'Lua
>> > 5.2', so any utility function should first grab the last part (after
>> the
>> > last space) of the string and then perform comparisons.
>>
>> Hmm. I don't think semver is the right place to do that. It's supposed
>> to
>> be an implementation of semver.org. Adding that functionality would
>> make
>> it lose its "focus".
I'm not exactly sure what semver is intended to be used for, but if
you intend it to parse version strings of existing packages that use
3-part version numbers, I don't think it will:
lua -l socket
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print(_VERSION)
Lua 5.1
> print(socket._VERSION)
LuaSocket 2.0.2
>