fix: auto-run Godot import cache before first launch#3
Merged
cahaseler merged 2 commits intoSpaceMolt:mainfrom Apr 12, 2026
Merged
fix: auto-run Godot import cache before first launch#3cahaseler merged 2 commits intoSpaceMolt:mainfrom
cahaseler merged 2 commits intoSpaceMolt:mainfrom
Conversation
The Makefile used := which unconditionally overwrites GODOT, ignoring any value set via the environment. Switch to ?= so the auto-detection only runs as a fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On a fresh clone the .godot/ directory doesn't exist yet, so class_name types (ThemeColors, Log, etc.) aren't registered and resource imports (fonts) fail, producing a wall of parse errors. Add an `import` target that runs `godot --headless --import` when .godot/ is missing, and make `run` depend on it so the first `make run` just works. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make runfails with hundreds of parse errors because the.godot/import cache doesn't exist yet. Without it,class_nametypes (ThemeColors,Log, etc.) aren't registered and resource imports (fonts) fail.importMakefile target that runsgodot --headless --importwhen.godot/is missingruntarget depend onimportso the firstmake runjust worksContext
The
make runtarget launches Godot directly without running the import step first. Godot needs to run its import/editor scan ($GODOT --headless --import) to build the.godot/cache, which:class_nametypes (ThemeColors,Log, etc.)Without this step, every script referencing those types fails to parse. The import only runs when
.godot/is missing, so it adds no overhead on subsequent launches. A full reimport can be forced withrm -rf .godot && make import.Test plan
rm -rf .godot) and runmake run— should import automatically then launch cleanlymake runagain — should skip import and launch immediatelymake importworks standalone🤖 Generated with Claude Code