Skip to content

Class names stop working after a while #76380

@blackears

Description

@blackears

Godot version

v4.0.2.stable.official [7a0977c]

System information

Windows 10, Compatability

Issue description

I'm getting a problem where class names that I define in GDScript just stop working after a while. I'm not sure what is causing this. I am just noticing that when I'm working on a project where I've defined a lot of classes using class_name MyClassName the name will just stop being recognized after a while. Sometimes if I restart the editor two times it will become available again.

Sometimes a class name that I had been using for a long time just stops working and I have to append a '2' to the class name to be able to use the class again. This is not due to name collisions - these are the only classes in my project with this name and they're complicated enough that I doubt they are part of the core GDScript api.

I suspect the Godot editor is caching something that is persisting between sessions, and whatever that is is interfering with the ability of the script to compile

Steps to reproduce

I'm not sure what causes this. It might be related to duplicating a .gd resource and then editing it, but not always. I'm just noticing that after working on a project for a while, some class names just stop being recognized.

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions