godot-kotlin-jvm
godot-kotlin-jvm copied to clipboard
Refine registration annotation handling
Closes #606
This refines how we register annotations according to the linked proposal (specifically this comment and refined by this comment)
It includes the following changes:
RegisterClassis renamed toGodotScriptRegisterSignalis droppedRegisterProperty,RegisterConstructorandRegisterFunctionare combined intoGodotMember- Entry generation updated accordingly
- Compile time checks updated accordingly
- IDE plugin checks and warnings updated accordingly
To summarize the implemented registration changes from the proposal:
All
If a fine grained annotation is used (like Export, a type hint annotation, Rpc or Tool) a class or member does not have to be registered explicitly anymore. Annotations inherit from each other now
Classes
Classes still need to be registered manually (reason for this is outlined in this comment).
Signals
Signals no longer need to be registered at all. As they are only of use in Godot anyway, their sole existence in code is already documentation and hint enough that they should be exposed to godot
Properties
Still need to be annotated explicitly. If a property is registered in a parent class, it "inherits" that registration status even if not explicitly registered again in a child class (no matter if the child class overrides the property or not).
Functions
User defined functions still need to be registered manually. Like properties, they inherit their registration status from parent classes.
Godot api functions which are overridden in child classes (like _ready or _process) do not need to be registered explicitly anymore. They are godot api functions and thus are always relevant to godot.
Will update this PR after #761 is merged
Hello! As #761 has been merged, is there anything else blocking the MR? If so, can I help somehow?