godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.64k stars 19.32k forks source link

Signals from signal bus are marked as "not used in the class" #93202

Open inhalt120g opened 3 weeks ago

inhalt120g commented 3 weeks ago

Tested versions

v4.3.beta1.official [a4f2ea91a] (not happening in 4.2.2)

System information

Godot v4.3.beta1 - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

Issue description

Signal bus is a pattern that Godot practically makes obligatory. It is often (from what I saw of other people's code) implemented as one of autoloads, usually as a script containing only and dedicated exclusively to signals.

Since 4.3, every signal in such a script is producing a warning. image This can get quite annoying when there's more than a few of these.

I understand that I can just add an "ignore warning" for each signal and I understand that the way this is detected is actually more logical than what we had before (since indeed what the warning is reporting is technically true), but I think it makes no sense to require adding an "ignore warning" every time I create a new signal in this type of autoload.

Steps to reproduce

Make a signal bus, launch a project, read the warnings.

Minimal reproduction project (MRP)

Any.

dalexeev commented 3 weeks ago