Existence probes of pnpm-workspace.yaml become content inputs, so any manifest edit misses every task
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust, vite, yaml
- 领域
- build-system, tooling
调研方向
Start with packages/vite/src/node/server/searchRoot.ts, the Unix access/stat interceptions, and crates/vt/src/session/execute/fingerprint.rs to trace how workspace-root existence checks become content inputs. Reproduce with a small pnpm workspace and repeated vp run -r test executions, then verify the fix distinguishes probe-only existence checks from tasks that read manifest contents. Done means unrelated edits no longer invalidate probe-only tasks, while actual reads and marker creation or deletion still affect caching.
由索引模型根据 Issue 内容生成。
描述
In a pnpm workspace, every task that loads a Vite config records pnpm-workspace.yaml (and lerna.json) in every ancestor directory as a content input. An edit to an unrelated line of pnpm-workspace.yaml, for example a new catalog entry that no package uses, then misses the cache of every task. In our 199-task monorepo one such edit dropped a repeat run to 1 cache hit out of 184 tasks.
The reads come from Vite's searchForWorkspaceRoot (packages/vite/src/node/server/searchRoot.ts), which calls fs.existsSync on those names in each ancestor to find the root. fspy records access and stat as READ (crates/fspy_preload_unix/src/interceptions/access.rs, stat.rs; AccessMode in crates/fspy_shared/src/ipc/mod.rs has only READ, WRITE and READ_DIR), and the fingerprint then hashes the file content (crates/vt/src/session/execute/fingerprint.rs). So a probe that only asks "does this file exist" becomes a dependency on the file's bytes.
Repro with vite-plus 1.3.0:
- A workspace with three packages, each with a
vite.config.tsand atesttask, and a rootpnpm-workspace.yamlwithpackages: [packages/*]and acatalog:block. vp run -r testtwice. The second run is all cache hits.- Add an unused line to the catalog, for example
left-pad: 1.3.0, and runvp run -r testagain. Every task misses with'pnpm-workspace.yaml' modified.
ignoreInput from vite-plus does not fix this correctly. It drops the path for the whole task, so a task whose own code reads the manifest (a catalog lint, for example) would replay a stale result, and creating or deleting a marker file, which can change the workspace root Vite selects, would no longer invalidate anything.
A fix that keeps both properties would record existence probes separately: fingerprint whether the path exists for a probe-only access, and promote the path to a content input when the same task also opens and reads it. stat may need care, because some callers use size or mtime.
- 主要语言
- Rust
- 星标
- 480
- 派生
- 50
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 70
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-task 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
voidzero-dev/vite-task#888 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
voidzero-dev/vite-task#886 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
voidzero-dev/vite-task#884 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 72/100
voidzero-dev/vite-task#881 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#879 ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-task 的全部 Issue
相似的 Issue
-
documentation enhancement SIEM
难度 2/5 1-3 小时 新手友好度 82/100
ADORSYS-GIS/wazuh-agent-status#265 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
manuscript-lang/manuscript#1629 ·
维护者通常 1 天内回复
-
autofixer: follow-up
难度 2/5 1-3 小时 新手友好度 76/100
tursodatabase/turso#10885 ·
维护者通常 1 天内回复
-
🐞 bug
难度 2/5 1-3 小时 新手友好度 75/100
nannou-org/gantz#475 ·
维护者通常 1 天内回复