-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Fix version check for GDExtension #80591
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.
Seems fine.
Could use VERSION_HEX
alternatively for a simple comparison:
Line 55 in 7ba79d6
#define VERSION_HEX 0x10000 * VERSION_MAJOR + 0x100 * VERSION_MINOR + VERSION_PATCH |
Also, for lexicographical comparison, In this case, the hex comparison seems simpler though. |
Oh I'd have used that if I were to use the standard library Can switch to the hex comparison if desired when I have the time, probably tomorrow |
Fixes #80590? |
Don't think so, they are on 4.1.1 and the check won't fail for them |
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.
Thanks!
I think any of the variations discussed here would be fine, including the one currently used in the PR.
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.
Seems to make sense.
Only check sub_versions if you are on the relevant branch.
If we are in a newer major version it should be compatible.
Out of the scope of this bug fix but the only thing I can think of is that we are not supporting backporting compatibility.
I will mention that in Rocket Chat.
THANKS
9d07433
to
97ef4a0
Compare
Switched check to my OP suggestion, to match the one used in godotengine/godot-cpp#1208 |
Thanks! |
Thank you! |
Cherry-picked for 4.1.2. |
The version check only checks individual entries, not lexicographical comparison, this would cause a plugin requiring at least "4.1.1" to fail if you are on "4.2.0"
(Not technically needed for 4.1 as the condition won't be true there)
Could alternatively be written as: