Task cache: no way to exclude a specific env var from env-enumeration fingerprints — inherited OLDPWD thrashes warm hits
Maintainer antworten meist innerhalb von 1 Tag
@wan9chi arbeitet bereits daran.
Seit 11.8.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Summary
When a task's config chain enumerates the environment, cooperative tracking records the enumerated env vars into the task-cache fingerprint — including shell bookkeeping like OLDPWD that has no build meaning. OLDPWD changes with whichever directory the shell cd-ed into the repo from, so an otherwise-identical vp run build warm hit thrashes across shells and entry paths.
Repro sketch
Laravel app built through laravel-vite-plugin (its config chain reads .env and enumerates process.env), driven by vp run build:
vp run --filter ./apps-web/<app> buildtwice — the second run is a full cache hit.- Re-enter the repo from a different parent directory (so the shell exports a different
OLDPWD) and run the same command — cache miss, with the env fingerprint as the only change.
Observed on vite-plus 0.2.2 and unchanged as of 0.2.7 (our pinned version). The v0.2.8 release notes list no related change.
What we tried
We could not find a vp-side config that excludes a specific env var from an enumeration-sourced record: untrackedEnv and negated env patterns (env: ['!OLDPWD']) did not suppress it in our testing (investigated during the same caching work as #1894 / #1774).
Workaround
Our monorepo CLI bootstrap does delete process.env.OLDPWD before spawning any vp subprocess. It works, but it only protects invocations that go through the wrapper — plain vp calls still thrash.
Ask
A first-class way to exclude named env vars from cooperative-tracking fingerprints, the way input globs filter file inputs — e.g. untrackedEnv: ['OLDPWD'] (or env: ['!OLDPWD']) applying to enumeration-sourced records, not just direct reads. A reasonable complement would be default-excluding well-known shell bookkeeping vars (OLDPWD, _, SHLVL) that can never carry build meaning.
- Vorherrschende Sprache
- Rust
- Sterne
- 6.5k
- Forks
- 296
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 232
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus voidzero-dev/vite-plus
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterEvtl. vergeben @kshanxs hat das heute übernommen. Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
voidzero-dev/vite-plus#3219 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
pending triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
voidzero-dev/vite-plus#2882 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
vp run -r executes each package task twice when the root package has a matching recursive scriptEvtl. vergeben @wan9chi hat das vor 1 Tag übernommen. Offenpending triage
voidzero-dev/vite-plus#3221 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
pending triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
voidzero-dev/vite-plus#3218 ·
Maintainer antworten meist innerhalb von 1 Tag
-
LSP loads vite.config.ts with the server's cwd as rootEvtl. vergeben @leaysgur hat das vor 2 Tagen übernommen. Offenpending triage
voidzero-dev/vite-plus#3217 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in voidzero-dev/vite-plus
Ähnliche Issues
-
bug easy good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
lacs-project/sysknife#659 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
registrystack/registry-stack#2431 ·
Maintainer antworten meist innerhalb von 1 Tag
-
contribution
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
farion1231/cc-switch#8863 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
DioxusLabs/dioxus#6006 ·
Maintainer antworten meist innerhalb von 1 Tag