-
Notifications
You must be signed in to change notification settings - Fork 118
Description
Summary
When running vp run <pkg>#build twice in a monorepo with vp pack, the second run is not cached. The task is reported as "not cached because it modified its input."
Reproduction
This was observed in the command-pack-monorepo snap test (see PR #1072). After an initial vp run hello#build, running it again produces:
vp run: hello#build not cached because it modified its input. (Run `vp run --last-details` for full details)
Running vp run --last-details reveals two different causes across runs:
→ Not cached: read and wrote 'packages/hello/dist/index.cjs'
→ Not cached: read and wrote 'node_modules/.vite-temp/vite.config.ts.timestamp-1774171302767-0e1b7c94f16fd.mjs'
Analysis
There appear to be two separate issues causing cache invalidation:
-
Output files in input scope: The build output (
dist/index.cjs) is being tracked as both an input and output of the task, so the task always appears to modify its own input. -
Vite temp config files: Vite writes a temporary config file to
node_modules/.vite-temp/which is also tracked as an input, causing cache invalidation.
Both of these should likely be excluded from the input fingerprint for vp pack builds.
References
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
Effort