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

GD-139: Enable addon script validation results in a lot of compile errors and warnings #139

Closed
MikeSchulze opened this issue Mar 7, 2023 · 0 comments · Fixed by #141
Closed
Assignees
Labels
blocker This issue blocks the user to use GdUnit bug Something isn't working godot related issue Its a bug by Godot engine and can't be fixed by GdUnit
Milestone

Comments

@MikeSchulze
Copy link
Owner

MikeSchulze commented Mar 7, 2023

The used GdUnit4 version:
latest master

The used Godot version:
v4.0.stable.official [92bee43ad]

OS including version:
Windows 10, MacOs

Describe the bug
Godot has exclude addons by default from the GdScript validation.
image
After remove the default flag i found a lot of compiler errors in the plugin

Steps to Reproduce

  • include the addons to the GDScript validation see screenshot
  • restart Godot

Check the errors:

--- Debug adapter server started ---
--- GDScript language server started ---
  res://addons/gdUnit4/src/core/GdUnitSingleton.gd:17 - Parse Error: The variable type is being inferred from a Variant value, so it will be typed as Variant. (Warning treated as error.)
  res://addons/gdUnit4/src/core/GdUnitSingleton.gd:20 - Parse Error: The variable type is being inferred from a Variant value, so it will be typed as Variant. (Warning treated as error.)
  res://addons/gdUnit4/src/core/GdUnitSingleton.gd:32 - Parse Error: The variable type is being inferred from a Variant value, so it will be typed as Variant. (Warning treated as error.)
  res://addons/gdUnit4/src/core/parse/GdDefaultValueDecoder.gd:0 - Parse Error: Could not resolve class "GdUnitSingleton".
  res://addons/gdUnit4/src/core/GdUnitMemoryPool.gd:0 - Parse Error: Could not resolve class "GdUnitSingleton".
  res://addons/gdUnit4/src/core/GdUnitMemoryPool.gd:30 - Parse Error: The variable type is being inferred from a Variant value, so it will be typed as Variant. (Warning treated as error.)
  res://addons/gdUnit4/src/core/GdUnitMemoryPool.gd:54 - Parse Error: The variable type is being inferred from a Variant value, so it will be typed as Variant. (Warning treated as error.)
  modules/gdscript/gdscript_compiler.cpp:2318 - Condition "!base->is_valid() && !base->reloading" is true. Returning: ERR_BUG
  modules/gdscript/gdscript_compiler.cpp:2318 - Condition "!base->is_valid() && !base->reloading" is true. Returning: ERR_BUG
  res://addons/gdUnit4/src/core/GdFunctionDoubler.gd:71 - Parse Error: The variable type is being inferred from a Variant value, so it will be typed as Variant. (Warning treated as error.)
  res://addons/gdUnit4/src/mocking/GdUnitMockFunctionDoubler.gd:0 - Parse Error: Could not resolve class "GdFunctionDoubler".
  modules/gdscript/gdscript_compiler.cpp:2318 - Condition "!base->is_valid() && !base->reloading" is true. Returning: ERR_BUG
  modules/gdscript/gdscript_compiler.cpp:2318 - Condition "!base->is_valid() && !base->reloading" is true. Returning: ERR_BUG
  res://addons/gdUnit4/src/network/rpc/RPCMessage.gd:14 - Parse Error: The method "to_string" overrides a method from native class "Object". This won't be called by the engine and may not work as expected. (Warning treated as error.)
  res://addons/gdUnit4/src/network/rpc/RPCGdUnitEvent.gd:14 - Parse Error: The method "to_string" overrides a method from native class "Object". This won't be called by the engine and may not work as expected. (Warning treated as error.)
  res://addons/gdUnit4/src/network/rpc/RPCGdUnitTestSuite.gd:14 - Parse Error: The method "to_string" overrides a method from native class "Object". This won't be called by the engine and may not work as expected. (Warning treated as error.)
Loading GdUnit4 Plugin success

Some of the errors i reported as Godot Bug.
74532

Minimal reproduction project:

@MikeSchulze MikeSchulze added the bug Something isn't working label Mar 7, 2023
@MikeSchulze MikeSchulze self-assigned this Mar 7, 2023
@MikeSchulze MikeSchulze added the blocker This issue blocks the user to use GdUnit label Mar 7, 2023
@MikeSchulze MikeSchulze added this to the V4.1.0 milestone Mar 7, 2023
@MikeSchulze MikeSchulze changed the title Enable addon script validation results in a lot of compile errors and warnings GD-139: Enable addon script validation results in a lot of compile errors and warnings Mar 7, 2023
@MikeSchulze MikeSchulze added the godot related issue Its a bug by Godot engine and can't be fixed by GdUnit label Mar 7, 2023
@MikeSchulze MikeSchulze moved this to In Progress in GdUnit4 Mar 8, 2023
@MikeSchulze MikeSchulze linked a pull request Mar 8, 2023 that will close this issue
@github-project-automation github-project-automation bot moved this from In Progress to Done in GdUnit4 Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker This issue blocks the user to use GdUnit bug Something isn't working godot related issue Its a bug by Godot engine and can't be fixed by GdUnit
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant