Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Turbo: lsp/markdownit/editor builds write outside declared outputs, so cache hits don't restore them

Aperta
#1,144 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript, vite

Direzione di ricerca

Start with turbo.json and the build entry points in apps/lsp/build.ts, apps/vscode-markdownit/vite.config.ts, and apps/vscode-editor/vite.config.ts. Review deps-upgrade-turbo.md and the vscode:prepublish command to understand the current Turbo constraints. Done means a clean checkout and cached turbo run build restore the LSP, markdown renderer, and editor outputs without relying on --force.

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

Descrizione

Problem

turbo.json declares the build outputs as ["dist/**", "out/**"], relative to each workspace. Several builds write into another workspace instead:

Workspace Writes to
apps/lsp (build.ts) apps/vscode/out/lsp/ (lsp.js, wasm, resources)
apps/vscode-markdownit (vite.config.ts) apps/vscode/out/markdownit/
apps/vscode-editor (vite.config.ts) apps/vscode/assets/www/editor/

Turbo only caches and restores declared outputs inside the task's own package, so on a cache hit for these tasks the files in apps/vscode are not restored. After a clean checkout or rm -rf out, a cached turbo run build can report success and leave apps/vscode without the LSP, the notebook renderer or the visual editor bundle.

This is presumably why vscode:prepublish uses turbo run build --force --filter quarto... (added in 5fd360d9, "force rebuild for vsce package"). --force disables the cache for the whole graph, and local dev builds can still produce this failure.

Fix options

  1. Preferred: have each workspace build into its own dist/, and have apps/vscode's build copy them into out/ and assets/. Then turbo's outputs are accurate, and --force can be dropped.
  2. Or declare per-package outputs with a path relative to the package (e.g. "outputs": ["../vscode/out/lsp/**"] in an apps/lsp/turbo.json). Turbo 1.x has limited support for outputs outside the package, so check this against Turbo 2, which the upgrade plan moves to anyway (deps-upgrade-turbo.md).
  3. Or mark these tasks cache: false.

Note that apps/vscode/assets/www/editor isn't in any outputs at all, so that one isn't cached even conceptually.

Found during the dependency-upgrade research.

Lingua principale
TypeScript
Stelle
652
Fork
64
Merge medio
8h 45m
PR unite (30g)
36

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 quarto-dev/quarto

Tutte le issue di quarto-dev/quarto

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.