Skip to content
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 type inference for autoload scenes while they are being loaded #98313

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tracefree
Copy link
Contributor

@tracefree tracefree commented Oct 18, 2024

Fixes #77643
Fixes #98270

This is a quick and dirty fix to the obscure bug described in the issues above. It's dirty because it relies on the shaky assumption that if the node of the autoload singleton is retrieved as null that means we are in the middle of instantiating that very scene, and because I temporarily store the scene's root node's script path in the value for the autoload, which it is not meant for. So I don't expect this to be merged as-is, just want to kickstart a discussion about possible solutions.

How shaky is the assumption described above? Can it be relied upon after all?

If the approach in principle is okay, what would be a better place to temporarily store the script path?

@AThousandShips AThousandShips added bug topic:gdscript cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 19, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:gdscript
Projects
None yet
2 participants