microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.41k stars 29.33k forks source link

Error message complaining about build task #176670

Open andreeis opened 1 year ago

andreeis commented 1 year ago

The Makefile Tools extension creates a task when users want to build their code bases. The task uses "make" executable as command with arguments that we deduce from user settings. This is how we write the task: make.ts. Around line 340 (task creation, inside function doBuildTarget). Do you spot anything wrong that we do there? So that is the typescript implementation of the Makefile Tools extension.

When we run the extension in VSCode and the user builds their code (which will hit the code I pointed above), the task appears to run fine (as it does for several releases already) but we see his message in "Tasks Output Window" that recently appeared.

Error: The task "makefile: Makefile Tools Build Task" has neither a command nor a dependsOn-property. The task will be ignored. Associated definition:
{
    "type": "shell",
    "id": "shell,c:\\amiga-gcc\\bin\\make.exe,all,-j4,DEBUG=1,",
    "problemMatcher": [
        "$gcc",
        "$unknown"
    ],
    "label": "makefile: Makefile Tools Build Task"
}

The problem matcher "{0}" can not be resolved. The matcher will be ignored.

Please advise, what can we do so that we don't see this message in the tasks window. Should we use the task API in a different way or this is a bug in your code base?

The bug report in our repository is https://github.com/microsoft/vscode-makefile-tools/issues/423 and there are many more duplicates that recently were signaled.

meganrogge commented 1 year ago

Is this when using insider's only?

andreeis commented 1 year ago

No, I wasn't using insiders and either the developers in the community using the Makefile Tools extension. Also quite recent, a few weeks. But not sure exactly since when.

meganrogge commented 1 year ago

probably the same as #176496

andreeis commented 1 year ago

@meganrogge , I read the mentioned issue, just want to mention that in our case there is no debugger involved and also the problem matchers are not missing, they are defined in the package.json of our Makefile Tools extension (the one running when we see this error in the Tasks Output window). Do you still need the "info needed" label?

meganrogge commented 1 year ago

Thanks for the info, this does look different. It looks like you pass args to be run but no command. Could you pass make as the command?

{
    "type": "shell",
    "command": "make",
    "id": "shell,c:\\amiga-gcc\\bin\\make.exe,all,-j4,DEBUG=1,",
    "problemMatcher": [
        "$gcc",
        "$unknown"
    ],
    "label": "makefile: Makefile Tools Build Task"
}
Screenshot 2023-03-10 at 1 34 11 PM
andreeis commented 1 year ago

Please look at our source code, where we create the task: make.ts. I am not able to define a command directly into the task. I already define both command and args into the shell execution object that is passed in the task constructor. Please point me to an example that is doing what you suggest but also look at what we are doing in the link I gave. Can you copy paste our fragment around line 345 and write the changes you suggest, how they would look like? I think I understand the "what" but it doesn't look like the APIs support that.

andreeis commented 1 year ago

@meganrogge , ping? Our users keep complaining about this error message in the tasks output window and we still don't know what to fix on our side :). Please advise.

andreeis commented 1 year ago

@meganrogge, I see the "confirmation pending" status label associated to this ticket. Confirmation from VSCode developers or is there something else that we can help with from our side?

meganrogge commented 1 year ago

nothing more from your side, thanks

gcampbell-msft commented 11 months ago

@meganrogge Following up on this issue. Any updates? Thank you very much, looking forward to hearing from you.