feat: enforce the deferred loading constraint
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Dart
- 星标
- 7
- 派生
- 2
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
VeryGoodOpenSource/vgv-ffca-plugin 的其他 Issue
-
feature
难度 4/5 3-5 天 新手友好度 54/100
VeryGoodOpenSource/vgv-ffca-plugin#39 ·
维护者通常 1 天内回复
-
feature
难度 4/5 3-5 天 新手友好度 22/100
VeryGoodOpenSource/vgv-ffca-plugin#28 ·
维护者通常 1 天内回复
-
test
难度 3/5 1-2 天 新手友好度 48/100
VeryGoodOpenSource/vgv-ffca-plugin#23 ·
维护者通常 1 天内回复
-
external dependency feature
难度 5/5 一周以上 新手友好度 25/100
VeryGoodOpenSource/vgv-ffca-plugin#6 · 1 条评论 ·
维护者通常 1 天内回复
查看 VeryGoodOpenSource/vgv-ffca-plugin 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
Vinillian/book_tracker#208 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 64/100
-
难度 1/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
fdittgen-png/deskilo#3753 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复