From 697dee1d27d35a81124f7bd15b8acf8167aa357e Mon Sep 17 00:00:00 2001 From: Brigs Date: Mon, 10 Aug 2026 21:11:07 -0400 Subject: [PATCH] chore: remove the dead hook-plugin_loader.py The hook targets a module named plugin_loader, but every core imports scripts.plugin_loader, so the bare name never enters any import graph and PyInstaller never consults the hook. It has been inert since the loader moved into scripts/, and its own TODO comment predicted the break. The hidden imports it was meant to provide are covered explicitly in the spec files since the frozen-build fixes landed. Verified where a local frozen build is available: rebuilding the macOS CLI without the hook produces identical results (same module count, clean empty-input run). Co-Authored-By: Claude Fable 5 --- scripts/pyinstaller/hook-plugin_loader.py | 24 ----------------------- 1 file changed, 24 deletions(-) delete mode 100755 scripts/pyinstaller/hook-plugin_loader.py diff --git a/scripts/pyinstaller/hook-plugin_loader.py b/scripts/pyinstaller/hook-plugin_loader.py deleted file mode 100755 index b2c206f..0000000 --- a/scripts/pyinstaller/hook-plugin_loader.py +++ /dev/null @@ -1,24 +0,0 @@ -import plugin_loader - -# Hey PyInstaller? Yeah you! Take a look at these plugins! I know they're not actually imported anywhere but you -# better believe that they will be a runtime, so, if you wouldn't mind, it'd be fantastic if you pretended that -# they're imported normally and pick up *their* imports. OK? Great. Fantastic. - -print("Hooking plugins for pyinstaller") - -loader = plugin_loader.PluginLoader() - -tmp = [] - -for py_file in plugin_loader.PLUGINPATH.glob("*.py"): - mod = plugin_loader.PluginLoader.load_module_lazy(py_file) - try: - mod_artifacts = mod.__artifacts__ - except AttributeError: - pass # any unconverted plugins still get checked out so they don't break the loader during runtime - - tmp.append("scripts.artifacts." + mod.__name__) # TODO this is a hack, if we ever move plugins this breaks - -print(f"{len(tmp)} plugins loaded as hidden imports") - -hiddenimports = list(tmp)