-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Script classes are not regenerated project-wide after first import #72154
Comments
Sounds very similar to #70667 EDIT: The first issue is rather minor, as you can just delete |
Just to chime in here, deleting the |
Are you deleting the folder while the Godot is not running? You have to close the project, delete the folder and open. Godot will scan all files and should fill all class entries. |
I'm closing Godot first. Here are my repro steps:
|
I had this same issue. |
I run into the same issue, it was need to open every class edit and save. |
I have no idea why anyone would do this, but this fixes it. Fixes godotengine#72154. Depends on godotengine#72444 being merged to function properly.
Godot version
4.0.dev.d1e5903c67956707948b1de370b807e3aad395b7
System information
macOS 13.1
Issue description
Script classes are not regenerated project-wide after first import. See the reproduction steps below.
This is a huge problem for large games since a class may not have all of its dependencies ready by the time it comes to parsing the script, so it doesn't get registered on the first pass, and there are no other passes. The only solution is to manually open every single script and save it (potentially multiple times if there are long dependency chains).
The symptom is happening as of #70557, but the root cause was still present before that PR. If I revert that PR, open the reproduction project, and then instead of deleting the below file I empty out the
_global_script_class*
members, A and B do not regenerate (but they do if you open and save them). This has become a serious regression because the class list is no longer saved to version control, so you can end up in a situation where deleting.godot/
results in a broken project until you manually open and save every script (for every developer, every time they delete.godot/
).Steps to reproduce
.godot/global_script_class_cache.cfg
file. Both A and B will be in there (good)..godot/global_script_class_cache.cfg
file. It is not regenerated (bad).a.gd
script and save it..godot/global_script_class_cache.cfg
file. Only A will be in there, but B will not (bad).Minimal reproduction project
GlobalClassMissing.zip
The text was updated successfully, but these errors were encountered: