Godot Class Cache Bug Passed CI but Crashed Local Game Builds
A developer building Nocturne Vania, a pixel-art Metroidvania in Godot 4, encountered a startup bug after adding a new bell tower area that used GDScript's class_name keyword for global type references. Existing local checkouts retained a stale global_script_class_cache.cfg file, causing parse errors when the game tried to resolve class names not yet registered in the cache. CI pipelines never caught the issue because they always reimported the project before running tests, regenerating the cache automatically. The fix replaced global class name references with explicit script path inheritance and preloaded script resources, removing dependency on the cache being up to date. The patch spanned 19 files with 81 additions and 33 deletions, and a static check was added to prevent cache-sensitive global names from appearing outside their own declarations.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in