`dependsOn` object form cannot reach a task behind a package that lacks it; the query can
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- build-system, cli
调研方向
Start with task-query.md and the UserDependsOnEntry::Package behavior in vite-task b11dbb9. Reproduce the difference between vp run app#build and vp run -t app#generate on the shown package graph, then trace how skip-intermediate reconnection is implemented. Done means the selected approach reaches transitive generate tasks without duplicate execution and has coverage for packages that lack the task.
由索引模型根据 Issue 内容生成。
描述
Problem
{ task, from } selects direct dependencies only, and the docs say recursion comes from each dependency task declaring its own entry. That chain breaks at any package that does not define the task, and every task must have a command, so a source-only package cannot relay.
app ──> ui (no generate) ──> icons (has generate)
app#build: dependsOn: [{ task: 'generate', from: 'dependencies' }]
vp run app#build on a clean checkout never runs icons#generate. vp run -t app#generate does, because the query bridges ui (skip-intermediate reconnection, task-query.md). The two mechanisms disagree about the same package graph.
Why it matters
In a monorepo whose packages are consumed as source, the only per-package preparation is code generation, and only some packages have it (25 of 121 for us). Every consumer task (test, lint, build) needs "generate in everything I transitively depend on". That is a cross-name dependency, so the query cannot express it (-t test would run test everywhere), and nested vp run -t generate is not deduplicated (#323). Today we name far-away producers by hand in a consumer that does not depend on them, keep a hand-written list of every producer for the workspace type build, and run vp run -r generate as a CI pre-pass.
Ask (either)
{ task: 'generate', from: 'dependencies', transitive: true }: materialize edges to the task across transitive dependencies throughfrom, bridging packages that lack it, which is the skip-intermediate reconnection the query already implements.task-query.mdargues against stored topological edges because package selection is per query; an explicit entry does not vary per query, so that argument does not apply.- Allow a task with
dependsOnand nocommand, so a source-only package can relay. This is Turborepo's documented Transit Nodes pattern (a task that "doesn't do anything because it doesn't match a script in anypackage.json"). Without it we needcommand: 'true'in about 100 packages.
Option 1 is the better end state: no relay tasks at all.
Versions: vite-plus 0.3.3; read against vite-task b11dbb9 (UserDependsOnEntry::Package is documented "Direct package dependency selection entry").
- 主要语言
- Rust
- 星标
- 466
- 派生
- 42
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 30
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-task 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 78/100
voidzero-dev/vite-task#719 ·
-
难度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#717 ·
-
难度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#700 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 78/100
voidzero-dev/vite-task#699 ·
-
难度 4/5 3-5 天 新手友好度 65/100
voidzero-dev/vite-task#692 ·
查看 voidzero-dev/vite-task 的全部 Issue
相似的 Issue
-
bug CLI custom-model
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
难度 2/5 1-3 小时 新手友好度 75/100