-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Implement Godot-in-the-loop test suite and fix debugger errors #788
Implement Godot-in-the-loop test suite and fix debugger errors #788
Conversation
Fixes the VSCode watch window freeze due to missing response in case of exception. See related godotengine#779
1. Same reference but different variable override fix, which resulted in variables being lost ** Now different GodotVariable instances are used for different variables with same reference ** const replacement = {value: rawObject, sub_values: sub_values } as GodotVariable; 2. 'Signal' type handling crash and string representation fix ** value.sub_values()?.map 3. Empty scopes return fix ** if (this.ongoing_inspections.length === 0 && stackVars.remaining == 0) * Various splice from findIndex fixes (where findIndex can return -1) * updated vscode types to version 1.96 to use `onDidChangeActiveStackItem` for breakpoint hit detection in tests 1 & 3 should fix godotengine#779
Looks like |
Yeah, until now there haven't been any tests that involved godot. You could figure out how to set that up, wink wink. |
At a glance this looks fantastic, thank you for the work setting this up! I'm going to try and dig into this later today. |
This PR is ready. |
@DaelonSuzuka, I've re-wrote the variables code to make it more reliable and closer mapped to DAP and godot concepts. Would you like to review it as a separate PR or part of this PR? |
Hey @MichaelXt, sorry this has taken me so long to review. My productive hours have nosedived lately and I'm not sure why. I just got your tests to run locally, so that looks good to me. I have two minor complaints: When I first did
My Godot 4 binary was named Then, once I made Can you make sure this is also a failing condition? Thanks again for the contribution, this is a huge upgrade! |
@DaelonSuzuka, thanks for taking a look and reviewing! //file: package.json
"godotTools.editorPath.godot3": {
"type": "string",
"default": "godot3",
"description": "Path to the Godot 3 editor executable"
},
"godotTools.editorPath.godot4": {
"type": "string",
"default": "godot",
"description": "Path to the Godot 4 editor executable"
}, I don't think we should hardcode the test to use Working on executing |
Can you make the test runner set The most important thing is just making sure it actually fails if the binary is missing, though. |
@MichaelXt If it's problematic to run the import command every time, you can just have it check if the import has happened, and have an error telling the user to run |
Could you please elaborate a bit. do you suggest to call: const config = vscode.workspace.getConfiguration("godotTools");
config.update("editorPath.godot4", "godot4", vscode.ConfigurationTarget.Workspace); on {
"godotTools.editorPath.godot4": "godot4"
} |
Well I'm still not very familiar with the test runner, so I was trying not to speak out of my depth about the implementation.
Am I better off making additional test projects? This probably isn't worth your time right now, so if you just make sure the test fails if the binary is missing (for whatever reason) then we can call this PR done. |
Agree, it is better to have separate project per godot version:
Yes, with the addition of |
Thanks for indulging my rambling; this looks good to me. |
Fixes for get variables issues
** Now different GodotVariable instances are used for different variables with same reference
** const replacement = {value: rawObject, sub_values: sub_values } as GodotVariable;
** value.sub_values()?.map
** if (this.ongoing_inspections.length === 0 && stackVars.remaining == 0)
** updated vscode types to version 1.96 to use
onDidChangeActiveStackItem
for breakpoint hit detection in tests1 & 3 should fix Race condition in godot4\debug_session::get_variable() results in adding watch and showing variables stops working. #779