@migueldeicaza this is more of a POC, not a fully fleshed out solution, am curious to hear your thoughts before I go any further.
A request was made to remove the value parameter label from GArray.append(value: Variant) to imitate Swift's Array.append(_:) signature.
My goal was to add the new, label-omitted signature and add a deprecation warning to the old signature.
The GArray.append method is autogenerated from the extensions_api.json. So in order to achieve the goal I needed to:
Add omitLabel flag to JGodotArgument and if found prepend _ to the argument's label
Add isDuplicateSignature flag to JGodotBuiltinClassMethod to avoid generating any duplicate GDExtensionPtrBuiltInMethod
Add Deprecation object to JGodotBuiltinClassMethod which contains information for the Xcode deprecation warning.
There is still plenty of work to be done, cleaning/tightening things up. The duplicate flag could be handled dynamically (but I kinda like the declaration?). Deprecation object could be generalized. etc etc.
Relates to #483
@migueldeicaza this is more of a POC, not a fully fleshed out solution, am curious to hear your thoughts before I go any further.
A request was made to remove the
value
parameter label fromGArray.append(value: Variant)
to imitate Swift'sArray.append(_:)
signature.My goal was to add the new, label-omitted signature and add a deprecation warning to the old signature.
The
GArray.append
method is autogenerated from theextensions_api.json
. So in order to achieve the goal I needed to:omitLabel
flag toJGodotArgument
and if found prepend_
to the argument's labelisDuplicateSignature
flag toJGodotBuiltinClassMethod
to avoid generating any duplicateGDExtensionPtrBuiltInMethod
Deprecation
object toJGodotBuiltinClassMethod
which contains information for the Xcode deprecation warning.There is still plenty of work to be done, cleaning/tightening things up. The duplicate flag could be handled dynamically (but I kinda like the declaration?).
Deprecation
object could be generalized. etc etc.Deprecation warning
Deprecation warning expanded
Deprecation warning in autocomplete