Cache continuously invalidated with dynamic inputs
Les mainteneurs répondent en général sous 1 jour
@wan9chi y travaille déjà.
Depuis le 21/8/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Describe the bug
given a vite.config.ts that looks roughly like this:
export default defineConfig(({command, mode}) => {
// used by some vite plugin as a temporary directory
const tempDir = `tmp/${mode === "production" ? "prod" : "dev"}`;
return {
run: {
tasks: {
build: {
command: "vp build",
cache: true,
input: [
{auto: true},
`!${tempDir}/**`,
],
output: [
{auto: true},
`!${tempDir}/**`,
],
}
}
},
// rest of vite config
};
});
that is, when run in the production mode the input/output arrays are [{auto: true}, '!tmp/prod/**'], and when run in the development mode the input/output arrays are [{auto: true}, '!tmp/dev/**'].
if you run it the first time with --mode development, it will be a miss and will be properly added to the cache so subsequent runs with --mode development are cache hits.
however, if you then run it with --mode production, it will be a cache miss but it won't get properly added to the cache, so all subsequent calls with --mode production will also be cache misses.
you will get something along the lines of this:
$ pnpm vp run --verbose build --mode development
$ vp build --mode development ○ cache miss: 'vite.config.ts' modified, executing
[...]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vite+ Task Runner • Execution Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Statistics: 1 tasks • 0 cache hits • 1 cache misses
Performance: 0% cache hit rate
Task Details:
────────────────────────────────────────────────
[1] [redacted]#build: $ vp build --mode development ✓
→ Cache miss: 'vite.config.ts' modified
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$ pnpm vp run --verbose build --mode development
$ vp build --mode development ◉ cache hit, replaying
[...]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vite+ Task Runner • Execution Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Statistics: 1 tasks • 1 cache hits • 0 cache misses
Performance: 100% cache hit rate, 13.07s saved in total
Task Details:
────────────────────────────────────────────────
[1] [redacted]#build: $ vp build --mode development ✓
→ Cache hit - output replayed - 13.07s saved
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$ pnpm vp run --verbose build --mode production
$ vp build ○ cache miss: input configuration changed, executing
[...]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vite+ Task Runner • Execution Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Statistics: 1 tasks • 0 cache hits • 1 cache misses
Performance: 0% cache hit rate
Task Details:
────────────────────────────────────────────────
[1] trxma-frontend#build: $ vp build --mode production ✓
→ Not cached: read and wrote 'tmp/prod/[...]'
$ pnpm vp run --verbose build --mode production
$ vp build ○ cache miss: input configuration changed, executing
[...]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vite+ Task Runner • Execution Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Statistics: 1 tasks • 0 cache hits • 1 cache misses
Performance: 0% cache hit rate
Task Details:
────────────────────────────────────────────────
[1] trxma-frontend#build: $ vp build --mode production ✓
→ Not cached: read and wrote 'tmp/prod/[...]'
(I am prefixing shell commands I ran with $, so to distinguish it from when $ was printed to the console, I added two spaces in front of it)
I have not provided a reproduction sample at the moment (I am aware that I checked the box at the bottom), I just want to report this before I forget. I'm going to make a reproduction sample later.
Reproduction
See above
Steps to reproduce
Will be provided when I make a reproduction sample
System Info
`vp env current`: cannot run, see: https://github.com/voidzero-dev/vite-plus/issues/2515
$ pnpm vp --version
VITE+ - The Unified Toolchain for the Web
vp v0.2.9
Local vite-plus:
vite-plus v0.2.9
Tools:
vite v8.2.1
rolldown v1.2.3
vitest v4.1.10
oxfmt v0.62.0
oxlint v1.77.0
oxlint-tsgolint v7.0.2001
tsdown v0.22.14
Used Package Manager
pnpm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- Langage dominant
- Rust
- Étoiles
- 6.5k
- Forks
- 296
- Merge moyen
- 1 j 13 h
- PR mergées (30 j)
- 232
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de voidzero-dev/vite-plus
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterPeut-être pris @kshanxs l’a pris aujourd’hui. Ouvertedocumentation
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
voidzero-dev/vite-plus#3219 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
pending triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
voidzero-dev/vite-plus#2882 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
vp run -r executes each package task twice when the root package has a matching recursive scriptPeut-être pris @wan9chi l’a pris il y a 1 jour. Ouvertepending triage
voidzero-dev/vite-plus#3221 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
pending triage
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
voidzero-dev/vite-plus#3218 ·
Les mainteneurs répondent en général sous 1 jour
-
LSP loads vite.config.ts with the server's cwd as rootPeut-être pris @leaysgur l’a pris il y a 2 jours. Ouvertepending triage
voidzero-dev/vite-plus#3217 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de voidzero-dev/vite-plus
Issues similaires
-
bug easy good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
lacs-project/sysknife#659 ·
Les mainteneurs répondent en général sous 2 jours
-
E_FIT_INPUT_MISSING (mixture overrides): the message says ferx-r bundles lack mixture_overridesOuverteP3
Difficulté 1/5 Moins d'une heure Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 1 jour
-
Document multi-value claims with rowBoundaries operator:in (and their per-record application)Ouvertedocumentation
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
registrystack/registry-stack#2431 ·
Les mainteneurs répondent en général sous 1 jour
-
contribution
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
farion1231/cc-switch#8863 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour