lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Mar 24, 2015 at 08:42:34PM +0200, Ką Mykolas wrote:
> On 3/24/15, Tom N Harris <telliamed@whoopdedo.org> wrote:
> > Your suggestion also falls into the trap of assuming there is only one "Lua"
> >
> > on a system. There is not and it is dangerous to use "-llua" without a
> 
> Wondering if something like Debian alternatives [1] would at least
> partly solve this kind of problem or open another one can of worms.

Debian lets you choose the version of lua and luac using the
alternatives mechanism.
But I think the problem is not about easily switching from one version
of Lua to the other.  The problem is to be able to name a precise Lua
version in a unique and standard way.

Even if we forget about the .pc file, or the -llua linker flag, the very
same issue affects the name of the interpreter!

If I have a Lua script that is written for Lua 5.2 (because I like _ENV
for example), then what do I put in the shebang line? #!lua-5.2 ?  or
#!lua52 ?  Writing there just #!lua is wrong, since the meaning of 'lua' 
is "system dependent" and in some Linux distributions I'm not naming
here at some point the version of 'lua' silently switched from 5.1 to
5.2 (breaking working software of course).

Please,
-- 
Enrico Tassi

PS: giving a policy here can be the exception confirming the rule
that the Lua authors never give a policy