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

vscode 1.44 breaks "recent tasks" for tasks generated by my extension #95971

Closed
doudou opened this issue Apr 23, 2020 · 10 comments
Closed

vscode 1.44 breaks "recent tasks" for tasks generated by my extension #95971

doudou opened this issue Apr 23, 2020 · 10 comments
Assignees
Labels
polish Cleanup and polish issue tasks Task system issues
Milestone

Comments

@doudou
Copy link
Contributor

doudou commented Apr 23, 2020

  • VSCode Version: 1.44.2
  • OS Version: Ubuntu 19.04

Steps to Reproduce:

  1. Run a task generated by my extension https://github.com/rock-core/vscode-rock
  2. Try to re-run it from the "recent tasks" list
  3. Nothing happens

The same task under "Show all tasks" do work.

One thing that might help understanding the issue on your side: the tasks don't show up under the provider's submenu, only in the "Show all tasks" entry. The task source field do match the provider name.

@alexr00
Copy link
Member

alexr00 commented Apr 24, 2020

I am not familiar with rock, can you provide a simple project I can open where there will be rock tasks?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Apr 24, 2020
@doudou
Copy link
Contributor Author

doudou commented Apr 24, 2020

Will do.

@doudou
Copy link
Contributor Author

doudou commented Apr 24, 2020

Same process than with #95814

Assuming an Ubuntu install, you'd need to run the script from this gist in an empty folder. It needs to install a bunch of things ruby-related.

Then, add the base/cmake folder in a VSCode instance where the Rock extension is installed.

Unfortunately there doesn't seem to be a way to disable all extensions while still letting the user re-enable some, so I can't check if the problem comes from a bad interaction between the rock extension and another.

vscode-minimal-buildconf

@alexr00
Copy link
Member

alexr00 commented Apr 27, 2020

Thank you for the repro!
The problem is that you register a task provider here that says it will provide tasks of type autoproj.
Then here, you provide tasks with a different type. I will add some kind of error so that extension developers know that they shouldn't really be doing this.
I think I can also add a work around so that it does still work.

@alexr00
Copy link
Member

alexr00 commented Apr 27, 2020

There is not a good work around. I will only add the warning.

@alexr00 alexr00 added polish Cleanup and polish issue tasks Task system issues and removed info-needed Issue requires more information from poster labels Apr 27, 2020
@alexr00 alexr00 added this to the April 2020 milestone Apr 27, 2020
alexr00 added a commit that referenced this issue Apr 27, 2020
@doudou
Copy link
Contributor Author

doudou commented Apr 27, 2020

More than fair ... thanks for the help.

In any case, can I register the same provider object for different types ? Or do I have to create two ?

@alexr00
Copy link
Member

alexr00 commented Apr 27, 2020

Yes, you can have the same provider object for different types.

@alexr00 alexr00 closed this as completed Apr 27, 2020
@doudou
Copy link
Contributor Author

doudou commented Apr 27, 2020

A suggestion: amending this documentation to explicitely link the 'type' from TaskDefinition with the type from registerTaskProvider (and vice-versa, probably)

doudou added a commit to rock-core/vscode-rock that referenced this issue Apr 27, 2020
symptom are tasks in the Recent list that don't work, and
the per-provider presentation of tasks that does not work either.

See microsoft/vscode#95971
@doudou
Copy link
Contributor Author

doudou commented Apr 27, 2020

Yes, you can have the same provider object for different types.

Tasks end up being duplicate (I don't see a parameter in resolveTask that would allow to discriminate which tasks it should return, and it will become rather ugly ... I've split into two providers).

image

leilapearson pushed a commit to relmify/vscode that referenced this issue Apr 27, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
polish Cleanup and polish issue tasks Task system issues
Projects
None yet
Development

No branches or pull requests

2 participants