Skip to content

[GDScript]: global_script_class_cache contains invalid entries and results in invalid parse errors #78642

@MikeSchulze

Description

@MikeSchulze

Godot version

v4.1.beta2.official [a2575cb]

System information

Windows10

Issue description

i do script generation on my plugin and it fails with an invalid error
user://tmp/example/example_tests.gd:2 - Parse Error: Class "TestPersonTest" hides a global script class.

The class do not exists in my project, but after generate/save and load this error pops up.

What i find out

There is still a invalid entry in the .godot/global_script_class_cache.cfg

"base": &"GdUnitTestSuite",
"class": &"TestPersonTest",
"icon": "",
"language": &"GDScript",
"path": "res://test/first-steps/test_person_test.gd"
}, {

This class existed for some manual testing, but has been deleted for some time.
A restart of the editor do not fix the .godot/global_script_class_cache.cfg

Steps to reproduce

Use the attached minimized project and run the scene.

Minimal reproduction project

gdUnit4.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions