Skip to content

vp run with multiple packages blocks on first task instead of running in parallel #258

@munaibh

Description

@munaibh

Context

Cannot run dev tasks in parallel, mentioned here https://discord.com/channels/1475973262193459293/1479410337223802951/1483156173212487791.

When running vp run --filter <pkg-a> --filter <pkg-b> dev (or equivalent multi-filter syntax), the expectation is that both tasks run in parallel. However, because `vp run``executes tasks in dependency order sequentially, a long-running/watch task in the first package never exits so the second package's task never starts.

Reproduction

vp run --filter @acme/package-a --filter @acme/package-b dev
  • Both packages have a dev script (e.g. vp pack --watch)
  • @acme/package-a is a dependency of @acme/package-b

Expected/Actual

Expected

  • Both dev watchers start
  • Output streams in parallel
  • Dependency order is respected for initial build, but does not block long-running tasks

Actual

  • @acme/package-a's watcher starts and runs indefinitely
  • @acme/package-b's watcher never starts
  • vp run waits for the first task to exit before proceeding

Notes

My current "workaround" include using pnpm -r --parallel run dev, npm run dev --workspaces --if-present, or concurrently. This issue appears specific to long-running/watch tasks, as normal build tasks complete and allow the queue to proceed so thats perfect.

A comparison (which I'm coming from and used this feature) is Turborepo. In Turborepo this is handled via persistent tasks, where tasks marked with "persistent": true are treated as long-running, do not block the task graph/execution, and are started in parallel once their dependencies have finished building.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions