Drop default value extraction for scripts #437
Merged
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.
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.