virtualx-engine/core/object
Juan Linietsky d8078d3f4c Add a backwards-compatibility system for GDExtension method
This adds a way to ensure that methods that were modified in the Godot API will continue working in older builds of GDExtension even if the new signature is different.

```C++
// New version (changed)
ClassDB::bind_method(D_METHOD("add_sphere","radius","position"),&MyShapes::add_sphere);
// Compatibility version (still available to extensions).
ClassDB::bind_compatibility_method(D_METHOD("add_sphere","radius"),&MyShapes::_compat_add_sphere);
```

**Q**: If I add an extra argument and provide a default value (hence can still be called the same), do I still have to provide the compatibility version?
**A**: Yes, you must still provide a compatibility method. Most language bindings use the raw method pointer to do the call and process the default parameters in the binding language, hence if the actual method signature changes it will no longer work.

**Q**: If I removed a method, can I still bind a compatibility version even though the main method no longer exists?
**A**: Yes, for methods that were removed or renamed, compatibility versions can still be provided.

**Q**: Would it be possible to automate checking that methods were removed by mistake?
**A**: Yes, as part of a future PR, the idea is to add a a command line option to Godot that can be run like : `$ godot --test-api-compatibility older_api_dump.json`, which will also be integrated to the CI runs.
2023-05-15 12:05:40 +02:00
..
callable_method_pointer.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
callable_method_pointer.h Complete support of callables of static methods 2023-04-12 18:12:19 +02:00
class_db.cpp Add a backwards-compatibility system for GDExtension method 2023-05-15 12:05:40 +02:00
class_db.h Add a backwards-compatibility system for GDExtension method 2023-05-15 12:05:40 +02:00
make_virtuals.py Add GodotTypeInfo::Metadata to MethodInfo 2023-01-26 15:51:34 +01:00
message_queue.cpp Complete support of callables of static methods 2023-04-12 18:12:19 +02:00
message_queue.h Complete support of callables of static methods 2023-04-12 18:12:19 +02:00
method_bind.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
method_bind.h Avoid losing references to objects in the native-scripting boundary 2023-02-03 17:48:41 +01:00
object.cpp Fix edge cases of object lifetime when signals involved 2023-04-11 17:27:39 +02:00
object.h Optimize Object::get_class_name 2023-04-08 19:25:50 +02:00
object_id.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
ref_counted.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
ref_counted.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
script_language.cpp Add Engine::unregister_script_language and make Engine::register_script_language returns a Error 2023-02-10 19:50:24 +01:00
script_language.h Remove unused ScriptLanguage methods 2023-02-26 22:30:56 -08:00
script_language_extension.cpp Remove unused ScriptLanguage methods 2023-02-26 22:30:56 -08:00
script_language_extension.h Remove unused ScriptLanguage methods 2023-02-26 22:30:56 -08:00
SCsub Implement native extension system 2021-06-25 17:32:45 -03:00
undo_redo.cpp Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
undo_redo.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
worker_thread_pool.cpp Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
worker_thread_pool.h More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00