-
-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Describe the project you are working on
GDExtension and godot-cpp.
Describe the problem or limitation you are having in your project
Right now, we have 3 active branches of godot-cpp:
4.14.2master(for 4.3, but soon it'll be for 4.4, and we'll add a new4.3branch)
We try to cherry-pick as much as we can from godot-cpp master to all earlier branches as far back as 4.1 (we don't cherry-pick to 4.0 and make as few changes there as we can, since it's incompatible with Godot 4.1+).
We intend to keep doing this, because GDExtensions targeting a particular Godot version (starting with Godot 4.1) will work for that version and any later version. This creates an incentive for GDExtension developers to target the earliest possible version, in order to give the widest compatibility.
However, this cherry-picking creates a couple problems:
- It's time-consuming to cherry-pick. At the moment it's not too bad - the last wave of cherry-picks from
masterto4.1and4.2took me about 90 minutes. However, as more versions are released, this could grow if we continue to cherry-pick all the way back to4.1. However, we could work around this by only supporting the 2 previous minor versions, or something like that, in order to keep this constant. - Cherry-picking can lead to unpredictable changes for developers. Sometimes changes (including important bug fixes) will change behavior in subtle ways for developers. Since developers may be using, for example, the
4.1branch over the long-term for compatibility reasons, we want to bring these bug fixes to them. However, since the changes to the godot-cpp4.1branch don't get a version number (except when a Godot release happens), we don't have a good way to provide a CHANGELOG. Even if we attempted to list the changes with the Godot synchronized release, it's a little awkward in that we're making the same godot-cpp changes to4.1,4.2, etc at the same time, but we don't have any way to connect them to each other, since godot-cpp is versioned as Godot is.
The first problem isn't that big of a deal, however, the second one is increasingly creating headaches for developers.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose that we support all Godot 4.1+ versions using a single branch of godot-cpp, and then version godot-cpp independently of Godot itself.
We could still include the latest extension_api.json files for each minor version of Godot, but developers would indicate to the buildsystem which Godot version they wished to be compatible with (rather than selecting a particular branch of godot-cpp), which would select which one to use. (And they can still point to a custom extension_api.json, of course.)
We could always keep the latest gdextension_interface.h in the repo, but we'd use #ifdefs (based on the version pulled from the extension_api.json) to use the correct functions for the correct Godot compatibility.
And this would allow us to make a CHANGELOG for each released version of godot-cpp, which lists all the changes and how they affect developers, regardless of what Godot version they are targeting for their extension.
I'm not sure what the version number for this "universal" godot-cpp should start on, perhaps 4.4.0? That way versions 4.3 and below still refer to the old way, and we reserve version 5.0 to potentially mean something different for Godot 5.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Described in the previous section :-)
If this enhancement will not be used often, can it be worked around with a few lines of script?
n/a
Is there a reason why this should be core and not an add-on in the asset library?
n/a