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

tasks "taskName" is deprecated, should be "label" #1181

Closed
chrisdias opened this issue Sep 25, 2017 · 11 comments
Closed

tasks "taskName" is deprecated, should be "label" #1181

chrisdias opened this issue Sep 25, 2017 · 11 comments
Assignees
Milestone

Comments

@chrisdias
Copy link
Member

the docs for tasks refer to a property called taskName that doesn't exist in IntelliSense:

image

for example, here: https://code.visualstudio.com/docs/editor/tasks#_custom-tasks

it looks like taskName should be renamed identifier in the docs.

@gregvanl
Copy link

gregvanl commented Sep 25, 2017

@chrisdias The default Other task template will fill in the taskName and I see taskName in IntelliSense on both 1.16.1 and Insiders.
taskname

@chrisdias
Copy link
Member Author

//cc @dbaeumer

i don't see this on 1.16 nor in today's insiders. This is what I see in Stable (1.16.1 27492b6):

image

@gregvanl
Copy link

I mispoke above, I meant 1.16.1 (updated comment).

@chrisdias
Copy link
Member Author

How are you invoking the completion list?

@gregvanl
Copy link

Ctrl+space (on Windows). I also see IntelliSense for taskName when I start typing "ta".

@chrisdias
Copy link
Member Author

hmmm... with the object empty, press CTRL+Space, get this:

image

Now, put in quotes:

image

Note, type is not in completion list.

put in type, no error and no completion for it:

image

CTRL+Space after the :

image

open quotes, press CTRL+Space:

image

Now i get a taskName:

image

Change type to npm and I no longer see taskName:

image

@chrisdias
Copy link
Member Author

perhaps npm is a contributed task configuration which doesn't support taskName.

@chrisdias
Copy link
Member Author

a clue...

I uninstalled my npm extension and no different. however, I tried to put in tasnName manually and see this...

image

@chrisdias
Copy link
Member Author

ok, now i see what is going on. type defines the task type, and then what the other valid settings are. So for "type": "shell" you need to have a taskName and a command:

image

The Tasks Output pane gives you a "live" validation session. Here its telling me that I need to have a command or dependsOn property as well:

image

So I think the docs still can be clarified... the way they read right now every task has a taskName, etc. when it is scoped to the type.

@dbaeumer
Copy link
Member

dbaeumer commented Oct 2, 2017

Yes, the shape of a task depends type attribute. For contributed task (e.g. gulp, grunt, npm, ...) the attribute to control the UI is label since taskName was too confusing. It might be mistaken for the name of the gulp task :-)

I have an item to clean this up. E.g. to consistently use label. See microsoft/vscode#29852

@gregvanl gregvanl added this to the October 2017 milestone Oct 5, 2017
@gregvanl gregvanl changed the title tasks docs refer to "taskName", should be "identifier" (?) tasks "taskName" is deprecated, should be "label" Oct 27, 2017
gregvanl pushed a commit that referenced this issue Nov 1, 2017
@gregvanl gregvanl closed this as completed Nov 1, 2017
a1012112796 added a commit to a1012112796/gitea that referenced this issue Mar 16, 2020
because of vscode suggest
ref ISSUE: microsoft/vscode-docs#1181

Signed-off-by: a1012112796 <1012112796@qq.com>
lafriks pushed a commit to go-gitea/gitea that referenced this issue Mar 16, 2020
because of vscode suggest
ref ISSUE: microsoft/vscode-docs#1181

Signed-off-by: a1012112796 <1012112796@qq.com>
@thecriticalpoint
Copy link

I am still so confused. The task.json documentation is written by people for people that already know how to use it. In 2021 I'm still not sure where the best resource and example guide is that I can count on being up to date. Yes, I've been googling. No, my frustration is not at you. The barriers to entry just keep stacking up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants