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

runTask always reporting "Task not found" #418

Closed
5 tasks done
Ext3h opened this issue Jan 19, 2024 · 2 comments
Closed
5 tasks done

runTask always reporting "Task not found" #418

Ext3h opened this issue Jan 19, 2024 · 2 comments

Comments

@Ext3h
Copy link

Ext3h commented Jan 19, 2024

Checklist

  • The issue is about this extension and NOT about a fork.
  • Checked the ALL the SUPPORT document.
  • The latest version of the extension was used.
  • It is not related to remote-vscode or I checked the following issue
  • Imagine yourself into my position and think how hard to debug the issue without insufficient information.
    I understand that you have privacy concerns and I expect you to understand that this extension is developed for free.
    Thanks.

Describe the bug

Expected behavior

  • The configured task is executed before test execution.
  • If the task has failed, the task name is included in the error message.

Actual behavior

  • According to the log, the task is found and run.
  • Actually the task has not been run.
  • Instead a "Task not found" is reported as an error.
  • The error message does not name the task that has failed.

To Reproduce

I have a task configured in tasks.json in my VSCode user directory:

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "cmake",
			"label": "build_all",
			"command": "build",
			"targets": [
				"all"
			],
			"preset": "${command:cmake.activeBuildPresetName}",
			"group": "build",
			"problemMatcher": [],
			"detail": "CMake template build task"
		}
	]
}

I can run this task via Tasks: Run Task by the name build_all - so I'm confident that the task exists and it can run without errors.

I have configured TestMate to run this task:

    "testMate.cpp.test.advancedExecutables": [
        {
            "pattern":  "${command:cmake.buildDirectory}/**/test*",
            "runTask": {
                "before": [
                    "build_all"
                ]
            }
        }
    ]
  1. Go to Test Explorer
  2. Click on "Debug" Icon next to any test
  3. See error

Screenshots (optional)

image

Desktop

  • Extension Version: v4.8.0
  • VS Code Version: 1.85.2
  • Catch2 / Google Test / DOCTest Version: Catch2
  • OS Type and Version: Windows 10
  • Using remote-ssh/docker/wsl?: None

Log

testmate.log redacted by matepek

@matepek
Copy link
Owner

matepek commented Feb 8, 2024

I think the issue is related to this extension. This variable resolve to empty: "preset": "${command:cmake.activeBuildPresetName}",.
And this causing issue.

@matepek matepek closed this as completed Feb 8, 2024
@matepek
Copy link
Owner

matepek commented Feb 8, 2024

Sorry but I'm not familiar of cmake extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants