A cache hit drops the symbolic links in a task's outputs
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
- 45/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ệ
- rust
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start with create_output_archive in crates/vt/src/session/cache/archive.rs and walk_glob_files in crates/vt/src/session/execute/glob.rs; the issue describes how both handle symbolic links. Reproduce with the provided task, then check the cache archive and glob behavior for links. Done when a cache hit restores links matched by an output glob; automatic tracking of created links is explicitly left open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Written by an AI agent (Claude) on behalf of @jasonkuhrt.
A cache hit leaves out the symbolic links a task created in its outputs, so the replayed output differs from the one the task produced.
We hit it with Nitro's server build: its dependency tracer (nf3) writes server/node_modules/tslib -> .nf3/[email protected]. After a hit, the link is gone, and the replayed server resolves tslib outside its own output, or not at all.
Repro. A package with this script and task:
// make-link.mjs
import fs from 'node:fs';
fs.mkdirSync('dist/.store/pkg', { recursive: true });
fs.writeFileSync('dist/.store/pkg/index.js', 'export default 42;');
fs.symlinkSync('.store/pkg', 'dist/pkg');
// vite.config.ts
export default defineConfig({
run: {
tasks: {
build: {
command: 'node make-link.mjs',
cache: { output: [{ auto: true }, 'dist/**'] },
},
},
},
});
vp run build, rm -rf dist, vp run build again: the second run is a cache hit, dist/.store/pkg/index.js is back, and dist/pkg is missing.
Causes (at 0346c268):
create_output_archivereads each output withstd::fs::metadata, which follows links, and archives regular files only: a directory link is skipped, and a file link would be stored as a copy of its target.walk_glob_fileskeeps onlyis_file()entries, so anoutputglob never lists a link.- Automatic output tracking never sees a link being created: fspy has no interceptor for
symlink/symlinkat(preload interceptions, and the Linux syscall handler), norCreateSymbolicLinkWon Windows. So even with 1 and 2 fixed,{ auto: true }alone can't list a created link; it takes anoutputglob that matches it.
A fix for 1 and 2 follows in a PR. 3 is left open here.
- Ngôn ngữ chính
- Rust
- Star
- 480
- Fork
- 50
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-task
-
A task output archive larger than the remote cache server's request limit can never be storedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
voidzero-dev/vite-task#888 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
voidzero-dev/vite-task#886 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
voidzero-dev/vite-task#881 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vp run hangs after a failure when a cancelled task's detached descendant holds its IPC connectionĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#878 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-task
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
franciscoBSalgueiro/en-croissant#1061 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
chore good first issue macros spire
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
groupmod -U: members change in /etc/group but not in /etc/gshadowCó thể đã có người làm @jayhemnani9910 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày