vp run -r executes each package task twice when the root package has a matching recursive script
Maintainer thường phản hồi trong vòng 1 ngày
@wan9chi đang làm issue này rồi.
Từ ngày 24/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
vp run -r <task> selects every package in the workspace including the workspace-root package. When the root package's package.json defines a same-named script that itself calls vp run -r <task> (the documented monorepo pattern), that script is expanded inline and schedules a second copy of every package's task in the same run — so each package's task runs twice concurrently.
Reproduction
// package.json (workspace root)
{
"name": "workhub",
"workspaces": { "packages": ["apps/*", "packages/*"] },
"scripts": { "test": "vp run -r test" }
}
vp run -r test
Observed with vite-plus 1.2.0:
vp runsummary reports ~2× the expected task count (e.g.25 tasksfor 12 packages).vp run --last-detailslists the same task id twice, e.g.@workhub/shared#testappears as two separate entries in one run.- Command echoes (
~/packages/shared$ vp test run) andRUN v5.0.4banners appear twice per package, started within ~2s of each other → the two executions run concurrently, not sequentially.
Why it is harmful
- Doubled wall time for
typecheck/lint/teston everyvp run -r. - Any task that is not safe to run twice concurrently in the same directory breaks. Our
apps/apistory tests create a temporary probe file at a fixed path and lint it; the two concurrentvp test runprocesses raced on the filename (existsSyncguard threw "already exists"), which is how we noticed — it failed our deploy pipeline. --concurrency-limitdoes not help: both copies are in the same task graph.
Expected behavior
One of:
-rdoes not select the workspace-root package'spackage.jsonscripts, or- when a selected script expands to
vp runinvocations, the expanded task specs are deduplicated against already-scheduled tasks in the same run.
Workaround
Select packages explicitly, excluding root:
vp run -F './apps/*' -F './packages/*' test # each package runs exactly once
Note -F and -r cannot be combined (--filter and --recursive cannot be used together), and {apps,packages}/* brace globs do not match — two -F flags are needed.
Environment
vite-plus 1.2.0, bun workspaces (apps/*, packages/*), Node 22, macOS arm64 and GitHub Actions ubuntu-latest (same behavior on both).
- Ngôn ngữ chính
- Rust
- Star
- 6.5k
- Fork
- 296
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 229
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-plus
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterCó thể đã có người làm @kshanxs đã nhận 1 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
voidzero-dev/vite-plus#3219 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-plus#3218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
LSP loads vite.config.ts with the server's cwd as rootCó thể đã có người làm @leaysgur đã nhận 2 ngày trước. Đang mởpending triage
voidzero-dev/vite-plus#3217 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vp migrate doesn't flag esbuild-specific config (minify: "esbuild") — migrated project fails to build on Vite 8Có thể đã có người làm @john-okeefe đã nhận 4 ngày trước. Đang mởcontribution welcome
voidzero-dev/vite-plus#3176 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
C-bug needs-triage O-UEFI T-libs
Độ 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
-
bug priority: P3 ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
shep-pm/shep-kelpie#1332 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ramensoftware/windhawk#1156 · 2 bình luận ·
-
area/cli complexity:trivial good first issue Stellar Wave test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Externalize-Labs/externalize#23 ·
Maintainer thường phản hồi trong vòng 1 ngày