-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unbind GDExtension methods that can't reasonably be used #88418
Unbind GDExtension methods that can't reasonably be used #88418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love documenting things because it's only when you actually do it that you realise there's a some sort of problem with the way things are done.1234567.
Footnotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the rationale and the team consensus, I approve despite the compat breakage.
af7a234
to
99fd6ca
Compare
Thanks! |
Rewrite everyone's extensions again... |
Unless an extension called one of the 3 specific method unbound here (which I doubt any extension did because they can't really be used in any reasonable way), then no changes will be needed. |
or uses load-on-init pattern 😁 but it was quick to adjust. |
Bind compatibility GDExtension methods removed in #88418
At the GDExtension meeting on January 26th, 2024 (see notes) we agreed to unbind a number of methods on the
GDExtension
class that can't reasonably be used by developers.These methods include:
GDExtension::open_library()
GDExtension::initialize_library()
GDExtension::close_library()
A developer could maybe have partially correctly loaded and initialized a GDExtension using
open_library()
and then callinginitialize_library()
with each initialization level. However, a number of other important things are managed by usingGDExtensionManager::load_extension()
, which this would bypass. Strangely, we never bounddeinitialize_library()
(the opposite toinitialize_library()
), so a developer could not have closed a GDExtension properly using these APIs.Anyway, developers should be using
GDExtensionManager::load_extension()
andGDExtensionManager::unload_extension()
to correctly load and unload a GDExtension.Since it's basically impossible to use the methods being unbound by this PR in any useful way, we agreed at the meeting that we didn't need to provide compatibility methods for them.
This discussion started from PR #86968 which was attempting to document the methods in question