On Sat, Dec 24, 2011 at 9:37 PM, Reuben Thomas <[email protected]> wrote:
> I see that 5.2 support has already been worked on at
> https://github.com/ansible07/luarocks and welcomed by Hisham; but I
> see no signs of a check in, and this version is based on 2.0.4. Any
> update? I'm very keen to get 5.2 support, so if I can help, do say...

That code is useful for indicating places that need to be changed, but
not ready for merging. I've already committed some changes equivalent
to the ones in ansible07's commit 0825ce3aa8 [1], which can be seen
here [2], but there are some issues:

* during "configure" it assumes there's a binary called "lua" in the
path, something we can't do.
* we'll probably need configure flags for explicitly selecting lua 5.1
or 5.2, as some users may have both
* os.execute is used in a couple other places as well, and it would be
better not to have "if _VERSION == 'Lua 5.2'" in several places in the
code
* ansible07 added a Lua 5.2 version of setfenv. I haven't studied the
matter closely, but I remember reading in lua-l that there's no way to
implement a 100% equivalent setfenv in Lua 5.2. The one posted there
probably works well enough for our simple use in luarocks.persist, but
it does load the debug library, which is something I wouldn't want to
have in the module dependency chain for the LuaRocks loader. Instead
of adding a setfenv replacement, it's better to reimplement
persist.load_into_table in terms of load().
* the changes in Makefile/configure need equivalent tweaks in install.bat

[1] 
https://github.com/ansible07/luarocks/commit/0825ce3aa8daea81250a66ed76d52d752867e42a
[2] 
https://github.com/keplerproject/luarocks/commit/6ac40ff5bb8a96389a5cb408c0501a513f068209

I wonder: apart from these changes, is the rest of the code Lua 5.2
compatible? (assuming LUA_COMPAT_ALL of course)

-- Hisham

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to