Skip to content

Bringing the master branch in line with Godot master - #75

Closed
BastiaanOlij wants to merge 1 commit into
godotengine:masterfrom
BastiaanOlij:update_master_20200602
Closed

BastiaanOlij wants to merge 1 commit into
godotengine:masterfrom
BastiaanOlij:update_master_20200602

Conversation

@BastiaanOlij

Copy link
Copy Markdown
Collaborator

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!

@BastiaanOlij

Copy link
Copy Markdown
Collaborator Author

I'll wait with merging this until the end of the week to give people to become aware of this change.

Comment thread gdnative/gdnative.h
// GDNATIVE CORE 1.0.1

bool GDAPI godot_is_instance_valid(const godot_object *p_object);
// GDNATIVE CORE 1.0.2?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be 2.0.0, since there are breaking changes? e.g. PoolArray -> PackedArray

Comment thread gdnative_api.json
Comment on lines +20 to +26
"next": {
"type": "CORE",
"version": {
"major": 1,
"minor": 3
},
"next": null,

@ghost ghost Jun 2, 2020 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@BastiaanOlij

BastiaanOlij commented Jun 3, 2020 •

Copy link
Copy Markdown
Collaborator Author

@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.

@touilleMan

touilleMan commented Jun 3, 2020 •

Copy link
Copy Markdown
Member

@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 handle next time, so that I'm also summoned ^^

@BastiaanOlij

Copy link
Copy Markdown
Collaborator Author

@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.
I am going to merge the 3.2 branch changes in a minute (unless there were reactions there I haven't read yet).

@akien-mga should we move this repo to the main godot github page aswell?

@aaronfranke

Copy link
Copy Markdown
Member

This repo has been moved, any update on this PR and the others like it?

@erictuvesson

Copy link
Copy Markdown

Are there any plans on merging this soon?

@vnen

vnen commented Mar 1, 2021

Copy link
Copy Markdown
Member

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.

@BastiaanOlij

Copy link
Copy Markdown
Collaborator Author

This now changes loads with GDExtensions so closing this PR, we'll open a new one soon.

@akien-mga akien-mga added this to the 4.0 milestone Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants