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

Running multiple cmd tasks in tasks.json seem too mutually excluce themselves #16373

Closed
UncleFirefox opened this issue Dec 2, 2016 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) *question Issue represents a question, should be posted to StackOverflow (VS Code) tasks Task system issues

Comments

@UncleFirefox
Copy link

UncleFirefox commented Dec 2, 2016

Hi, I'm creating a build task to run tsc to get compilation errors and tslint to see the warnings I've got defined for project. I just can run one task at a time, if I put isBuildCommand to more than one task only the first seems to be executed.

Note: I also have TSLint extension by egamma

  • VSCode Version: 1.7.2
  • OS Version: Windows 10

Steps to Reproduce:

  1. Use the following tasks.json:
{
    "version": "0.1.0",
    "command": "cmd",
    "isShellCommand": true,
    "showOutput": "always",
    "args": [
        "/C"
    ],
    "tasks": [
        {
            "taskName": "Build Type Script",
            "suppressTaskName": true,
            "isBuildCommand": true,
            "args": [
                "tsc -p ."
            ],
            "problemMatcher": "$tsc"
        },
        {
            "taskName": "tslint",
            "suppressTaskName": true,
            "isBuildCommand": true,
            "args": [
                "tslint src/**/*.ts{,x} test/**/*.ts{,x} --project tsconfig.json"
            ],
            "problemMatcher": {
                "owner": "tslint",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "severity": "warning",
                "pattern": {
                    "regexp": "^(\\S.*)\\[(\\d+), (\\d+)\\]:\\s+(.*)",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "message": 4
                }
            }
        }
    ]
}
  1. Do ctrl+shift+b

  2. Depending on the order of the tasks I just see errors (tsc) or warning (tslint)

Is this a bug or it's just the way it works for now?

@plievone
Copy link

plievone commented Dec 2, 2016

You may be able to run multiple commands in parallel depending on your shell and os, for example by using &!. So my workaround was to launch a single watching build task such as npm run dev which calls npm run dev:client &! npm run dev:server and it works nicely.

@UncleFirefox
Copy link
Author

UncleFirefox commented Dec 2, 2016

Thanks for the suggestion, I just saw you could specify multiple paths with tslint instead of && I updated the json I'm using. My problem is that using "isBuildCommand":true I just can run one of the tasks not both :(

@chrmarti chrmarti added *question Issue represents a question, should be posted to StackOverflow (VS Code) tasks Task system issues labels Dec 2, 2016
@isidorn isidorn assigned dbaeumer and unassigned isidorn Dec 4, 2016
@dbaeumer
Copy link
Member

dbaeumer commented Dec 5, 2016

@UncleFirefox this is a know limitation right now. You can only run one command at a time hence only one tasks is started if you press Ctrl+Shift+B.

@dbaeumer
Copy link
Member

dbaeumer commented Dec 5, 2016

Dups #981 & #1167.

@dbaeumer dbaeumer closed this as completed Dec 5, 2016
@dbaeumer dbaeumer added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 5, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) *question Issue represents a question, should be posted to StackOverflow (VS Code) tasks Task system issues
Projects
None yet
Development

No branches or pull requests

5 participants