-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Provide Task Runner viewlet #28235
Comments
@Microsoft/vscode please read. Feedback and corrections welcome. |
@Lixire and @aefernandes are currently looking into this I believe. |
Most of this is In response to:
First off, it definitely looks like these sorts of improvements will make tasks more useful and usable. I just wonder if this is the right direction we should be taking:
Technical detailsOn the implementation side, this is definitely technically possible. It will put a permanent halt on moving tasks to an extension, I think that effort has fizzled out anyway though.
I don't think too much of Some alternative ideas:
|
See #28351 for the echo feedback. |
@Tyriar I don't think the idea of having a Task panel competes with your mentioned improvements for Terminal. If there is a UX path where Tasks and Terminal can fit in the same panel, that would also be great. Some reasons why IMHO a Task panel would help:
And what would also be very nice:
|
I would still want us to explore the possibility of a panel for tasks, I think UX scalability as reason to not do it is not very fair, we need to solve the panel overflow no matter what in the same way we solved it for the activity bar (being able to show/hide panels, reorder them, see a "..." overflow menu when space is too little). I do agree though there is some overlap in Debug Console, Integrated Terminal, Output and Tasks, however I am not sure if it would make sense to put them all into one. There is very specific scenarios for each of the panels:
Here is a mockup for the Tasks panel: We can provide an explicit configure action per task which would guide users to configure problem matchers. /cc @stevencl |
@bpasero thanks for the nice mockup. |
Any new ideas wrt task customisation and referencing (contributed) tasks by an id or something else? I think from the API POV that is a thing to tackle. |
Not being an active task user myself, I wonder if the suggested Tasks panel could also show processes run from the Terminal. That could then open a path to offer problem matchers for tools run in the Terminal. |
The mockup omits the problems panel. I wonder whether that could be rolled into the tasks panel to save space?
Hiding it when a debug session hasn't been run would be useful. After a debug session completes, I still want to examine the contents of the console though. |
As I'm not an active task user but I'm also thinking about why I don't use Task too often
Speaking of debug and output panel
Lastly, do you think it make sense to emit output directly terminal instance the same way as Task 2? The only thing you can do in the output panel is view/copypaste/search and all of them are doable in Terminal, the discoverability won't be worse than current Task 2. |
@jrieken the initial description contains what we discussed in terms of how to reference a task (see Task Customization). I haven't started implementing anything. First need to see how feasible that is. Any comments to the proposal in terms of API feedback. |
As a heavy user of the task/debug infrastructure within Visual Studio Code, I felt that it might be worth it to document my observations with the existing system. My development environment is heavily focused on testing which has caused a large number of test executables to be created along side the actual application being developed. Additionally, all code compilation as well as test executable execution happens remotely (Virtual Studio Code running on OS X, where as compilation / test executable happen on a Linux machine). I have found tasks to be very flexible and with the most recent additions to the Insiders Build, building and executing tests with a few keystrokes has really streamlined my development environment. I have been able to augment the tasks I execute today with a simple SSH script used to bridge the gap between Virtual Studio Code and the remote machine where all of the compilation happens. That being said, one thing I have noticed is that I find myself duplicating task and launch configurations to handle the number of executables I deal with on a day-to-day basis. Having both my tasks.json and launch.json filled with upwards of 30+ configurations only differing by the executable is a little cumbersome. Additionally, the test executables themselves take arguments relating to specific filters of which subtests to actually execute (which is very helpful in executables which contain hundreds of tests). This means having to open up and edit my tasks.json any time I want to execute a smaller subset of a test executable. While it is not clear to me what belongs in an extension versus what belongs in the core functionality of the editor, some things I would like to see are:
I understand that some of these items are (and I have solved them via script development) achievable via external scripts, but I see these as problems that numerous developers across all walks of life would run in to and most likely solve in very similar ways. |
We again discussed the tasks.json schema today and came to the following conclusion.
Below is a proposal how this will look in tasks.json {
"version": "2.0.0",
"tasks": [
// This is a custom task not contributed by an extension
{
"type": "custom",
"name": "yeoman",
"command": "yo",
"runtime": "shell",
"group": "build",
"presentation": {
"reveal": "always",
"focus": false,
"panel": "dedicated"
}
},
// This is a configuration of the npm build script task.
{
"type": "npm",
"script": "build",
"configure": {
"problemMatcher": ["$tsc"]
}
},
// P2: This is a npm script task which the extension needs to
// resolve. It will execute the osx and the osx-min
// script
{
"type": "gulp",
"tasks": ["osx", "osx-min"]
}
]
} |
This has a weird title. But here is my Issue with v.2.0.0: If you run a background task, and close the VSCode, the background task is left running. This is quiet annoying. Using VSCode 1.13.1, in Windows 10. Is this feedback issue meant for this kind of feedback? Thanks. |
This is unrelated to my bug above, but I would like to see tasks having own tabs here: If I could see e.g. "build" or "testwatch" as a tab there, it would be more accessible and easier to notice it's running those tasks. The dropdown is too subtle for me, but this is matter of taste. How many tasks people have? I usually have 1 to 5, with this few tasks it would be easier to see them as tabs, than buried in dropdown. P.S. updated the image. Maybe even Output tab can be removed since all output is from some task I gather. |
@Ciantic terminal processes leaking tracked in #26807. See #28235 (comment) for proposal on a tasks tab. |
@nonameolsson the technical features for task 2.0.0 got implemented. However no work has started yet to build a special task UI. However we added proposed API for extensions to query and execute tasks, so that task providers can add special UI (for example npm can contribute actions to the package.json file to directly execute scripts from the explorer). |
@bpasero @nonameolsson both your ideas seems really cool & mandatory to me. I personnally need this feature, and Imo this is critical. |
I like the @nonameolsson GUI, however I would add it that running tasks should be shown as tabs in the panel so that toggling between the outputs is faster. My assumption is that there is very few running tasks and tabs are easy way to distinguish between the running task outputs. Also, I don't like keeping a sidebar open at all times, seeing what the output is about is easy from the tabs alone. |
I had a simple proposal for task discovery- show configured tasks under "Task" menu. #47172 |
I really would like to see some improvements to the task session. However, I'm really used to use the terminal for all that now. And being able to split into two terminals at the same time in VS Code has been a big help for me. With the latest update there is now a NPM explorer, https://code.visualstudio.com/updates/v1_23#_npm-script-running. I think it could be improved, but it is a really good start! |
I will rename the issue since the major item left in the issue discussed is the task runner viewlet / UI. Note that with the new API this might be implementable by an extension (see the npm script runner viewlet) |
🙏 I'd love to see a sidebar like this in VS Code. Currently I forget about Tasks a lot of the time and just end up running them in a separate terminal. It'd be possible to implement as an extension if we had #32352, maybe there are other alternatives as well? (You could probably make your own tasks.json parser but that would only get local tasks, and also that'd be a pretty annoying thing to maintain). |
please give us viewlet |
We did a Task 2.0 deep dive today and this issue collects the combined feedback received.
Task Properties
"terminal.echo": true
instead of"terminal": { "echo": true }
customize
property.Task Picker
The task picker should support a decription / detail message to better explain what the task does. We also discussed whether the task picker should support MRU which would automatically move the most used tasks up to the top without customization. If we provide a task panel (see below) such a MRU list could be useful there as well.
Task Customization
The task customization is currently instance based where the task instance is identified by a task id, which can be quite 'cryptic'. An alternative way would be to identify a task based on a type and a key that is defined by the type and therefore can vary from task runner to task runner. So instead of having something like:
a customization would look like this
where the structure of the identifying attribute is defined by the extension providing the runner support. In the example above the fact that a npm script is identified by the location of the package.json file and the script name comes from the npm extension. This might look different for task contributed by gulp of TypeScript
Problem Matchers
For task that execute a target of a task runner (e.g. gulp, npm, grunt) VS Code can't decide which problem matchers to attach. Since picking the right problem matcher currently requires editing the tasks.json file we should better support the user with this. We discussed the following ideas:
Task panel
It was suggested to run tasks in its own panel instead of reusing the terminal panel. They should still be executed using the terminal to get ANSI control character support and other nice terminal features (e.g. Ctrl+C). The panel could offer additional features like:
We also discussed the need of a task viewlet but decided that this will not add any big additional value over the task picker and a separate panel.
Top Level Menu
We were also discussing whether the tasks deserve a top level menu. In general this was consider a good idea. However such a menu should be semantically not technical. So instead of naming it Tools or Tasks it would be better to offer top level menus like Build, Rebuild All, Clean, Run Tests. The downside of such an approach is that such a menu looks out of place if none of these entries trigger any meaningful action in the workspace (e.g. if a simple JS project is open at lease Build, Rebuild All and Clean don't make any sense)
Better Selfhosting
Would be great if we can improve the self hosting coverage of tasks. This is currently hard to do due to the fact how we build. But @dbaeumer will tweak our tasks.json to support more tasks currently run in the terminal (e.g run tests, linting, ...)
The text was updated successfully, but these errors were encountered: