diff --git a/.efrocachemap b/.efrocachemap index e14a92b7..af253249 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4080,18 +4080,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/ed/7b/f6b7d63868eff24231ddb4f08acc", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/b0/ed/b7c1d78cf2f4ca9501ae6ada5f2a", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/18/5b/eaea207321a10f13c932a3fd66d3", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/b6/f9/773f268c4ebd8cf0d663cc9466a5", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/c5/7e/265987e8fcf577ad16af94e2bfc1", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/a8/5c/40fb49f7a0e1a65496766c5767e6", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/e2/c8/59625490bbbb456617eebb9c4ef3", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/9d/2a/c4d299466796907f998f8bf90cba", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/6e/79/66ccaa09094203be7f1bd96ba81b", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/f0/94/1fd51fa09da1fc2f67cfc530dccf", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/f9/11/bf2dfaeb5f4bdbe0605768885321", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/84/af/9a03f2688c69a9f704cb8c4c52df", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/d9/ac/6320a984d2b5d9c7c6dffdf596b8", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/16/f2/ccd623b7d0405c2d143995f18764", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/b2/0f/acd0b9a413537b781d21e9d3d48f", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/08/3d/8b85009c5e8c8d628c4c65aa8f59", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/e9/95/7621c5397b87d504240bbb28bd05", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/89/fc/bf7301a9c8b6e0bb310fd9c84b36", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/7e/34/3664bb2e4760264eafa82a240b4c", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/d5/d4/0af750265cbf1aa48e06f1a9c2aa", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/bd/d2/2e08eb06dba1da51de9e63fcba29", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/c0/09/f1dc739ada9b7b0161a21c44b6c2", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/49/af/6aeea157bc0bd8aa64ba62b53a9d", "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/d4/6a/dd303a200b98a56ba3b100277057", "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/fc/2c/2996c558fb408a548fdd37398c9a", "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ed/28/b7a72be7ae1bd2b58dda4b6902a0", @@ -4108,14 +4108,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/71/f6/691482915ad58ea1e953cc23d74c", "build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/b8/2b/6ec8c78980a62e3e0ee4b36ece04", "build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/4e/56/a95c987b2a371759896b037fea86", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/46/b7/2b333df846670ad9b19c118dcd0f", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/3f/09/6d61b76e32baea0794483d3a8ad3", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/9e/0d/0407b97c24f4cf32e7c9aeba1842", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/12/ea/36c5d4aee512942eb9bb0866bf81", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/05/57/f9451c7bc39454a27afee023ce54", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/3c/38/7ab498b9f25e73062454c3b1d4af", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/56/8b/376666f0a064ebe26a0f5f61beb9", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/c9/f5/08f11ae1a959b9052c7fd799487e", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/6d/f5/f9b18801d48a1d8362e49ad51fe6", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/c8/67/ebfd87476c76c607b8ebedb0b850", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/3d/84/590188d1768800ff6364a1723a4e", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/d5/b9/4a2d5605540cdf6eb061732c68ab", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/ae/7d/0888f9b439b66cef7f67fd206dab", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/0a/fa/24503eb9a18f36f6d8655c307b03", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/7c/9f/069d28803741db9c3269c2a22d72", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/fa/36/4946c0e26a9b62fe3f3279b34d3d", "src/assets/ba_data/python/babase/_mgen/__init__.py": "https://files.ballistica.net/cache/ba1/52/c6/c11130af7b10d6c0321add5518fa", "src/assets/ba_data/python/babase/_mgen/enums.py": "https://files.ballistica.net/cache/ba1/38/c3/1dedd5e74f2508efc5974c8815a1", "src/ballistica/base/mgen/pyembed/binding_base.inc": "https://files.ballistica.net/cache/ba1/d5/4a/0e480a855ce83709bd7f6761107d", diff --git a/tools/batools/dummymodule.py b/tools/batools/dummymodule.py index 7fe8f064..56cd3431 100755 --- a/tools/batools/dummymodule.py +++ b/tools/batools/dummymodule.py @@ -919,12 +919,26 @@ def generate(projroot: str) -> None: # enable that. binary_build_command: list[str] if os.environ.get('BA_ENABLE_DUMMY_MODULE_BINARY_BUILDS') == '1': - print( - f'{Clr.SMAG}Building binary to generate dummy-modules...{Clr.RST}', - flush=True, - ) - binary_build_command = ['make', 'cmake-binary'] - binary_path = 'build/cmake/debug/ballisticakit' + # Default to gui binary since that's what people are most likely + # to be iterating with anyway (minimizing redundant builds), but + # allow using headless builds which may work better in CI + # situations and whatnot due to fewer build requirements. + if os.environ.get('BA_DUMMY_MODULE_BINARY_BUILDS_USE_HEADLESS') == '1': + print( + f'{Clr.SMAG}Building (headless) binary to generate' + f' dummy-modules...{Clr.RST}', + flush=True, + ) + binary_build_command = ['make', 'cmake-server-binary'] + binary_path = 'build/cmake/server-debug/dist/ballisticakit_headless' + else: + print( + f'{Clr.SMAG}Building (gui) binary to generate' + f' dummy-modules...{Clr.RST}', + flush=True, + ) + binary_build_command = ['make', 'cmake-binary'] + binary_path = 'build/cmake/debug/ballisticakit' else: print( f'{Clr.SMAG}Fetching prefab binary to' diff --git a/tools/batools/pcommand2.py b/tools/batools/pcommand2.py index 0965fc74..4fad15f4 100644 --- a/tools/batools/pcommand2.py +++ b/tools/batools/pcommand2.py @@ -353,7 +353,11 @@ def spinoff_test() -> None: subprocess.run( ['make', 'mypy'], cwd=path, - env=dict(os.environ, BA_ENABLE_DUMMY_MODULE_BINARY_BUILDS='1'), + env=dict( + os.environ, + BA_ENABLE_DUMMY_MODULE_BINARY_BUILDS='1', + BA_DUMMY_MODULE_BINARY_BUILDS_USE_HEADLESS='1', + ), check=True, ) diff --git a/tools/batools/spinoff/_context.py b/tools/batools/spinoff/_context.py index 23f3a55e..13bf4dab 100644 --- a/tools/batools/spinoff/_context.py +++ b/tools/batools/spinoff/_context.py @@ -556,7 +556,8 @@ class SpinoffContext: f'list item {ent} in a dir-list is not a dir' ) - # Likewise make sure nothing in a file list refers to a directory. + # Likewise make sure nothing in a file list refers to a + # directory. for ent in []: if os.path.exists(ent): if os.path.isdir(ent): @@ -567,21 +568,28 @@ class SpinoffContext: def _generate_env_hash(self) -> None: from efrotools import get_files_hash import batools.spinoff + import batools.project - # Generate an 'env' hash we can tag tracked files with, so - # that if spinoff scripts or config files change it will - # invalidate all tracked files. + # Generate an 'env' hash we can tag tracked files with, so that + # if spinoff scripts or config files change it will invalidate + # all tracked files. hashfiles = set[str]() - # Add all Python files under our spinoff subpackage. - for root, _subdirs, fnames in os.walk( - os.path.dirname(batools.spinoff.__file__) - ): - for fname in fnames: - if fname.endswith('.py') and not fname.startswith('flycheck_'): - hashfiles.add(os.path.join(root, fname)) + # Add all Python files under our 'spinoff' and 'project' + # subpackages since those are most likely to affect results. + for pkgdir in [ + os.path.dirname(batools.spinoff.__file__), + os.path.dirname(batools.project.__file__), + ]: + for root, _subdirs, fnames in os.walk(pkgdir): + for fname in fnames: + if fname.endswith('.py') and not fname.startswith( + 'flycheck_' + ): + hashfiles.add(os.path.join(root, fname)) - # Hash config files too since they can affect anything. + # Also add src & dst config files since they can affect + # anything. hashfiles.add(self._src_config_path) hashfiles.add(self._dst_config_path)