Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Existence probes of pnpm-workspace.yaml become content inputs, so any manifest edit misses every task

Offen
#860 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust, vite, yaml

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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:

  1. A workspace with three packages, each with a vite.config.ts and a test task, and a root pnpm-workspace.yaml with packages: [packages/*] and a catalog: block.
  2. vp run -r test twice. The second run is all cache hits.
  3. Add an unused line to the catalog, for example left-pad: 1.3.0, and run vp run -r test again. 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.

Vorherrschende Sprache
Rust
Sterne
478
Forks
48
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
72

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus voidzero-dev/vite-task

Alle Issues in voidzero-dev/vite-task

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.