ToLua++ madness
#1
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?
Reply
Thanks given by:
#2
IDK, with makefiles it's easy enough to add a line to generate the bindings but I don't know about VC
Reply
Thanks given by:
#3
We could add a pre-build event to the VS project I think
Reply
Thanks given by:
#4
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.
Reply
Thanks given by:
#5
I think whichever would be the cleanest and work the best would be the way to go.
Reply
Thanks given by:
#6
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.
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)