microsoft / microsoft/TypeScript
Gradually "warm up" shape calculation in incremental scenarios
@sheetalkamat đang làm issue này rồi.
Từ ngày 1/5/2021.
- 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ả
Background
In incremental scenarios, we need to understand the "shape" of a module to determine whether its dependencies also need to be checked; however, declaration files are expensive to generate. In cases where --declaration isn't on, it can be wasteful to spend time on that.
Proposal
In some cases, it can be cheaper just to assume that a change to a module should trigger a re-check of its transitive dependencies - so we could consider the JavaScript output (or maybe even just the TypeScript input) to determine the initial shape, and then "graduate" to using the declaration files if they're referenced often enough.
- figure out the set of dependent modules. If the set of dependencies is "large", then use the
.d.tsoutput as the shape; otherwise, use the.jsoutput - if a module gets changed often enough and it's using
.jsto determine shape, we switch to using its.d.tsoutput to determine shape
Originally posted by @DanielRosenwasser in https://github.com/microsoft/TypeScript/issues/41219#issuecomment-829703912
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.