-
Notifications
You must be signed in to change notification settings - Fork 3
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
Lua 5.2 support #4
Comments
skip lua 5.2 support and make it work with upcoming lua 5.3 |
I would like to have a volunteer to port the library to Lua 5.2 and the coming Lua 5.3. I'm personally not strongly motivated since I have the feeling that the changes in Lua 5.2 force me to adapt a lot of working code for virtually no gain. In addition I have other projects in this moment and is difficult for me to spare some more times for this task. On the other side I guess that the support for Lua 5.2 is useful because some people are asking for it :-) and I would like to be neutral and provides all the versions so that the module is usable for a wider audience of Lua users. That's why a volunteer would be the idea solution for me. May be I'm going to ask in the Lua mailing list. |
So I've started in my fork in branch The last thing what's missing is to port
And it's not flexible yet (static lua 5.3 only) |
You should pass |
This ends up in an invalid conversion
Because it's So if this is right, only this part is left which I can't handle https://github.com/markuman/graph-toolkit/blob/lua5.3/src/lua-graph.cpp#L58 How to handle the string |
Remove it (use NULL instead) => libraries should not set globals anyway. (the 2nd arg is what global variable to make the library available under) |
Any progress here? |
From my side, unfortunately, not. |
This is an old thread but of course a Lua upgrade would be a good thing. However I am wondering if we should upgrade directly to Lua 5.4. I would like to have some informed advices about the goto version we should adopt with some practical arguments. Otherwise I may just go for Lua 5.4 for the upgrade. |
Of course 5.4 is the only logical target at this point ... while retaining LuaJIT support of course. Once you do that you have all the ones in between anyway. Mention was already made of compat-5-3 which makes it pretty easy to make something buildable against the whole range of available Lua engines. |
Good, thank you for the feedback, I will try to port to Lua 5.4 while maintaining compatibility with LuaJIT. |
Hi there, I added support for Lua 5.4 while maintaining the compatibility. Please test the branch: https://github.com/franko/graph-toolkit/tree/lua-5.4-compat To compile use the command: "meson setup -Dlua=lua5.4 build". The possible options are lua5.1, lua5.4 and luajit. I removed the makefile based build system to use Meson, much better now. I have also updated the C++ code to avoid warning on deprecated stuff. The library libagg is now a subproject so it will be automagically built, user just need to install freetype2 and lua dev packages. My tests on Linux are ok for the moment but I tested only with Lua 5.4. |
Thanks for looking into this. I'm sure we'll get some millage out of it somehow. I understand Meson is a good build system and probably beats custom Makefiles for a lot of scenarios, but I think you might have overlooked one major factor here. One of the main ways of using Lua library projects as dependencies is via through LuaRocks, and out of the box as far as I know LuaRocks does not mave a Meson backend. It does make a |
If it is required I can restore the Makefile, I didn't know it was a requirement for the luarock but it can be done. |
I don't know about required, but unless you want to write a LuaRocks backend for meson (e.g. here is a backend for cargo/mlua) then I think adapting the changes to a Makefile based build again so that the rockspec works is going to be the best way forward for this to be usable in the Lua ecosystem. I would keep the Meson support since you already wrote it and it might be useful to some projects, but being usable via LuaRocks is far and away the most useful distribution channel for Lua stuff. |
I brought back the Makefile based build system simplified and revised. Finally the makefile is pretty fine I think and it should work as before. Now it would be nice if someone can test the building and the rockspec itself. I am also going to merge this branch into the master. It would be nice if someone can post in the Lua mailing list about this update of the project. They may test and give us some useful feedbacks. |
Continuing from #3 (comment)
Your uses should be simple enough to replace with
lua_getuservalue
.FWIW, I write my C libraries in 5.2 style, and get them to work in 5.1+luajit with compat-5.2, it works out quite well :)
The text was updated successfully, but these errors were encountered: