pnpm test can fail at random because the engine's test script rebuilds its dist while the CLI's tests import it

Aperta
#296 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start with packages/cli-engine/package.json, tsdown.config.ts, and turbo.json, then run pnpm test repeatedly to reproduce the intermittent resolution failure. Confirm the CLI test task waits for the engine build and that the engine test run no longer cleans dist/ during parallel tests; pnpm test should complete reliably.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

packages/cli-engine/package.json's test script is pnpm run build && pnpm run typecheck && vitest run, and tsdown.config.ts has clean: true. Under the parallel pnpm test, the engine's test task can delete and rewrite dist/ while the CLI's tests are importing it, which fails with Failed to resolve entry for package "@prisma/cli-engine". In turbo.json, test depends only on ^build. Turbo cache hits hide it most of the time.

The fix the ledger proposed: make the CLI's test task depend on the engine's build, and stop the engine's test script from cleaning dist/ mid-run.

Recorded in the prisma-cli-v8 project ledger, which is being deleted at project close-out: https://github.com/prisma/prisma-cli/blob/4356b361adf7044bae59aa0bc70340eda89fdad6/.drive/projects/prisma-cli-v8/deferred.md#L400

🤖 Generated with Claude Code

Lingua principale
TypeScript
Stelle
25
Fork
4
Merge medio
18h 22m
PR unite (30g)
34

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prisma/prisma-cli

Tutte le issue di prisma/prisma-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.