Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`dependsOn` object form cannot reach a task behind a package that lacks it; the query can

未关闭
#738 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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)

  1. { task: 'generate', from: 'dependencies', transitive: true }: materialize edges to the task across transitive dependencies through from, bridging packages that lack it, which is the skip-intermediate reconnection the query already implements. task-query.md argues against stored topological edges because package selection is per query; an explicit entry does not vary per query, so that argument does not apply.
  2. Allow a task with dependsOn and no command, 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 any package.json"). Without it we need command: '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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

voidzero-dev/vite-task 的其他 Issue

查看 voidzero-dev/vite-task 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。