feat: enforce the deferred loading constraint
Maintainer thường phản hồi trong vòng 1 ngày
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
- 38/100
Hướng nghiên cứu
Start with the Deferred loading and Enforcing it sections of project_structure.md, then look at how the plugin already reads each app's lib/ imports and pubspec dependencies. The work is two checks: a package-level reachability check over the pubspec graph, and a library-level check over the barrel import graph, both excluding deferred edges. Done means fixtures for one correctly deferred feature and one eagerly imported feature, tests that pass for the first and fail with the eager path named in the error for the second.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
A package an app loads deferred must not also be reachable from the app through a non-deferred import path. If it is, deferring it achieves nothing, and the reference points out that this failure is silent: nothing breaks and no analyzer warning fires (Deferred loading in project_structure.md).
The reference already describes how to enforce it, under Enforcing it: mark the deferred edges in the app's import graph, compute the set of packages reachable without crossing one, and check that no deferred target is in that set.
Requirements
- Find
import ... deferred as ...directives in each app'slib/. - Package-level check: no deferred target is reachable from the app through the pubspec graph without crossing a deferred edge.
- Library-level check at subfeature-barrel granularity, using the library import graph. The reference notes the package-level check only catches the coarse case.
- Error output names the eager path that makes the deferred package reachable.
- Fixtures and tests cover a correctly deferred feature and one pulled in eagerly by another feature.
- All CI/CD checks are passing.
- There is no drop in the test coverage percentage.
Additional Context
Only relevant for web builds and Android deferred components. On an iOS/Android-only app the check has no effect but does no harm.
- Ngôn ngữ chính
- Dart
- Star
- 7
- Fork
- 2
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của VeryGoodOpenSource/vgv-ffca-plugin
-
feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
VeryGoodOpenSource/vgv-ffca-plugin#39 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
VeryGoodOpenSource/vgv-ffca-plugin#28 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
VeryGoodOpenSource/vgv-ffca-plugin#23 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
external dependency feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
VeryGoodOpenSource/vgv-ffca-plugin#6 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của VeryGoodOpenSource/vgv-ffca-plugin
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Vinillian/book_tracker#208 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 2 ngày
-
CI: a superseded Quality run keeps its test shards running and the new head waits behind themĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fdittgen-png/deskilo#3753 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày