utopia-rise/godot-kotlin-native

Resolve compiler warnings and replace deprecated code

Closed this issue · 0 comments

Describe the problem or limitation you are having in your project:
At the moment we have lot's of compiler warnings from the generated api classes like this one:
The corresponding parameter in the supertype 'Popup' is named 'event'. This may cause problems when calling this function with named arguments.
Which comes from: override fun _gui_input(arg0: InputEvent)

But this is mainly an issue of the godot api json as the arguments are named like this there.
A workaround could be to get the argument name from the supertype in the json and not from the definition itself. Or we could open an issue on the gdnative repository directly so they fix the root issue.

Also we still use deprecated code in the godot-library-extensions regarding coroutines.

Describe how this feature / enhancement will help you overcome this problem or limitation:
We can then concentrate on the real warnings and users may not run into trouble because we generated suspicious code.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
Depends on the solution we take.

Describe implementation detail for your proposal (in code), if possible:
Access the supertypes methods argument names if possible, fallback to provided argument types in json.

If this enhancement will not be used often, can it be worked around with a few lines of code?:
We could suppress the warnings which is not the way to go.

Is there a reason why this should be in this project and not individually solved?:
Our code generates those warnings during compilation.