-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
change properties for runTask
to match ITaskIdentifier
#155635
Comments
refs #154854 |
from #155350 Are you asking to change the arg to |
Please don't spread panic and use bold and capitalized words. Also, don't use hypothetical statistics. Regarding your issue, the properties of your arguments you passed to the function are wrong. The property is |
@igorskyflyer, are you the VSCode dev? What was the goal of this issue? |
Your code depends on an undocumented implementation detail of this command. Now it standardizes and properly exposes its arguments, which is different from the old format. |
Yes, this code has been working since 2017. Do you know in which version of VSCode API it was standardized? |
Supported args are both of those work for me |
Didn't work for me. Works well with any VSCode version from 2016 to 1.69.2 (including). When did you rename |
@meganrogge, where did you find that API? I've just checked the TaskDefinition: /**
* A structure that defines a task kind in the system.
* The value must be JSON-stringifyable.
*/
export interface TaskDefinition {
/**
* The task definition describing the task provided by an extension.
* Usually a task provider defines more properties to identify
* a task. They need to be defined in the package.json of the
* extension under the 'taskDefinitions' extension point. The npm
* task definition for example looks like this
* ```typescript
* interface NpmTaskDefinition extends TaskDefinition {
* script: string;
* }
* ```
*
* Note that type identifier starting with a '$' are reserved for internal
* usages and shouldn't be used by extensions.
*/
readonly type: string;
/**
* Additional attributes of a concrete task definition.
*/
[name: string]: any;
} The API has not been changed since the @dbaeumer defined it. See #29855 |
This is not an API change. It's just arguments that can be provided to the command |
Described here vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts Lines 374 to 418 in 1a73ce6
|
@dbaeumer, what are your thoughts here? Now we have 2 interfaces for “task” entity/definition. What is the benefit to maintain 2 of them and make things complex? I even don’t say that existing extensions are broken with v1.70. |
No, see the scheme for the latest stable 1.69 and "the old way": @meganrogge, @Tyriar, could you reopen this issue and implement it? Thanks in advance. schema: {
anyOf: [
{
type: 'string',
description: nls.localize('runTask.label', "The task's label or a term to filter by")
},
{
type: 'object',
properties: {
type: {
type: 'string',
description: nls.localize('runTask.type', "The contributed task type")
},
task: {
type: 'string',
description: nls.localize('runTask.taskName', "The task's label or a term to filter by")
}
}
},
{
type: 'object',
properties: {
type: {
type: 'string',
description: nls.localize('runTask.type', "The contributed task type")
},
taskName: {
type: 'string',
description: nls.localize('runTask.taskName', "The task's label or a term to filter by")
}
}
}
]
} |
are you requesting that the old schema did not have a |
Sorry, I don't want to disturb people anymore in this thread. We will refactor our codebase to the legacy form But! Being on the API side, I don't like introducing a new task definition. If you want to rename "undocumented"
Yes, it was my typo, sorry. We got |
@alexr00 do you have context for what Dirk did here or an opinion about this? |
It looks like the run task command used to support taking an vscode/src/vs/workbench/contrib/tasks/common/tasks.ts Lines 472 to 475 in e4ed3e0
Now, the run task command doesn't support taking an Details about how
vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts Lines 2657 to 2661 in 2f5b562
vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts Lines 3058 to 3066 in 2f5b562
|
workbench.action.tasks.runTask
is broken for >2,000,000 developers?runTask
to match ITaskIdentifier
Thanks, @meganrogge, and @alexr00, for keeping compatibility with existing extensions 🙏 |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: