Merged
Conversation
starnight
reviewed
Nov 5, 2024
Contributor
There was a problem hiding this comment.
Does this depend on Godot 4.4?
Because, scripts/regenerate-pot.sh shows errors with Godot 4.3:
Godot Engine v4.3.stable.flathub.77dcf97d8 - https://godotengine.org
ERROR: Config File "user://gut_temp_directory/gut_editor_config.json" does not exist.
Updating BlockCode POT file res://addons/block_code/locale/godot_block_coding.pot
WARNING: 10 RIDs of type "Canvas" were leaked.
at: _free_rids (servers/rendering/renderer_canvas_cull.cpp:2485)
WARNING: 114 RIDs of type "CanvasItem" were leaked.
at: _free_rids (servers/rendering/renderer_canvas_cull.cpp:2485)
ERROR: 10 RID allocations of type 'N16RendererViewport8ViewportE' were leaked at exit.
ERROR: 56 RID allocations of type 'PN13RendererDummy14TextureStorage12DummyTextureE' were leaked at exit.
ERROR: 1 RID allocations of type 'N17RendererSceneCull8ScenarioE' were leaked at exit.
ERROR: 214 RID allocations of type 'PN18TextServerAdvanced22ShapedTextDataAdvancedE' were leaked at exit.
ERROR: 18 RID allocations of type 'PN18TextServerAdvanced12FontAdvancedE' were leaked at exit.
ERROR: 1 RID allocations of type 'PN18TextServerAdvanced27FontAdvancedLinkedVariationE' were leaked at exit.
WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
at: cleanup (core/object/object.cpp:2284)
ERROR: 13 resources still in use at exit (run with --verbose for details).
at: clear (core/io/resource.cpp:604)
Member
Author
No it doesn't, but yes there are a ton of errors regardless of what version you use. Until godotengine/godot-proposals#10986 is available, the method of updating the POT file is pretty nasty. Let me see if I can figure out how to suppress the leak errors since we don't actually care about them. |
To ease running Godot from the command line, provide a wrapper script that looks for common Godot executables. As an escape hatch, the `GODOT` environment variable can be used to set exactly how Godot should be executed. This is very Linux-centric with only `godot` or the Godot Flatpak supported, but it can be extended as needed.
This can be used to execute TxUtils.regenerate_pot_file() from the CLI. The GDScript is a SceneTree script passed via Godot's --script CLI option. The shell script is a wrapper to execute Godot with all the necessary options. Since TxUtils.regenerate_pot_file() works by using the editor's Localization panel, the script has to be run with --editor. That causes a bunch of leaks that we can't do anything about. The script tries to soothe the user about the pile of warnings and errors at the end.
This can be used to execute TxUtils.update_pot_files() from the CLI. The GDScript is a SceneTree script passed via Godot's --script CLI option. The shell script is a wrapper to execute Godot with all the necessary options. Unlike TxUtils.regenerate_pot(), the editor isn't required, so everything can happen from _init().
Since the other components can be scripted, we might as well add a wrapper script to merge new translation strings into PO files.
2590dc5 to
9dcb6ef
Compare
Member
Author
|
I couldn't figure out any way to silence the warnings and errors about the leaks besides using |
wjt
approved these changes
Nov 6, 2024
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.
CLI script for updating translations. The
regenerate-pot.gdscript is pretty nasty since it has to with for the editor before poking at the UI. The others are pretty straightforward. I wasn't sure if we wanted to add GitHub workflows for these or not.https://phabricator.endlessm.com/T35705