-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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: Fix compilation of expressions compiling other classes #81577
GDScript: Fix compilation of expressions compiling other classes #81577
Conversation
// Should not need to pass p_owner since analyzer will already have done it. | ||
res = GDScriptCache::get_shallow_script(global_class_path, err, parser->script_path); |
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.
For those curious, this is the fix. The other stuff is just trying to ensure dependencies are properly added in the GDScriptCache
.
This PR is part of ongoing work on fixing cyclic dependencies in the GDScript compiler.
6b29a06
to
d330f56
Compare
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.
LGTM! I love small changes like this that are easy to review. Thanks for taking on cyclic dependency hell 😎
p.s. nice branch name
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.
The changes are pretty self-contained and I trust @anvilfolk's work and @ryanabx's review, so this should be good to merge and test in dev5. If there are regressions, we'll spot them there :)
I'll be around to fix any more regressions! I did test this on my other cyclic dependencies tests and it worked properly. It might just be ongoing work to squash all these issues that only crop with with specific cyclic relationships and loading orders which exist in large projects. |
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 to me! Let's mergeeeeee!
Thanks! |
This PR is part of ongoing work on fixing cyclic dependency errors in the GDScript compiler. This removes another instance of the compiler triggering compilation of an external class during compilation of the current class, with bad side-effects.
Since more of the GDScript codebase now more fully depends on
GDScriptCache::finish_compiling()
, as it should, I also added dependencies to a couple ofGDScriptCache::get_shallow_script()
calls that did not set those dependencies.Fixes #81548. Fixes #81447. Fixes #81799.