godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.47k stars 148 forks source link

Changing any static functions/variables requires a full restart of Godot #631

Closed Miltage closed 3 months ago

Miltage commented 3 months ago

Godot version

4.2.1.stable

VS Code version

1.87.2

Godot Tools VS Code extension version

2.0.0

System information

Windows 10

Issue description

Changing any static variables, functions, enums will show an error until you restart both VSCode and Godot.

Example:

Screenshot 2024-03-23 225419

This function definitely exists, because I can compile and run this function in game without issue. When I restart Godot this error disappears.

Steps to reproduce

  1. Create a static variable or function in a class
  2. Try to access that variable or function from another class
DaelonSuzuka commented 3 months ago

This is a problem with Godot itself and is not related to this extension.

Miltage commented 3 months ago

Ah, okay. I don't recall having this issue myself before using the extension, but I'll close it.

DaelonSuzuka commented 3 months ago

Before you were using the extension, you weren't getting the diagnostics/warnings from Godot's Language Server. VSCode/this extension are just displaying the warnings, it doesn't generate them.

The reason you're getting these warnings is because the Language Server is confused.