Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

AngularCompiler marks not related files as affected in incremental build

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

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu với bản tái hiện tối thiểu trên branch affected-type-repro và kiểm tra packages/ngtools/webpack/src/ivy/plugin.ts quanh dòng 569, sau đó theo dõi cách quá trình biên dịch tăng dần của compiler-cli xác định affectedFiles cho main.ts, m1.ts, m2.ts và src/lib/types.ts. Hoàn thành khi việc thay đổi console.log(1) thành console.log(2) không còn bao gồm types.ts trong affectedFiles.

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

Mô tả

area: @ngtools/webpack freq1: low severity4: memory/performance type: bug/fix
Which @angular/* package(s) are the source of the bug?

compiler-cli

Is this a regression?

No

Description

Any change in main.ts/m1.ts/m2.ts eg changing console.log(1) to console.log(2) will cause src/lib/types.ts to be included in affectedFiles (checked here https://github.com/angular/angular-cli/blob/master/packages/ngtools/webpack/src/ivy/plugin.ts#L569)

Looks like type only file is not included in ignoreForEmit Set nor included in emitted files so IncrementalCompilation can't find it previously emitted files and marks it as affected every time

Please provide a link to a minimal reproduction of the bug

https://github.com/SebastianPodgajny/ng42543/tree/affected-type-repro

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in
Angular CLI: 12.2.1
Node: 14.16.1
Package Manager: yarn 1.21.1
OS: darwin x64

Angular: 12.2.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.1
@angular-devkit/build-angular   12.2.1
@angular-devkit/core            12.2.1
@angular-devkit/schematics      12.2.1
@schematics/angular             12.2.1
rxjs                            6.6.7
typescript                      4.3.5
Anything else?

This is followup to this issue https://github.com/angular/angular/issues/42543 which was partially resolved by JoostK PR https://github.com/angular/angular/pull/42759

Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
17 giờ 25 phút
Pull request đã merge (30 ngày)
183

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.

Issue khác của angular/angular-cli

Tất cả issue của angular/angular-cli

Issue tương tự

Thêm issue về TypeScript

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.