Skip to content
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

Remove duplicate classes #697

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Remove duplicate classes #697

merged 2 commits into from
Sep 23, 2024

Conversation

CedNaru
Copy link
Member

@CedNaru CedNaru commented Sep 22, 2024

We had many Godot classes (mostly enums) that we reimplemented back in Godot 3 and used all across our Kotlin modules.
Since Godot 4, they are all part of the api and are generated automatically. We never properly modified our code to reflect that.
It was done progressively over 1 year of changes. I simply decided to remove the last ones:
GodotError and VariantType.

GodotError was simply deleted and replaced by the correct generated one where necessary.
VariantType is a bit special, as we are using it internally. On top of that, the "true" VariantType is occasionally used within the Godot API (example: TileSet::get_custom_data_layer_type). Like GodotError, I replaced the VariantType used in the API generation when it's a parameter or return type.

To avoid confusion with the one we use to write/read the buffer (and also used in the internals of the generated API), I changed its name to VariantParser, which is also a name used in Godot C++ code, that I think is fitting.

image

@CedNaru CedNaru force-pushed the improvement/remove_duplicate branch from 9f92372 to e3ffa60 Compare September 22, 2024 22:58
@CedNaru CedNaru merged commit 77f9ec9 into master Sep 23, 2024
53 checks passed
@CedNaru CedNaru deleted the improvement/remove_duplicate branch September 23, 2024 14:07
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.

3 participants