GDScript: Initialize language when generating test output#117821
Open
HolonProduction wants to merge 1 commit intogodotengine:masterfrom
Open
GDScript: Initialize language when generating test output#117821HolonProduction wants to merge 1 commit intogodotengine:masterfrom
HolonProduction wants to merge 1 commit intogodotengine:masterfrom
Conversation
86ef753 to
ebb97f5
Compare
youfch
added a commit
to youfch/godot
that referenced
this pull request
Mar 26, 2026
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.
#116938 adds a test which uses a non relative path. This works when running the tests, however when generating output this would fail, because we do not initialize the language in the same way when generating tests.
The reason for that, is that the cmd option for generating tests is handled in the language initialization. So if we tried to init the language when generating tests we would run into an infinite recursion.
This PR moves the entrypoint for generating test output to use
REGISTER_TEST_COMMAND, so we can always run the language initialization.As a result the cmd option changed from
--gdscript-generate-teststo--test gdscript-generate-tests. This only effects developers, I also added an error message when using the old option. So I don't consider this compat breaking.Accompanying docs PR: godotengine/godot-docs#11874