Skip to content

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

@egamma

Description

@egamma

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

Metadata

Metadata

Assignees

Labels

polishCleanup and polish issuetasksTask system issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions