microsoft / microsoft/TypeScript

Add '--bail' option when running '--build' mode

Đang mở
#29,938 12 bình luận 2 reaction 0 người được giao Xem trên GitHub

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

Awaiting More Feedback Suggestion
Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

Search Terms

project references, bail, cascade, errors

Suggestion

When building multiple Typescript projects using the --build flag, and the projects had dependencies on each other, an error in an upstream project can cause a cascade of errors from downstream projects that obscure the original error.

A possible solution would be a --bail option (or however you'd like to name it). When provided in --build mode, it would prevent all projects downstream from a project with an error from building. While this may hide downstream errors that are only found when re-running, it will prevent "false-positive" errors from being shown.

Use Cases

Using --build mode on a large web of project references, without the possibility of being flooded with spurious errors due to one upstream typo.

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

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 từ phần xử lý dòng lệnh TypeScript cho --build và theo dõi cách các tham chiếu dự án được build theo thứ tự phụ thuộc. Tái hiện chuỗi lan truyền với nhiều dự án được tham chiếu và một lỗi ở dự án upstream, sau đó xác định cách một tùy chọn --bail nên dừng các build downstream. Công việc được hoàn tất khi tùy chọn này hoạt động trong chế độ --build mà không thay đổi hành vi hiện có khi tùy chọn này không tồn tại.

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

Đánh giá

Công nghệ
typescript
Lĩnh vực
build-system, cli
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/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.