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

Custom class names randomly (and permanently) stop autocompleting #78926

Closed
LO-0116 opened this issue Jul 2, 2023 · 1 comment
Closed

Custom class names randomly (and permanently) stop autocompleting #78926

LO-0116 opened this issue Jul 2, 2023 · 1 comment

Comments

@LO-0116
Copy link

LO-0116 commented Jul 2, 2023

Godot version

v4.0.2.stable.official [7a0977c]

System information

Windows 10, compatibility renderer

Issue description

Sometimes, a custom class declared by class_name will stop updating with changes to the class's file.

For example, if you have a class Foo, and then add a variable to it like fooVar, and then try to index that variable from other contexts, such as from other scripts extended Foo or other scripts that type hints Foo, the new fooVar will not appear. Same goes for added functions.

Once this failure to update occurs once, it will always fail for all future changes to this class (other classes in the same project are not affected). Reloading the project will update changes to the class, but only once. Each added variable or function requires a reload to appear elsewhere.

I cannot reproduce this with minimal projects, only during serious production Which also makes it impossible for me to share the code due to NDA.

Something observations:

  1. this bug only appears when a cyclic reference between two custom classes has occurred. Removing cyclic reference does not fix it.
  2. moving the offending files and scenes to a different (nearly empty) project will solve the problem

Steps to reproduce

N/A: bug only encountered during serious production. Minimal projects cannot reproduce bug.

Minimal reproduction project

N/A

@LO-0116 LO-0116 closed this as completed Jul 2, 2023
@LO-0116 LO-0116 reopened this Jul 2, 2023
@dalexeev
Copy link
Member

dalexeev commented Jul 2, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants