-
-
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
GDScript: Partially allow member lookup on invalid scripts #92609
GDScript: Partially allow member lookup on invalid scripts #92609
Conversation
f1529d7
to
528bf64
Compare
+ always default initialize static variables + dont invalidate script when dependant scripts don't compile/resolve
528bf64
to
7f7114c
Compare
Thanks, i'm tested with this pull, it fixed #92610 |
|
||
return E->value->call(nullptr, p_args, p_argcount, r_error); | ||
return E->value->call(nullptr, p_args, p_argcount, r_error); | ||
} | ||
} | ||
top = top->_base; | ||
} |
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'm not sure how critical this is, but there may be a situation where the current script is not yet valid, but the base script is already valid. In this case, static function lookup will work inconsistently for "inherited" (actually shadowed) static methods. Until the current script compiles successfully, the lookup will find the base method, and then the current class method.
I tested this PR with GUT and it fixed the issue. Minor note For all I know, this could be an issue with GUT that was fixed in Godot, and not a Godot issue. It's a non issue for GUT, I am just documenting my experience with this 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.
Makes sense and looks good in theory, but TIWAGOS
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.
As discussed in the release management meeting yesterday, let's go ahead with that change even though GDScript contributors are not available right now for an in-depth review.
This is a follow up to rune's own changes and was tested by several affected users, so it should be good to go and test more widely in the next beta.
Thanks! |
this was supposed to be my fix for this regression: #92534
it does fix it separately from #92544
rethinking the changes i made in #92035 and #90601
GDScriptFunction
on invalid scripts are protected with a check to see if the script is valid instead of returning too earlythis all means that invalid scripts can still have their members safely queried and possibly even native base functions called if there are instances with the invalid script attached
and that a script is not 'invalid' if only a depended script is 'invalid' (as it was before)
fixes #92610