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

Invoking 'tasks.fetchTask()' with a type filter fetches all tasks #78179

Closed
egamma opened this issue Jul 30, 2019 · 2 comments
Closed

Invoking 'tasks.fetchTask()' with a type filter fetches all tasks #78179

egamma opened this issue Jul 30, 2019 · 2 comments
Assignees
Labels
polish Cleanup and polish issue tasks Task system issues
Milestone

Comments

@egamma
Copy link
Member

egamma commented Jul 30, 2019

The Npm Scripts Explorer calls tasks.fetchTask({ type: 'npm' }). This call will also fetch the tasks of type gulp which is expensive. The function should only fetch the tasks from the TaskProvider given as argument.

added
The current implementation has some unpleasant side effects. For example, open the NPM Scripts Explorer in the VS Code workspace. The script explorer fetches the npm tasks, but since the implementation fetches all tasks it will also fetch the gulp tasks. This not only makes the NPM Script explorer's population slow, it also shows an error from the gulp task provider, when opening the NPM Scripts explorer. This is highly unexpected. Even more so since the error message doesn't provide any hint about what went wrong. Clicking the link from the notification result in the output below

image

image

@egamma egamma added the tasks Task system issues label Jul 30, 2019
@alexr00 alexr00 added the feature-request Request for new features or functionality label Jul 30, 2019
@alexr00 alexr00 added this to the On Deck milestone Jul 30, 2019
@egamma
Copy link
Member Author

egamma commented Jul 30, 2019

@alexr00 I've should added some more information about the consequences of the current implementation. I've added more information to the description (see added above).

@alexr00 alexr00 added polish Cleanup and polish issue and removed feature-request Request for new features or functionality labels Jul 31, 2019
@alexr00 alexr00 modified the milestones: On Deck, August 2019 Jul 31, 2019
@alexr00
Copy link
Member

alexr00 commented Aug 6, 2019

This ended up being a nice simple change 😊

@alexr00 alexr00 closed this as completed in 8839c02 Aug 6, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 20, 2019
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