You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tried to uncheck Project Settings > debug/gdscript/warnings/exclude_addons so I could spot warnings in my own locally developed add-on, but there is no way to tell Godot to only enable warnings on one addons - so it enabled warnings on ALL add-ons including GUT. However, GUT has a huge amount of warnings.
The most obvious is debug/gdscript/warnings/native_method_override because its default value is Error, so GUT run will simply fail as it detects native instantiate being overridden:
doubler.gd > class PackedSceneDouble > func instantiate
Parser Error: The method "instantiate()" overrides a method from native class "PackedScene". This won't be called by the engine and may not work as expected. (Warning treated as error.)
However, from the comment above:
A stroke of genius if I do say so. This allows for doubling a scene without
having to write any files. By overloading the "instantiate" method we can
make whatever we want.
I see it's a really neat trick, so we want to keep it for simplicity (avoid user having to call a proxy instantiate each time). However if I disable this warning, it will disable it completely for my project too...
Then, skipping this particular trick, there are many other warnings:
on unused variable, unused parameter and shadowing warnings which are probably easier to fix.
For now I'll just re-enable Exclude add-ons and only disable it from times to times when running the game but not GUT: indeed, as long as you don't run GUT tests themselves, the warnings/errors won't trigger so you can still test your game and custom add-ons to spot their own warnings.
What we'd really need is a more granular control of warnings over different folders, I'll open a proposal for it.
The text was updated successfully, but these errors were encountered:
I think this should stay open. I've had most warnings disabled for GUT for a long time because of all the warnings that would show up due to dynamic code and code used to test GUT. Having a list or something would be good. I despise unused vars and such, so it would be nice if I could re-enable some/all of the warnings. There were just so many "invalid" warnings that it was hard to find the ones that mattered.
@hsandt FYI I edited your comment for formatting (the # in the quote were all turned into H1s).
Parser Error: The method "instantiate()" overrides a method from native class "PackedScene". This won't be called by the engine and may not work as expected. (Warning treated as error.)
GUT should disable and then enable this warning (if it was enabled) when creating a double of a scene, the same way that DOUBLE_STRATEGY.INCLUDE_NATIVE does it. We don't really care that the engine won't call it. There's some edge cases that should be explored, but GUT has been doing it this way for a long time and I've not seen any issues.
I recently tried to uncheck Project Settings > debug/gdscript/warnings/exclude_addons so I could spot warnings in my own locally developed add-on, but there is no way to tell Godot to only enable warnings on one addons - so it enabled warnings on ALL add-ons including GUT. However, GUT has a huge amount of warnings.
The most obvious is debug/gdscript/warnings/native_method_override because its default value is Error, so GUT run will simply fail as it detects native
instantiate
being overridden:doubler.gd > class PackedSceneDouble > func instantiate
However, from the comment above:
I see it's a really neat trick, so we want to keep it for simplicity (avoid user having to call a proxy instantiate each time). However if I disable this warning, it will disable it completely for my project too...
Then, skipping this particular trick, there are many other warnings:
on unused variable, unused parameter and shadowing warnings which are probably easier to fix.
For now I'll just re-enable Exclude add-ons and only disable it from times to times when running the game but not GUT: indeed, as long as you don't run GUT tests themselves, the warnings/errors won't trigger so you can still test your game and custom add-ons to spot their own warnings.
What we'd really need is a more granular control of warnings over different folders, I'll open a proposal for it.
The text was updated successfully, but these errors were encountered: