Add tons of redundant includes in the single, since they may be conditionally compiled out, and add a note to see if this can be looked into more closely later...

This commit is contained in:
ThePhD 2020-07-16 19:46:15 -04:00
parent 4a16979adf
commit 7be51ebbef
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA
4 changed files with 160 additions and 14 deletions

View File

@ -401,9 +401,9 @@ COMPAT53_API void luaL_requiref(lua_State *L, const char *modname,
/* other Lua versions */ /* other Lua versions */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)" # error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3, or 5.4)"
#endif /* other Lua versions except 5.1, 5.2, and 5.3 */ #endif /* other Lua versions except 5.1, 5.2, 5.3, and 5.4 */

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2020-07-15 13:23:11.320974 UTC // Generated 2020-07-16 23:44:56.005352 UTC
// This header was generated with sol v3.2.1 (revision 6869ad3) // This header was generated with sol v3.2.1 (revision 4a16979)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2020-07-15 13:23:10.917866 UTC // Generated 2020-07-16 23:44:55.472351 UTC
// This header was generated with sol v3.2.1 (revision 6869ad3) // This header was generated with sol v3.2.1 (revision 4a16979)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -524,6 +524,8 @@ namespace sol {
// beginning of sol/base_traits.hpp // beginning of sol/base_traits.hpp
#include <type_traits>
namespace sol { namespace sol {
namespace detail { namespace detail {
struct unchecked_t {}; struct unchecked_t {};
@ -1189,6 +1191,9 @@ namespace meta {
// beginning of sol/pointer_like.hpp // beginning of sol/pointer_like.hpp
#include <utility>
#include <type_traits>
namespace sol { namespace sol {
namespace meta { namespace meta {
@ -1262,7 +1267,9 @@ namespace sol {
// beginning of sol/string_view.hpp // beginning of sol/string_view.hpp
#include <cstddef>
#include <string> #include <string>
#include <string_view>
#include <functional> #include <functional>
#if defined(SOL_USE_BOOST) && SOL_USE_BOOST #if defined(SOL_USE_BOOST) && SOL_USE_BOOST
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>
@ -1281,8 +1288,10 @@ namespace sol {
// end of sol/string_view.hpp // end of sol/string_view.hpp
#include <type_traits>
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
#include <functional>
#include <array> #include <array>
#include <iterator> #include <iterator>
#include <iosfwd> #include <iosfwd>
@ -1987,7 +1996,11 @@ namespace sol {
#else #else
#if defined(SOL_NO_LUA_HPP) && SOL_NO_LUA_HPP #if defined(SOL_NO_LUA_HPP) && SOL_NO_LUA_HPP
extern "C" { extern "C" {
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#if defined(LUAJIT_VERSION) && LUAJIT_VERSION #if defined(LUAJIT_VERSION) && LUAJIT_VERSION
#include <luajit.h>
#endif #endif
} }
#else #else
@ -1996,11 +2009,16 @@ namespace sol {
#include <lua.hpp> #include <lua.hpp>
#else #else
extern "C" { extern "C" {
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#if defined(LUAJIT_VERSION) && LUAJIT_VERSION #if defined(LUAJIT_VERSION) && LUAJIT_VERSION
#include <luajit.h>
#endif #endif
} }
#endif // lua.hpp exists or does not #endif // lua.hpp exists or does not
#else #else
#include <lua.hpp>
#endif // check for lua.hpp safely for Lua 5.1 derps #endif // check for lua.hpp safely for Lua 5.1 derps
#endif // Manual - have lua.hpp or not #endif // Manual - have lua.hpp or not
#endif // C++ Mangling for Lua vs. Not #endif // C++ Mangling for Lua vs. Not
@ -2058,6 +2076,9 @@ namespace sol {
#if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP) #if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP)
extern "C" { extern "C" {
#endif #endif
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP) #if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP)
} }
#endif #endif
@ -2440,9 +2461,9 @@ COMPAT53_API void luaL_requiref(lua_State *L, const char *modname,
/* other Lua versions */ /* other Lua versions */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)" # error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3, or 5.4)"
#endif /* other Lua versions except 5.1, 5.2, and 5.3 */ #endif /* other Lua versions except 5.1, 5.2, 5.3, and 5.4 */
/* helper macro for defining continuation functions (for every version /* helper macro for defining continuation functions (for every version
* *except* Lua 5.2) */ * *except* Lua 5.2) */
@ -2454,7 +2475,9 @@ COMPAT53_API void luaL_requiref(lua_State *L, const char *modname,
#if defined(COMPAT53_INCLUDE_SOURCE) && COMPAT53_INCLUDE_SOURCE == 1 #if defined(COMPAT53_INCLUDE_SOURCE) && COMPAT53_INCLUDE_SOURCE == 1
// beginning of sol/compatibility/compat-5.3.c.h // beginning of sol/compatibility/compat-5.3.c.h
#include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
@ -3304,6 +3327,9 @@ COMPAT53_API void luaL_requiref(lua_State *L, const char *modname,
#if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP) #if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP)
extern "C" { extern "C" {
#endif #endif
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP) #if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP)
} }
#endif #endif
@ -3326,6 +3352,8 @@ extern "C" {
// end of sol/compatibility.hpp // end of sol/compatibility.hpp
#include <vector> #include <vector>
#include <cstdint>
#include <cstddef>
namespace sol { namespace sol {
@ -3425,6 +3453,8 @@ namespace sol {
// beginning of sol/error.hpp // beginning of sol/error.hpp
#include <stdexcept> #include <stdexcept>
#include <string>
#include <array>
namespace sol { namespace sol {
namespace detail { namespace detail {
@ -3488,6 +3518,9 @@ namespace sol {
// beginning of sol/in_place.hpp // beginning of sol/in_place.hpp
#include <cstddef>
#include <utility>
namespace sol { namespace sol {
using in_place_t = std::in_place_t; using in_place_t = std::in_place_t;
@ -3517,7 +3550,10 @@ namespace sol {
#define SOL_TL_OPTIONAL_VERSION_MINOR 5 #define SOL_TL_OPTIONAL_VERSION_MINOR 5
#include <exception> #include <exception>
#include <functional>
#include <new> #include <new>
#include <type_traits>
#include <utility>
#include <cstdlib> #include <cstdlib>
#include <optional> #include <optional>
@ -5741,6 +5777,8 @@ namespace std {
#endif // Boost vs. Better optional #endif // Boost vs. Better optional
#include <optional>
namespace sol { namespace sol {
#if defined(SOL_USE_BOOST) && SOL_USE_BOOST #if defined(SOL_USE_BOOST) && SOL_USE_BOOST
@ -5780,6 +5818,8 @@ namespace sol {
// beginning of sol/raii.hpp // beginning of sol/raii.hpp
#include <memory>
namespace sol { namespace sol {
namespace detail { namespace detail {
struct default_construct { struct default_construct {
@ -5918,6 +5958,8 @@ namespace sol {
// beginning of sol/policies.hpp // beginning of sol/policies.hpp
#include <array>
namespace sol { namespace sol {
namespace detail { namespace detail {
struct policy_base_tag {}; struct policy_base_tag {};
@ -5989,6 +6031,9 @@ namespace sol {
// beginning of sol/ebco.hpp // beginning of sol/ebco.hpp
#include <type_traits>
#include <utility>
namespace sol { namespace detail { namespace sol { namespace detail {
template <typename T, std::size_t tag = 0, typename = void> template <typename T, std::size_t tag = 0, typename = void>
@ -6139,8 +6184,13 @@ namespace sol { namespace detail {
// end of sol/map.hpp // end of sol/map.hpp
#include <array>
#include <initializer_list> #include <initializer_list>
#include <string>
#include <string_view>
#include <optional>
#if SOL_ON(SOL_STD_VARIANT_) #if SOL_ON(SOL_STD_VARIANT_)
#include <variant>
#endif // variant shenanigans (thanks, Mac OSX) #endif // variant shenanigans (thanks, Mac OSX)
namespace sol { namespace sol {
@ -7468,6 +7518,7 @@ namespace sol {
// end of sol/types.hpp // end of sol/types.hpp
#include <exception>
#include <cstring> #include <cstring>
#if defined(SOL_PRINT_ERRORS) && SOL_PRINT_ERRORS #if defined(SOL_PRINT_ERRORS) && SOL_PRINT_ERRORS
@ -7669,9 +7720,12 @@ namespace sol {
// beginning of sol/demangle.hpp // beginning of sol/demangle.hpp
#include <string>
#include <array>
#include <cctype> #include <cctype>
#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6) #if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6)
extern "C" { extern "C" {
#include <ctype.h>
} }
#endif // MinGW is on some stuff #endif // MinGW is on some stuff
#include <locale> #include <locale>
@ -7867,6 +7921,8 @@ namespace sol {
// beginning of sol/unique_usertype_traits.hpp // beginning of sol/unique_usertype_traits.hpp
#include <memory>
namespace sol { namespace sol {
template <typename T> template <typename T>
@ -8489,6 +8545,8 @@ namespace sol {
// end of sol/stack_reference.hpp // end of sol/stack_reference.hpp
#include <functional>
namespace sol { namespace sol {
namespace detail { namespace detail {
inline const char (&default_main_thread_name())[9] { inline const char (&default_main_thread_name())[9] {
@ -9284,6 +9342,8 @@ namespace sol {
// beginning of sol/stack_guard.hpp // beginning of sol/stack_guard.hpp
#include <functional>
namespace sol { namespace sol {
namespace detail { namespace detail {
inline void stack_fail(int, int) { inline void stack_fail(int, int) {
@ -9322,10 +9382,13 @@ namespace sol {
// end of sol/stack_guard.hpp // end of sol/stack_guard.hpp
#include <vector>
#include <bitset> #include <bitset>
#include <forward_list> #include <forward_list>
#include <string>
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>
#include <optional>
namespace sol { namespace sol {
namespace detail { namespace detail {
@ -10732,8 +10795,13 @@ namespace sol {
// beginning of sol/stack_check_unqualified.hpp // beginning of sol/stack_check_unqualified.hpp
#include <memory>
#include <functional>
#include <utility>
#include <cmath> #include <cmath>
#include <optional>
#if SOL_ON(SOL_STD_VARIANT_) #if SOL_ON(SOL_STD_VARIANT_)
#include <variant>
#endif // variant shenanigans #endif // variant shenanigans
namespace sol { namespace stack { namespace sol { namespace stack {
@ -11387,6 +11455,8 @@ namespace stack {
// beginning of sol/overload.hpp // beginning of sol/overload.hpp
#include <utility>
namespace sol { namespace sol {
template <typename... Functions> template <typename... Functions>
struct overload_set { struct overload_set {
@ -11411,6 +11481,9 @@ namespace sol {
// beginning of sol/unicode.hpp // beginning of sol/unicode.hpp
#include <array>
#include <cstring>
namespace sol { namespace sol {
// Everything here was lifted pretty much straight out of // Everything here was lifted pretty much straight out of
// ogonek, because fuck figuring it out= // ogonek, because fuck figuring it out=
@ -11719,7 +11792,14 @@ namespace sol {
} }
// end of sol/unicode.hpp // end of sol/unicode.hpp
#include <memory>
#include <functional>
#include <utility>
#include <cstdlib>
#include <cmath>
#include <string_view>
#if SOL_ON(SOL_STD_VARIANT_) #if SOL_ON(SOL_STD_VARIANT_)
#include <variant>
#endif // Apple clang screwed up #endif // Apple clang screwed up
namespace sol { namespace stack { namespace sol { namespace stack {
@ -12728,7 +12808,11 @@ namespace stack {
// beginning of sol/stack_check_get_unqualified.hpp // beginning of sol/stack_check_get_unqualified.hpp
#include <cstdlib>
#include <cmath>
#include <optional>
#if SOL_ON(SOL_STD_VARIANT_) #if SOL_ON(SOL_STD_VARIANT_)
#include <variant>
#endif // variant shenanigans (thanks, Mac OSX) #endif // variant shenanigans (thanks, Mac OSX)
namespace sol { namespace stack { namespace sol { namespace stack {
@ -12934,9 +13018,14 @@ namespace sol { namespace stack {
// beginning of sol/stack_push.hpp // beginning of sol/stack_push.hpp
#include <memory>
#include <type_traits>
#include <cassert> #include <cassert>
#include <limits> #include <limits>
#include <cmath>
#include <string_view>
#if SOL_ON(SOL_STD_VARIANT_) #if SOL_ON(SOL_STD_VARIANT_)
#include <variant>
#endif // Can use variant #endif // Can use variant
namespace sol { namespace stack { namespace sol { namespace stack {
@ -14122,6 +14211,9 @@ namespace sol { namespace stack {
// beginning of sol/stack_pop.hpp // beginning of sol/stack_pop.hpp
#include <utility>
#include <tuple>
namespace sol { namespace sol {
namespace stack { namespace stack {
template <typename T, typename> template <typename T, typename>
@ -14434,6 +14526,9 @@ namespace stack {
// end of sol/stack_probe.hpp // end of sol/stack_probe.hpp
#include <cstring>
#include <array>
namespace sol { namespace sol {
namespace detail { namespace detail {
using typical_chunk_name_t = char[SOL_ID_SIZE_]; using typical_chunk_name_t = char[SOL_ID_SIZE_];
@ -14990,6 +15085,9 @@ namespace sol {
// beginning of sol/stack_iterator.hpp // beginning of sol/stack_iterator.hpp
#include <limits>
#include <iterator>
namespace sol { namespace sol {
template <typename proxy_t, bool is_const> template <typename proxy_t, bool is_const>
struct stack_iterator { struct stack_iterator {
@ -15227,6 +15325,8 @@ namespace sol {
// end of sol/stack_proxy.hpp // end of sol/stack_proxy.hpp
#include <cstdint>
namespace sol { namespace sol {
struct protected_function_result : public proxy_base<protected_function_result> { struct protected_function_result : public proxy_base<protected_function_result> {
private: private:
@ -15419,6 +15519,8 @@ namespace sol {
// beginning of sol/unsafe_function_result.hpp // beginning of sol/unsafe_function_result.hpp
#include <cstdint>
namespace sol { namespace sol {
struct unsafe_function_result : public proxy_base<unsafe_function_result> { struct unsafe_function_result : public proxy_base<unsafe_function_result> {
private: private:
@ -15561,6 +15663,8 @@ namespace sol {
// end of sol/unsafe_function_result.hpp // end of sol/unsafe_function_result.hpp
#include <cstdint>
namespace sol { namespace sol {
namespace detail { namespace detail {
@ -15895,6 +15999,8 @@ namespace sol {
// end of sol/wrapper.hpp // end of sol/wrapper.hpp
#include <memory>
namespace sol { namespace sol {
namespace function_detail { namespace function_detail {
template <typename Fx, int start = 1, bool is_yielding = false> template <typename Fx, int start = 1, bool is_yielding = false>
@ -15919,6 +16025,9 @@ namespace function_detail {
// beginning of sol/property.hpp // beginning of sol/property.hpp
#include <type_traits>
#include <utility>
namespace sol { namespace sol {
namespace detail { namespace detail {
struct no_prop {}; struct no_prop {};
@ -16040,6 +16149,8 @@ namespace sol {
// beginning of sol/protect.hpp // beginning of sol/protect.hpp
#include <utility>
namespace sol { namespace sol {
template <typename T> template <typename T>
@ -18279,6 +18390,9 @@ namespace sol {
// beginning of sol/dump_handler.hpp // beginning of sol/dump_handler.hpp
#include <cstdint>
#include <exception>
namespace sol { namespace sol {
class dump_error : public error { class dump_error : public error {
@ -18326,6 +18440,8 @@ namespace sol {
// end of sol/dump_handler.hpp // end of sol/dump_handler.hpp
#include <cstdint>
namespace sol { namespace sol {
template <typename ref_t, bool aligned = false> template <typename ref_t, bool aligned = false>
class basic_function : public basic_object<ref_t> { class basic_function : public basic_object<ref_t> {
@ -18471,6 +18587,8 @@ namespace sol {
// beginning of sol/protected_handler.hpp // beginning of sol/protected_handler.hpp
#include <cstdint>
namespace sol { namespace sol {
namespace detail { namespace detail {
inline const char(&default_handler_name())[9]{ inline const char(&default_handler_name())[9]{
@ -18553,6 +18671,9 @@ namespace sol {
// end of sol/protected_handler.hpp // end of sol/protected_handler.hpp
#include <cstdint>
#include <algorithm>
namespace sol { namespace sol {
namespace detail { namespace detail {
@ -18867,6 +18988,8 @@ namespace sol {
// end of sol/protected_function.hpp // end of sol/protected_function.hpp
#include <functional>
namespace sol { namespace sol {
template <typename... Ret, typename... Args> template <typename... Ret, typename... Args>
decltype(auto) stack_proxy::call(Args&&... args) { decltype(auto) stack_proxy::call(Args&&... args) {
@ -20928,6 +21051,9 @@ namespace sol {
// end of sol/usertype_container_launch.hpp // end of sol/usertype_container_launch.hpp
#include <sstream>
#include <type_traits>
namespace sol { namespace sol {
namespace u_detail { namespace u_detail {
constexpr const lua_Integer toplevel_magic = static_cast<lua_Integer>(0xCCC2CCC1); constexpr const lua_Integer toplevel_magic = static_cast<lua_Integer>(0xCCC2CCC1);
@ -21094,6 +21220,8 @@ namespace sol {
// beginning of sol/usertype_storage.hpp // beginning of sol/usertype_storage.hpp
#include <bitset>
namespace sol { namespace u_detail { namespace sol { namespace u_detail {
struct usertype_storage_base; struct usertype_storage_base;
@ -22652,6 +22780,8 @@ namespace sol {
// beginning of sol/table_iterator.hpp // beginning of sol/table_iterator.hpp
#include <iterator>
namespace sol { namespace sol {
template <typename reference_type> template <typename reference_type>
@ -23966,6 +24096,8 @@ namespace sol {
// beginning of sol/load_result.hpp // beginning of sol/load_result.hpp
#include <cstdint>
namespace sol { namespace sol {
struct load_result : public proxy_base<load_result> { struct load_result : public proxy_base<load_result> {
private: private:
@ -24223,6 +24355,7 @@ namespace sol {
// end of sol/lua_value.hpp // end of sol/lua_value.hpp
#if defined(SOL_PRINT_ERRORS) && SOL_PRINT_ERRORS #if defined(SOL_PRINT_ERRORS) && SOL_PRINT_ERRORS
#include <iostream>
#endif #endif
namespace sol { namespace sol {
@ -24381,6 +24514,9 @@ namespace sol {
// end of sol/state_handling.hpp // end of sol/state_handling.hpp
#include <memory>
#include <cstddef>
namespace sol { namespace sol {
class state_view { class state_view {
@ -25670,6 +25806,9 @@ namespace sol {
// beginning of sol/variadic_args.hpp // beginning of sol/variadic_args.hpp
#include <limits>
#include <iterator>
namespace sol { namespace sol {
struct variadic_args { struct variadic_args {
private: private:
@ -25855,6 +25994,8 @@ namespace sol {
// end of sol/as_returns.hpp // end of sol/as_returns.hpp
#include <vector>
namespace sol { namespace sol {
template <typename Al = typename std::allocator<object>> template <typename Al = typename std::allocator<object>>

View File

@ -171,12 +171,17 @@ def process_file(filename, out):
base_path = os.path.dirname(filename) base_path = os.path.dirname(filename)
# check if it's a standard file # check if it's a standard file
std = standard_include.search(line) # TODO: this is FAR too aggressive and catches
if std: # includes and files not part of the standard (C includes)
std_file = os.path.join('std', std.group(0)) # and friends.
if std_file in includes: # we should add a list of standard includes here??
continue # or handle behavior differently...
includes.add(std_file) #std = standard_include.search(line)
#if std:
# std_file = os.path.join('std', std.group(0))
# if std_file in includes:
# continue
# includes.add(std_file)
# see if it's an include file # see if it's an include file
name = get_include(line, base_path) name = get_include(line, base_path)