Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,144 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript, vite
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
655
Fork
64
Merge trung bình
21 giờ
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/quarto

Tất cả issue của quarto-dev/quarto

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.