Git Product home page Git Product logo

gut-extension's People

Contributors

bitwes avatar dependabot[bot] avatar pcting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gut-extension's Issues

Extension not activated when `addons/gut` in `.gitignore`

Issue

The extension is activated when:

"activationEvents": [
		"workspaceContains:**/addons/gut/gut.gd"
	],

If your .gitignore file has addons/gut in it, then VSCode will not activate this extension.

Workaround

One workaround I found was to not ignore gut.gd in .gitignore. This isn't the best, but it works and still excludes the majority of the GUT files.

addons/gut/*
!addons/gut/gut.gd

Related:

eclipse-theia/theia#8669

What are the differences betwen .gutconfig.json and .gut_editor_config.json ?

I discovered gut extension for vscode this morning. I already use gut with editor so I have a .gut_editor_config.json.

I do not understand why I need to create a .gutconfig.json ? Because I just copy/paste my parameters from .gut_editor_config.json in it.

Another question, can I use .gut_editor_config.json instead of .gutconfig.json with vscode extension ?

Provide settings to allow GutExtension to select which terminal to run on

When using a non-bash like terminal as default GutExtension can either not work or have issues. IE Powershell, even zsh is laggy sometimes when zsh-autosuggestions is enabled (But these are not GutExtension Issues).

Since vscode extension launches Gut in the default terminal. This forces the user to select a default integrated terminal that best supports GutExtension and not necessarily the terminal they want to use.

Certainly can be worked around but just annoying sometimes.

Powershell doesn't interpret '-' arguments correctly : Unexpected token '-s'

Gut-extension: 2.2.0
Godot-tools: 2.0.0
Windows 10

Note: Careful when you'll test, I think there's something wrong with godot-tools' release. It says the version is 2.0.0 but I get this error, as if you last PR adding getGodotPath is not included:

2024-02-28 20:38:10.171 [error] Error: command 'godotTools.getGodotPath' not found
    at k.n (vscode-file://vscode-app/c:/Users/Bob/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1587:12345)
    at k.executeCommand (vscode-file://vscode-app/c:/Users/Bob/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1587:12274)

Anyhow, I installed it from their master branch: https://nightly.link/godotengine/godot-vscode-plugin/workflows/ci/master/godot-tools.zip

Now I get this error:

PS C:\Users\Bob\Desktop\GodotProjects\TestProjectVscode> "c:/Program Files (x86)/Steam/steamapps/common/Godot Engine/godot.windows.opt.tools.64.exe" -s res://addons/gut/gut_cmdln.gd  -d 
At line:1 char:93
+ ... amapps/common/Godot Engine/godot.windows.opt.tools.64.exe" -s res://a ...      
+                                                                ~~
Unexpected token '-s' in expression or statement.
At line:1 char:96
+ ... /godot.windows.opt.tools.64.exe" -s res://addons/gut/gut_cmdln.gd  -d
+                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'res://addons/gut/gut_cmdln.gd' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

I don't know by what cursed Powershell dark magic, but if I add an & at the start it runs Gut correctly:

PS C:\Users\Bob\Desktop\GodotProjects\TestProjectVscode> & "c:/Program Files (x86)/Steam/steamapps/common/Godot Engine/godot.windows.opt.tools.64.exe" -s res://addons/gut/gut_cmdln.gd  -d 
PS C:\Users\Bob\Desktop\GodotProjects\TestProjectVscode> Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2070
 
 ---  Gut  ---
[INFO]:  using [C:/Users/Bob/AppData/Roaming/Godot/app_userdata/TestProjectVscode] for temporary output.
Godot version:  4.2.1
GUT version:  9.1.1

image

Does not function on Windows when using PowerShell

PowerShell enabled via "terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\6\\pwsh.exe" in settings.json
Same problem with all commands, but using GUT: Show Help as example.

Running the command will run
"D:\Steam\steamapps\common\Godot Engine\godot.windows.opt.tools.64.exe" -s res://addons/gut/gut_cmdln.gd -d -gh
in the terminal resulting in this error:

At line:1 char:73
+ ... amapps\common\Godot Engine\godot.windows.opt.tools.64.exe" -s res://a ...
+                                                                ~~
Unexpected token '-s' in expression or statement.
At line:1 char:76
+ ... ot.windows.opt.tools.64.exe" -s res://addons/gut/gut_cmdln.gd  -d -gh
+                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'res://addons/gut/gut_cmdln.gd' in expression or statement.
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

Taking the same command and prepending . like this:
."D:\Steam\steamapps\common\Godot Engine\godot.windows.opt.tools.64.exe" -s res://addons/gut/gut_cmdln.gd -d -gh
and running it manually works fine. (Not sure why, I'm new to PowerShell)

Another problem that pops up when fixing this is when running GUT: Run current script it adds the -gselect=test_example.gd parameter but gives this error from Gut:

 ---  Gut  ---
Unrecognized options:  [.gd]

Putting the filename in quotes: -gselect="test_example.gd" fixes this too.

Smart Logging option

Could add a smart logging option that would do the follwoing:

  • Full log for single tests and inner class tests
  • Log level 1 when running a script
  • Log level 0 when running the full suite

Bug: Can't run tests - getRunGodotCommand() returns undefined - Caused by renamed editor_path setting

Env

Windows 10
gut-extension v2.1.0
godot-tools v2.0.0 (master branch build)

Problem

When I run any Gut command, e.g. GUT: Run all, I get this error: undefined -s res://addons/gut/gut_cmdln.gd -d

A little digging to get started

This creates the command string to run:

cmd += ' -s res://addons/gut/gut_cmdln.gd ';

cmd is declared here, so it means getRunGodotCommand() returns undefined

let cmd = this.cmdUtils.getRunGodotCommand();

I think the error might come from here, when I search my settings, none are called editor_path

let editorPath = this.get_configuration("editor_path", "");

If I understand this file correctly, the godot_tools.editor_path setting from extension godot-tools was split/renamed to godotTools.editorPath.godot3 and godotTools.editorPath.godot4. Might have caused this issue.

Disable pauses when running all

Disable all pause_before_teardown when running the entire suite. This saves from having to enable/disable it in the config.

Can't launch extension commands ("command not found")

I believe I've set up this extension correctly: I have Godot Tools installed, I've created the .gutconfig.json file, and have set the godot_tools.editor_path setting. The extension seems "activated" - the commands are showing up in the command prompt. However, when I try to run any of the 4 provided commands, I get this error (this is for GUT: Run All):

image

There doesn't seem to be any additional info in the developer console. Any ideas what might be going on?

Versions:

  • VSCode 1.63.2
  • Windows 10.0.19042
  • Godot 3.4
  • gut-extension v2.0.0
  • godot-tools v1.1.2

Run-at-cursor not working anymore

It appears that some change to VSCode has broken run-at-cursor. When used it runs all tests or sometimes just the script, but never just one test.

Debugger Output is less than ideal.

When using the debugger, it prints to the Debug Console. This is basically the same thing as "Output" tab within Godot and has the following issues:

  • No pretty colors. It was all yellow. It's true. I'd be nice if I could say "Look how it shines for you". But right now I just can't say that. I hope it turns into something beautiful.
  • Subject to output buffer size which can truncate output.

Maybe it's time to implement something similar to the GUT panel in this plugin. Open to suggestions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.