-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Unquoted compatibility_minimum version number in GDExtension C++ example causes unrelated OS+arch error message when extended to include patch version #7864
Labels
Comments
This would probably also break for a number of cases where the value is not exactly representable, though converting (short) floats from and back to string should be correct |
Great catch, thanks! |
2 tasks
m4gr3d
added a commit
to m4gr3d/Godot-Android-Samples
that referenced
this issue
Sep 7, 2023
m4gr3d
added a commit
to m4gr3d/GDExtension-Android-Plugin-Template
that referenced
this issue
Sep 7, 2023
mhilbrunner
pushed a commit
to mhilbrunner/godot-docs
that referenced
this issue
Oct 8, 2023
… errors if extended to unquoted x.y.z format. Fixes godotengine#7864
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Your Godot version: 4.1.1-stable
Issue description: The example
gdexample.gdextension
file given in the "Using the GDExtension module" section of the "GDExtension C++ example" page contains an unquoted version number (presently4.1
) that, should the unwary novice extend it to include a patch version (4.1.1
for example) will cause Godot to throw a correct but misleading "No GDExtension library found for current OS and architecture (<os>.<arch>) in configuration file" error for reasons that have nothing to do with the[libraries]
section of the file (see below).When the version number is quoted, like
"4.1"
or"4.1.1"
, it works as expected.The C++ example being de-facto documentation of a
.gdextension
file'scompatibility_minimum
field, I suggest having it demonstrate the use of quoted version numbers to help new extension developers avoid this little trap.Analysis: When unquoted,
4.1
is interpreted by VariantParser as a TK_NUMBER, which it seems to consider ended as soon as it encounters a second decimal period, a number like 4.1.1 making no sense in a numeric context. This means that agdexample.gdextension
file like this (with an unquoted4.1.1
as the version)is seen by ConfigFile as having this structure
which, having no
[libraries]
section that it can see (macos.release
,windows.debug.x86_32
, etc. all being parsed as being in the[configuration]
section), yields the misleading error, correct from its perspective though it be.URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html
If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html
The text was updated successfully, but these errors were encountered: