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
Make lua a git submodule #6549
Make lua a git submodule #6549
Conversation
@Vultraz FYI as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like the naming of the "nowarn" directory. Since the "lua" directory no longer exists, why not just rename "nowarn" to "lua"?
Do the two files that include luaconf.h actually need to? I think that file should be indirectly included by any other file, shouldn't it? I have the same question about llimits.h.
I can see the MacOS CI passed but I'm not sure why – what exactly makes it compile those files as C++? When I was looking at the diff, I thought it would break the build since there's no file-specific flags on those files (as far as I know).
On the whole I'm fairly ambivalent about this. It does make it harder for newcomers to grab the code though.
Sure.
I fixed one instance of unnecessary includes since I happened to notice it, but I didn't look into that any further.
It looks like xcode is smart enough to use
Hmm... yeah, that's true. Mariadbpp is also a submodule, though I suppose a lot fewer people would be likely to run into it. Edit- |
Updated to rename the folder to lua, and cleaned up the includes. |
Yes. It's still an extra step, however. |
I can add checks to scons/cmake to print an error telling what command they need to run, though that wouldn't help macOS users. There's also a post-checkout hook which also runs on clone, however client-side hooks aren't downloaded during said cloning, so that'd still be an extra step to setup somewhere. I don't think it's a big issue, but it being a submodule is also standalone from the rest of the changes, so the main question if that needs to be reverted is just where to put the headers suppressing the |
Damn, I just noticed how many lua paths were able to be cleaned up p_p I like the current state this is in. |
520b67d
to
a95a7d9
Compare
This reverts commit 778e916.
Being .cpp isn't required to have them be compiled as C++.
No changes required to the lua source anymore.
Also cleanup the includes.
a95a7d9
to
7a93b85
Compare
7a93b85
to
24f192e
Compare
This PR removes the in-tree lua code to instead be a git submodule. This is done by:
lua/
includes in one of the headers in thenowarn/
directory, which contains the necessary changes (mostly#pragma
s) to ignore the old style cast warnings. This is kinda hacky, but I wasn't able to find a better way to suppress warnings from external header files..c
files to.cpp
- instead specify those files to be compiled as C++ via the command line (-x c++
for gcc/clang,/TP
for MSVC).The main benefit being that we'd be using the unmodified lua source code, which as a submodule means that updating to a new version of lua can be done just by going into the submodule's directory, doing a
git checkout
of the next tagged version, and pushing that update to Wesnoth's repo.