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
- 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.
- 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).
- 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.
Problem
turbo.jsondeclares the build outputs as["dist/**", "out/**"], relative to each workspace. Several builds write into another workspace instead: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/vscodeare not restored. After a clean checkout orrm -rf out, a cachedturbo run buildcan report success and leaveapps/vscodewithout the LSP, the notebook renderer or the visual editor bundle.This is presumably why
vscode:prepublishusesturbo run build --force --filter quarto...(added in5fd360d9, "force rebuild for vsce package").--forcedisables the cache for the whole graph, and local dev builds can still produce this failure.Fix options
dist/, and haveapps/vscode's build copy them intoout/andassets/. Then turbo's outputs are accurate, and--forcecan be dropped."outputs": ["../vscode/out/lsp/**"]in anapps/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).cache: false.Note that
apps/vscode/assets/www/editorisn't in anyoutputsat all, so that one isn't cached even conceptually.Found during the dependency-upgrade research.