Please report about circular dependencies of standalone components on "build" step
- Ngôn ngữ chính
- TypeScript
- Star
- 101k
- Fork
- 27.5k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 288
Mô tả
### Which @angular/* package(s) are relevant/related to the feature request?
compiler
### Description
If standalone component A imports standalone component B, and B imports A, then `ReferenceError: Cannot access 'A' before initialization` will be raised.
But it will be only raised in runtime 🤷♂️
### Proposed solution
Please do not allow to compile components with circular dependencies.
### Alternatives considered
Or, allow circular dependencies 😜
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ việc @angular/compiler xử lý standalone-component imports trong bước build, sử dụng kịch bản import vòng tròn A/B đã được báo cáo làm bản tái hiện. Hoàn tất khi compiler báo cáo các dependency vòng tròn trong quá trình build thay vì cho phép ReferenceError lúc runtime, hoặc khi phương án thay thế được yêu cầu trong issue được xử lý một cách rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- compilers
- 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