Skip to content

String output matching Godot 4.6 behavior#20

Closed
dougVanny wants to merge 1 commit intostevearc:masterfrom
dougVanny:godot_4_string_output
Closed

String output matching Godot 4.6 behavior#20
dougVanny wants to merge 1 commit intostevearc:masterfrom
dougVanny:godot_4_string_output

Conversation

@dougVanny
Copy link
Contributor

  • Updates the stringify_object function to match the current Godot 4.6 behavior
  • Adds a test to test this new behavior
image image
   asd\a

	
''s"d " ásd

I consider this a finicky change as updating this behavior might mean breaking resources in Godot 3. I could not pinpoint when this change happened, as my own project, which as originally created under Godot 4 already contained a few files with escaped strings, so I assume this changed at some point within the 4.0 development. The good news is that Godot is still able to load escaped strings so I don't think this is a must

On top of it, I also noticed other areas of the parser that would require bigger changes to bring it up to date with Godot 4, the most obvious one being how SubResource and ExtResource now have string ids instead of ints, which could mean updating some methods such as remove_unused_resources and renumber_resource_ids. 4.6 also removed the load_steps parameter

Making all of these changes might require deciding how to support Godot 3 and Godot 4, maybe as different branches, maybe as different classes, I'm not sure

Feel free to leave this PR open or blocked for now, or perhaps merging it to a different branch

This was referenced Feb 18, 2026
@dougVanny dougVanny closed this Feb 21, 2026
@dougVanny
Copy link
Contributor Author

Closing as I don't think that simply mergin this will be good for the development of the lib. I've been thinking more and more about how to handle outputting to multiple Godot versions and I don't think a half-baked solution is the way to go

@dougVanny dougVanny deleted the godot_4_string_output branch March 1, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant