ToLua++ madness - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: ToLua++ madness (/thread-1200.html) |
ToLua++ madness - xoft - 07-29-2013 I'm quite fed up with ToLua++, how it generates the bindings chaotically. It's getting really bad in GitHub, when every change in the bindings causes merge conflicts later. It needs to stop! We need some Lua wiz to look at ToLua++'s sources and try to bring some order into it - sort the classes and the functions in them by name before generating the Bindings.cpp file. This way the conflicts will be minimized. Another approach would be to not include the Bindings.* files in the git source repo, but so far we've gone along the invariant that we provide the sources ready for compiling, no further "configure" or "cmake" or whatever necessary; this would break this nice tradition. It would be a question, then, whether to include all the 3rd party libraries or not, etc. I'd prefer not to go this way. So, any Lua wiz out there? RE: ToLua++ madness - bearbin - 07-29-2013 IDK, with makefiles it's easy enough to add a line to generate the bindings but I don't know about VC RE: ToLua++ madness - FakeTruth - 07-29-2013 We could add a pre-build event to the VS project I think RE: ToLua++ madness - FakeTruth - 07-29-2013 Since all these automatic bindings actually only work on the simple/easy bindings we could also bind the functions manually by using template functions. This would make the code much cleaner. We could completely get rid of the tolua automatic binding stuff. RE: ToLua++ madness - bearbin - 07-29-2013 I think whichever would be the cleanest and work the best would be the way to go. RE: ToLua++ madness - xoft - 08-02-2013 Pre-build event in VS would actually wreak havoc, we have something like this at work and it causes VS to constantly re-build the project. So that's a no-go. I'm too lazy to write the bindings manually. For now, I think I'll fix the AllToLua.cmd script to call git to reset the file state and then regenerate, this should be enough to fix the merge conflicts. |