Skip to content

Fix TypedDictionary binding generation #1763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

Grublady
Copy link
Contributor

@Grublady Grublady commented Apr 9, 2025

Currently, TypedDictionary bindings fail to generate correctly.

This issue has not been apparent so far because Godot has not exposed any API using TypedDictionary, but it makes CI checks fail on PRs such as godotengine/godot#104096 which do so.

This PR fixes the bindgen with two small tweaks:

  • An off-by-one index is corrected
  • Parenthesis are added to prevent macros from erroneously splitting arguments on the comma in TypedDictionary<KeyType, ValueType>

For convenience, here is an extension_api.json generated from the above PR. The issue is related to the typeddictionary:: entries.
extension_api.json

Fixes godotengine/godot#100137

@Zylann
Copy link
Collaborator

Zylann commented Apr 13, 2025

Wondered about it in #1162
Looks like it could also fix godotengine/godot#100137 ?

@dsnopek dsnopek added bug This has been identified as a bug cherrypick:4.4 labels Apr 15, 2025
@dsnopek dsnopek added this to the 4.x milestone Apr 15, 2025
Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This looks good to me, and worked in some minimal testing. (Thanks for including the extension_api.json to make testing easier :-))

@dsnopek dsnopek merged commit 62a5c60 into godotengine:master Apr 15, 2025
18 checks passed
@Grublady Grublady deleted the typeddict branch April 15, 2025 17:25
@dsnopek
Copy link
Collaborator

dsnopek commented Jun 24, 2025

Cherry-picked for 4.4 in PR #1805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typed dictionary causes godot-cpp compilation error because of not being unable to parse and resolve typeddictionary:: into correct format
3 participants