-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
4.0.2 patch release breaks GDExtension API #75779
Comments
Yeah, we noticed, but both me and @akien-mga don't have an idea why that happened. |
All these methods have a float default argument. Not sure if worth reverting it in 4.0.3 and then having just 4.0.2 as the incompatible one, or if leaving is better and then having 4.0 and 4.0.1 as the incompatible ones. |
216: Catch failed calls to `classdb_get_method_bind()` r=Bromeon a=Bromeon When Godot fails to provide a method (e.g. invalid hash), this FFI method returns a null pointer. Instead of UB from dereferencing that pointer, a panic is now caused. Found as a result of godotengine/godot#75779. Co-authored-by: Jan Haller <bromeon@gmail.com>
The changes in native structs is also problematic. Code using the old one would crash when interacting with the new. |
Since we cannot fix this release anymore and the bug was patched in #74600, I'll close this issue. |
Godot version
4.0.2-stable
System information
Windows 10
Issue description
Here are the diffs of
extension_api.json
between patch versions of the Godot 4.0 range:v4.0 -> v4.0.1
v4.0.1 -> v4.0.2
In the diff to 4.0.1, a type
bool
is changed toint
(MenuBar::start_index
property). While technically a breaking change, this was a bug in the first place, so it should be OK.In the diff to 4.0.2 however, several function hashes changed. And in fact Godot 4.0.2 can no longer invoke the functions with the older hash. I encountered this with
AudioStreamPlayer::play
(old hash3041634712
) andAnimatedSprite2D::play
(old hash1459844657
).Why did these hashes change?
If the change is intended, there should probably be a compatibility map, so that new functions can still be found using old hashes (this was the idea discussed before Godot 4, IIRC). Without a strategy here, every patch release can be major compatibility hazard for GDExtension, making it impossible to update Godot versions independently of the extension layer.
Steps to reproduce
In general:
AudioStreamPlayer::play
.See also below for a concrete, easy-to-reproduce example.
Minimal reproduction project
You can use godot-rust's vendored
dodge-the-creeps
example.cargo build -p dodge-the-creeps
from the cloned repo root.The text was updated successfully, but these errors were encountered: