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

Drop default value extraction for scripts #437

Merged
merged 5 commits into from
Mar 4, 2023

Conversation

chippmann
Copy link
Contributor

For GDExtensions Godot 4 instantiates each extension once to get the default values for its properties. Like C# did it earlier before they adopted our extraction approach.
Our extraction approach introduces a lot of complexity in all involved components though. This, together with the fact that godot 4 instantiates extensions anyways for default value retrieval (and we cannot do anything about that), leads to the conclusion that it's no longer worth the effort to extract the default value from code.

Hence we implemented a cpp cache with #434 which does exactly that: instantiate each script, retrieve its default value and cache that on the cpp side.
This PR now removes all code from the entry gen which was responsible for extracting the default value from the users code and thus greatly simplifies the entry gen and the symbol processor in that regard.

Future PR's will simplify the entry gen further. This PR just removes the default value extraction and removes the now unneeded code in the registration part.

This PR also removes all functions in the registration meant for manual registration through a dsl. Our automatic registration is mature enough that we believe its not needed. Also manual registration is still possible with the functions the entry gen uses if a user really wants to register stuff himself.

@chippmann chippmann force-pushed the 4.0/drop_default_value_extraction branch from f4710af to 775779e Compare March 4, 2023 10:47
@chippmann chippmann merged commit c85b4b2 into 4.0-adaptation Mar 4, 2023
@chippmann chippmann deleted the 4.0/drop_default_value_extraction branch March 4, 2023 14:52
@chippmann chippmann mentioned this pull request Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants