PowerShell / PowerShell/PowerShellEditorServices

Add task provider APIs

Đang mở
#542 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Area-Tasks Issue-Enhancement Up for Grabs
Ngôn ngữ chính
C#
Star
767
Fork
266
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách đọc tài liệu task provider của VS Code 1.14 được liên kết và cách tiếp cận New-VSCodeTask.ps1 hiện có được đề cập trong issue. Đề xuất cũng tham chiếu đến Register-EditorTask và workspace profiles, nhưng chưa xác định tệp triển khai hoặc test nào. Để được xem là hoàn tất, cần có một API đã được thống nhất và một kế hoạch triển khai cụ thể để đăng ký task từ các build script và các provider khác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
powershell, vscode
Lĩnh vực
api, developer-experience, tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.