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

Global task properties #24865

Closed
o-lim opened this issue Apr 16, 2017 · 6 comments
Closed

Global task properties #24865

o-lim opened this issue Apr 16, 2017 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality tasks Task system issues
Milestone

Comments

@o-lim
Copy link

o-lim commented Apr 16, 2017

  • VSCode Version: 1.11.x
  • OS Version: Ubuntu 14.04

Several task properties , you would think are global, but are not, such as options and problemMatcher. For example, in the following task.json file, options and problemMatcher are ignored. In order for these properties to work, they must be replicated across all tasks in the task array, which really sucks, especially when you have 5+ tasks, each sharing the same set of problem matchers and options. What makes this even worse, is that you can't reference problem matchers by name, which means you have to type out the entire problem matcher definition, which is like 10+ lines, for each and every task.

{
    "version": "0.1.0",
    "command": "echo",
    "isShellCommand": true,
    "args": [],
    "showOutput": "always",
    "echoCommand": true,
    "suppressTaskName": true,
    "options": {
        "env": {
            "VAR": "xyz"
        }
    },
    "problemMatcher": [{
        ...
    }, {
        ...
    }],
    "tasks": [
        {
            "taskName": "hello",
            "args": ["Hello World"]
        },
        {
            "taskName": "bye",
            "args": ["Good Bye"]
        }
    ]
}
@dbaeumer
Copy link
Member

Global defined options shared between tasks, problem matchers not since they might differ between tasks.

Declaring global problem matchers and referencing them by name later makes sense and should be added.

@dbaeumer dbaeumer added tasks Task system issues feature-request Request for new features or functionality labels Apr 25, 2017
@dbaeumer dbaeumer added this to the On Deck milestone Apr 25, 2017
@o-lim
Copy link
Author

o-lim commented Apr 25, 2017

Shared problem matchers still make sense, because you should be able to override them on a per task level. If not specified in a task, then they should default to the global problem matchers, otherwise the task level problem matchers should take precedence, overriding/replacing any global problem matchers.

@EvilHacker
Copy link

I have the exact same problem.

I have many tasks. Most use the exact same problem matcher.
As is, I have to copy the HUGE problem matcher into each of the tasks.

It would be nice if you could created named problem matchers globally, and then just reference them by name in each tasks.

@annerajb
Copy link

@alexr00 any update on this considering the october 2019 backlog passed almost a year ago?
Does that mean is not being considered anymore?

@alexr00
Copy link
Member

alexr00 commented Aug 18, 2020

Given all the good stuff on our roadmap I just haven't had a chance to get to this issue. Its still on the backlog, which means that its something we'd like to work on at some point. However, there is currently no planned time to do it. Perhaps next time we do an issue grooming iteration I will have a chance to work on it.

@alexr00
Copy link
Member

alexr00 commented Nov 15, 2021

Reusing problem matchers is tracked by #61497

@alexr00 alexr00 closed this as completed Nov 15, 2021
@alexr00 alexr00 added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 15, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2021
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) feature-request Request for new features or functionality tasks Task system issues
Projects
None yet
Development

No branches or pull requests

5 participants