Repository navigation
Bringing the master branch in line with Godot master - #75
BastiaanOlij wants to merge 1 commit into
Conversation
|
I'll wait with merging this until the end of the week to give people to become aware of this change. |
| // GDNATIVE CORE 1.0.1 | ||
|
|
||
| bool GDAPI godot_is_instance_valid(const godot_object *p_object); | ||
| // GDNATIVE CORE 1.0.2? |
There was a problem hiding this comment.
Shouldn't it be 2.0.0, since there are breaking changes? e.g. PoolArray -> PackedArray
| "next": { | ||
| "type": "CORE", | ||
| "version": { | ||
| "major": 1, | ||
| "minor": 3 | ||
| }, | ||
| "next": null, |
There was a problem hiding this comment.
The entire point of having the complexity of versioned API structs and next pointers is so that the layout of older versions can be expected to never change. I understand that you need to make breaking changes, and I agree that they're for the better, but please just erase the previous versions and make it version 2.0. There isn't any value in keeping retroactively changed "previous versions" around, except making the life of GDNative API consumers harder than it already is.
There was a problem hiding this comment.
By leaving the major version at 1, binaries built against older headers will have no idea the struct layout is different. When used, they will just try to carry on and cause arbitrary chaos because the functions no longer do what they are supposed to. This will require terrible hacks in all bindings/plugins to work around, and it's all avoidable with a simple change to 2. Please do take a moment to consider putting "major": 2 there. It'll cost a few seconds, nothing will be lost, and the API will be much less of a pain to deal with. Thank you very much.
|
@karroffel , @akien-mga, @bojidar-bg , toasteater makes valid points here. Due to the breaking changes in Godot the structs are no longer backwards compatible as originally designed to be. That they still hold the same version number makes it impossible for a plugin to detect that the API isn't compatible with what it is compiled against. I personally vote for changing the major version number in the APIs so it is in sync with the version number of Godot. I don't think a gdnative plugin written for Godot 3 will work when used with Godot 4 at all anyway, we really should have a protection against that. This is something that needs to be changed upstream in Godot itself, I wanted your thoughts first before I make a PR for this. |
|
@BastiaanOlij @toasteater PR godotengine/godot#39183 should fix this behavior by providing a api 2.0 that merges all the 1.0 + 1.1 + 1.2 + breaking changes ;-) PS: @BastiaanOlij could you use the |
|
@godotengine/gdnative sorry for the late response, just left an approval on that PR. Looks good. I'll update this once that is merged so we don't have to go through this again. @akien-mga should we move this repo to the main godot github page aswell? |
|
This repo has been moved, any update on this PR and the others like it? |
|
Are there any plans on merging this soon? |
|
I intend to do this soon (there are still some pending PRs that should be included, so I'm waiting for those to be merged). So I'm not sure if you want to update this PR or close it. |
|
This now changes loads with GDExtensions so closing this PR, we'll open a new one soon. |
Bringing the master branch in line with Godot master as at the 2nd of June 2020
IMPORTANT This will bring the master branch in line with Godot master which is now our Godot 4.0 Vulkan implementation. This is needed so we can start preparing our modules for Godot 4.0 as there are serious breaking changes in renamed nodes, renamed functions and such.
When developing modules for Godot 3.2 (or earlier) make sure you use the correct branch of this repo!