From de42e13de120ad9fe1d2a07310b505fca43dc0c2 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 30 May 2023 17:24:24 -0700 Subject: [PATCH] tidying --- .efrocachemap | 56 ++++++++++++++--------------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/base/base.cc | 4 +-- src/ballistica/base/logic/logic.cc | 4 +-- src/ballistica/shared/ballistica.cc | 2 +- tools/batools/spinoff/_context.py | 9 ++++- tools/batools/spinoff/_main.py | 11 ++++-- 8 files changed, 51 insertions(+), 39 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 21800dd0..982b91ca 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4072,26 +4072,26 @@ "build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/c5/09/4f10b8a21ba87aa5509cff7a164b", "build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/ff/0a/a354984f9c074dab0676ac7e4877", "build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/2a/1c/9ee5db6d1bceca7fa6638fb8abde", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/08/31/5d96f2877eaa60bf5a0ea55d048c", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/75/1a/e6ef50aa74f65e9fe3f13c853279", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/0f/84/f5e384fdc74c47d4bd4c6b6eaac9", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/37/3c/c66a6a131ec8f7835d8712cfe238", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/4d/b1/67f33a358fe4d35cfaa930451ef6", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/d6/55/77df633da6941bdabd74f68d6e80", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ff/5d/82ef178f8642b2ff2a89b8cdceab", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7b/47/f54a24cf37a655dae7543ea721f7", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/37/30/c1706853d253a202fce71f0ff5ac", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/55/d6/e8bf2427d8dad886439951f96fa3", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/0d/8f/38d9457a489236f7a0f7765ccdfd", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ad/d5/72f9e7186c6ec2a0c8229dbb1540", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/03/3a/b5889f0f805852b8dc455b845ef2", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/7c/c0/5121a56d897944f523102e6ca3f3", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a9/f3/a4358ba8cde80e5fc074d126e9e1", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/97/1e/bff8628d637651fe1dc10969592b", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/2a/57/27595c9e8ac8de6bc6d7ae8125ac", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/9d/69/ccad421d41a53b79e3ffc5bc99fb", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/cb/41/873f27f3744ae160307375e9c107", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/ec/97/6f817c385ed0cd5cabeaf88afa84", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/d6/cf/003cf0efa77173b016ed604d6a09", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/82/b5/ee844698615a1520fb4cea0b89ee", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/2f/ec/9e48aecc3c832733a23da2285423", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/b5/8f/36ebe9ffcda1c2168136b747c3d6", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/42/02/409aedc600cceed6cb9a15fbcf04", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/2a/aa/c369bdf43bf67629eb5761fae81a", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ab/64/9d0c2baa399fe6bf2a661f3d183e", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/65/ac/6cec563654d4808a4c6c7f8309db", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/84/70/fc82d8a8143db34b706c0a26cf50", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/eb/10/3d67fc054cb7a0f20452aa91a851", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/27/9a/23c908f8993efcfbee2e68584b9a", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/c4/7c/c4a0410a869395d686a72304a4a6", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/11/ef/f95d0e2f72a5ce7f9b6de2e0e136", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/78/1b/ae4c1d35d46ce77e5492024a9d8e", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/1f/4b/681be43b59d29c525df9fbfcc876", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/e7/4f/d9e0cab203d543fa70fc98c3f129", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/c6/e0/08feb96ad8b630049f9bb65886b3", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/77/70/0b2cbc19e8d299fd434a29fdf3b4", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/72/e1/b950d43da83ac1b38e8415f4733a", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/1d/f3/b748876c67f981a5284747c3c43a", "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/fe/78/fb2bff22f5f5e63e5eead251357c", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/e6/2e/1981d72b4c51d8e1d8b63e5e0832", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/3c/8f/e15d203360e2820449d9179c2c92", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/1c/80/24cafb783f4bd5c8830afd66f305", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/05/ba/132c92d6ada5a3abf2840fbe7622", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/51/e4/aec63a799a718984d77c8492d3aa", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/a0/18/102df5f0be3db0f5e1177551bb61", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/aa/95/464288c1ed651ae3e50f1c8bfb12", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/28/42/227e378a08a5ce66ec371e5738f7", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/6b/e6/b74bc1e775a2a6f409b0a6c23fbb", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/00/6c/4976a2183606fbba6b7487db9784", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/e7/8f/30cffa1f32e3792a3361f3a4d3c1", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/f5/cc/989cbcfc05483de29d1f02db94b9", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/6a/07/298ad9d7a20d971537eccc787329", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/2d/f5/6aeac78c62b794ae0957c28364b8", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/9e/98/6a9a4b820be943067c240ee43cb1", "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/b4/3d/e352190a0e5673d101c0f3ee3ad2", diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e19b2f0..e3056898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.20 (build 21028, api 8, 2023-05-30) +### 1.7.20 (build 21029, api 8, 2023-05-30) - This seems like a good time for a `refactoring` release in anticipation of changes coming in 1.8. Basically this means that a lot of things will be diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index caadd8c5..d0817d28 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -31,7 +31,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21028 +TARGET_BALLISTICA_BUILD = 21029 TARGET_BALLISTICA_VERSION = '1.7.20' _g_env_config: EnvConfig | None = None diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index 78e44096..a0dc2fc9 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -153,7 +153,7 @@ void BaseFeatureSet::StartApp() { called_start_app_ = true; assert(!app_running_); // Shouldn't be possible. - g_core->LifecycleLog("main-thread start-app begin"); + g_core->LifecycleLog("start-app begin (main thread)"); LogVersionInfo(); @@ -188,7 +188,7 @@ void BaseFeatureSet::StartApp() { // the app config which will kick off screen creation and otherwise // get the ball rolling. logic->event_loop()->PushCall([this] { logic->ApplyAppConfig(); }); - g_core->LifecycleLog("main-thread start-app end"); + g_core->LifecycleLog("start-app end (main thread)"); } void BaseFeatureSet::LogVersionInfo() { diff --git a/src/ballistica/base/logic/logic.cc b/src/ballistica/base/logic/logic.cc index a17c3f71..324ac11e 100644 --- a/src/ballistica/base/logic/logic.cc +++ b/src/ballistica/base/logic/logic.cc @@ -34,7 +34,7 @@ void Logic::OnMainThreadStartApp() { void Logic::OnAppStart() { assert(g_base->InLogicThread()); - g_core->LifecycleLog("logic-thread on-app-start begin"); + g_core->LifecycleLog("on-app-start begin (logic thread)"); try { // Our thread should not be holding the GIL here at the start (and // probably not have any Python state at all). So here we set both @@ -80,7 +80,7 @@ void Logic::OnAppStart() { throw std::logic_error(what.c_str()); }); } - g_core->LifecycleLog("logic-thread on-app-start end"); + g_core->LifecycleLog("on-app-start end (logic thread)"); } void Logic::OnAppPause() { diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 796d142e..af9a89c5 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21028; +const int kEngineBuildNumber = 21029; const char* kEngineVersion = "1.7.20"; auto MonolithicMain(const core::CoreConfig& core_config) -> int { diff --git a/tools/batools/spinoff/_context.py b/tools/batools/spinoff/_context.py index 64de9df9..7cc226f0 100644 --- a/tools/batools/spinoff/_context.py +++ b/tools/batools/spinoff/_context.py @@ -947,11 +947,18 @@ class SpinoffContext: fnames = os.listdir(path) if fnames: for fname in fnames: + # Special case; never recurse into .git dirs; blowing + # away empty dirs there can be harmful. Note: Do we want + # to use ignore_names here? Seems like we'd still want + # to delete other entries there like __pycache__ though. + if fname == '.git': + continue + fullpath = os.path.join(path, fname) if os.path.isdir(fullpath): self._remove_empty_folders(fullpath) - # If folder empty, delete it. + # If folder is *now* empty, delete it. fnames = os.listdir(path) if not fnames and remove_root: os.rmdir(path) diff --git a/tools/batools/spinoff/_main.py b/tools/batools/spinoff/_main.py index 9d25b0b2..ae137cdb 100644 --- a/tools/batools/spinoff/_main.py +++ b/tools/batools/spinoff/_main.py @@ -212,6 +212,11 @@ def _do_create(src_root: str | None, dst_root: str) -> None: ) as outfile: outfile.write(template) + # Create an empty git repo. Some of our project functionality depends + # on git so its best to always do this. + subprocess.run(['git', 'init'], cwd=path, check=True) + print('DID', dst_root) + print( f'{Clr.GRN}{Clr.BLD}Spinoff dst project created at' f' {Clr.RST}{Clr.BLD}{path}{Clr.RST}{Clr.GRN}.{Clr.RST}\n\n' @@ -219,8 +224,8 @@ def _do_create(src_root: str | None, dst_root: str) -> None: f' {Clr.BLD}{Clr.MAG}./tools/spinoff update{Clr.RST} ' '- Syncs src project into dst.\n' f' {Clr.BLD}{Clr.MAG}make update-check{Clr.RST} ' - '- Makes sure all project files are up-to-date (they should be).\n' - ' At that point you should have a functional dst project.\n' + '- Makes sure the project is looking correct.\n\n' + 'At that point you should have a functional dst project.\n' ) @@ -327,7 +332,7 @@ def _print_available_commands() -> None: 'List featuresets present in the current project.\n' f' {bgn}create [name, path]{end} ' 'Create a new spinoff project based on this src one.\n' - ' Name should be in CamelCase form.\n' + ' Name should be passed in CamelCase form.\n' ' Use --featuresets a,b to specify included' ' feature-sets.\n' " Pass 'none' or an empty string for no"