-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
User defined tasks are not revealed when these are executed programmatically #9605
Comments
Hmhh...it looks to me as if in your sample code, you're using an invalid value for the
should not even compile, since it's of type |
@tsmaeder yeah it's not compiling if I use
but the |
this part is to recreate the same json object I got from the one I created by hand. |
@sunix sorry, but I don't see how the example code demonstrates a problem: as far as the API goes, I see "garbage in, garbage out". I think you need to elaborate a bit more. |
@tsmaeder ok I am reworking this |
@sunix maybe it's enough if you just explain what the problem is. |
@tsmaeder I have updated the sample and description. |
@sunix where do you see "Task: Configured tasks ... > Configure new Task > Others"? Is this a menu? Do you open the command palette? Both paths don't lead to anything for me in Theia master. |
I don't see "Configure new task..." when I execute "Configure Task...", just a list of tasks. |
@tsmaeder scroll down |
The problem really seems to be that when you do "vscode.tasks.fetchTasks()", you get back an object that has
in its presentation, when in fact it should be an integer-value enum. |
Methinks the conversion in TasksMainImpl#fetchTasks() is broken: it does not convert the presentation options to the correct type in the TaskDTO. |
Bug Description:
User defined tasks are not revealed when these are executed programmatically.
Steps to Reproduce:
shell
task with theTask: Configured tasks ...
>Configure new Task
>Others
command, keep the default values:vscode.tasks.executeTask the task named 'echo'
, this command will execute the task namedecho
with the api methodvscode.tasks.executeTask(t);
Additional Information
It seems that the task object generated has https://github.com/sunix/vscode-test-task-execution/blob/e03b3fe41c2ce8e9c7a034542a77ad16bc3ea464/src/extension.ts#L28
instead of
(1 is the value for vscode.TaskRevealKind.Always)
There is 2 additional commands that execute a Task object to see the diff:
vscode.tasks.executeTask with presentationOptions: { reveal: 'always' }
withpresentationOptions: { reveal: 'always' }
. This is a copy of what we get when fetching a task created by the user.vscode.tasks.executeTask with presentationOptions: { reveal: 1}
the other withpresentationOptions: { reveal: 1 }
that reveals the task as expected.Environment
The text was updated successfully, but these errors were encountered: