-
-
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
GDExtension: double-precision builds differ in method hashes and lack compatibility #86346
Comments
I get similar issues to you with precision=double builds. This results in an error when trying to call a specific function (PhysicsServer3D.body_add_shape in my case). I also get similar output when running |
Some amount of differences between double and single precision are expected, but based on this error message:
I think what you might be hitting is a bug in gdextension_compat_hashes.cpp, because we didn't account for those differences when building the table of hashes in that file. I suspect we'll need to figure out which of those need to change for double precision builds, and then add some |
Note that the official CI is also affected since we generate the dump with the double-precision build, coincidentally. Warnings are non-blocking, but if files are different then we might have issues with the test godot-cpp build we run afterwards. Should we use a non-DP build for the API dump to make sure we don't miss any issues? This also applies to 4.2, not just 4.3, btw. |
Discussed at the GDExtension meeting, and we agreed that it's OK that the hashes are different between single and double precision builds. This may even be useful, since the functions aren't binary compatible, so you'd find out early, rather than calling the function and getting strange behavior. (However, there still is a bug in gdextension_compat_hashes.cpp that needs to be resolved) |
Sorry it took me so long to get to this one! It's just... really, really, really tedious to do :-) I just posted PR #88188 to fix the incorrect hashes in |
Tested versions
4.3.dev.custom_build.3ce73e5d4 (built from 3ce73e5)
System information
Windows 10
Issue description
I built a recent
master
version with bothprecision=single
andprecision=double
options in scons.Now I would like to export the
extension_api.json
. For the single version, it works fine, but for the double version I'm met with dozens of warnings about hash incompatibilities, like this:Full output
Furthermore, the two generated
extension_api.json
files are different.Primarily, method parameters differ:
"meta": "double"
instead of"meta": "float"
hash_compatibility
is absenthash
is sometimes differentPackedFloat64Array
is used instead ofPackedFloat32Array
Which of the above are intended, and which are not?
builtin_class_sizes
JSON object? That one lists all possible configurations, not just the current one -- so why would other places be specific to the current build?real
type (real_t
in C++) to abstract some of those differences?I'll attach the two files, as well as the diff from single to double.
The text was updated successfully, but these errors were encountered: