Existence probes of pnpm-workspace.yaml become content inputs, so any manifest edit misses every task
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- rust, vite, yaml
- Domínio
- build-system, tooling
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 478
- Forks
- 48
- Merge médio
- 1d 5h
- PRs com merge (30d)
- 65
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de voidzero-dev/vite-task
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
voidzero-dev/vite-task#881 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
voidzero-dev/vite-task#879 ·
Mantenedores costumam responder em até 1 dia
-
vp run hangs after a failure when a cancelled task's detached descendant holds its IPC connectionAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
voidzero-dev/vite-task#878 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 28/100
voidzero-dev/vite-task#876 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 68/100
voidzero-dev/vite-task#858 · 1 reação ·
Mantenedores costumam responder em até 1 dia
Todas as issues de voidzero-dev/vite-task
Issues semelhantes
-
checkpoint/verify/rebuild_indexes on a thread holding a WriteTransaction deadlock instead of INT-001Abertabug known-issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
project-minigraf/minigraf#734 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Nimblesite/lspkit#26 ·
Mantenedores costumam responder em até 1 dia