PowerShell / PowerShell/PowerShellEditorServices

Add task provider APIs

Ouverte
#542 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Area-Tasks Issue-Enhancement Up for Grabs
Langage dominant
C#
Étoiles
767
Forks
266
Merge moyen
3 j 16 h
PR mergées (30 j)
1

Description

VS Code 1.14 includes a new task provider concept which allows extensions to dynamcially register tasks that show up in the "Tasks: Run Task" menu. I think this would be really useful for the following scenarios:

  • Generating tasks from psake or Invoke-Build scripts (@nightroman)
  • Generating tasks for Pester tests if any are detected in the project
  • Generating tasks for PSGallery operations (publish, etc)

However, I think that generating tasks from build scripts is probably what people would be doing 99% of the time.

@nightroman, I'd love to work with you to get Invoke-Build hooked up with this for the next PowerShell extension update. Here's what I'm thinking:

  • Editor Services will provide new cmdlets for registering "editor tasks" with a syntax like this:

    Register-EditorTask -Name "Build" -Source "Invoke-Build" -Command "Invoke-Build .\build.ps1 Build"

  • Invoke-Build will provide a new command (very similar to New-VSCodeTask.ps1) which will check for the existence of Register-EditorTask (or PSES being loaded) and then register all available tasks in the editor using the aforementioned command

  • The user will create a workspace profile which will invoke your command on their build script so that the build tasks are auto-registered when they load the project in VS Code.

How does that sound? Can you see any problems with this approach? Any better ideas?

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par lire la documentation liée de VS Code 1.14 sur task provider ainsi que l’approche existante avec New-VSCodeTask.ps1 mentionnée dans l’issue. La proposition fait également référence à Register-EditorTask et à workspace profiles, mais aucun fichier d’implémentation ni test n’est identifié. Pour considérer le travail comme terminé, il faudrait convenir d’une API et définir un plan d’implémentation concret pour enregistrer des tâches à partir de scripts de build et d’autres providers.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
powershell, vscode
Domaine
api, developer-experience, tooling
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.