voidzero-dev / voidzero-dev/vite-plus

`vp run --filter` reports a cycle on workspaces with `peer-` or `dev-` dep links between siblings

Aperta
#1,610 2 commenti 0 reazioni 1 assegnatario Rivendicata da @semimikoh Vedi su GitHub
bug
Lingua principale
Rust
Stelle
5.8k
Fork
262
Merge medio
1g 34m
PR unite (30g)
135

Descrizione

### Describe the bug

discovered when playing around in nuxt/nuxt... (I tried to run `vp run --filter './packages/**' prepack` where `nuxt` depends on `@nuxt/vite-builder` and `@nuxt/vite-builder` has `nuxt` as a peer dep...)

the issue seems to be that `vp run --filter` includes `devDependencies` and `peerDependencies` in its dep graph...

(I think pnpm and turbo only follow `dependencies` for build order.)

### Reproduction

https://github.com/danielroe/vp-cycle-repro

### Steps to reproduce

```bash
pnpm install
pnpm --filter './packages/**' build # succeeds in topological order
vp run --filter './packages/**' build # → error: Cycle dependency detected: app#build -> builder#build -> app#build
```

pnpm install warns about the cyclic workspace links but still completes; the build itself runs fine.

### System Info

```shell
vp 0.1.21, pnpm 11.0.9, macOS arm64.
```

### Used Package Manager

pnpm

### Logs

```shell
❯ vp run --filter './packages/**' build
VITE+ - The Unified Toolchain for the Web

error: Cycle dependency detected: app#build -> builder#build -> app#build
```

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Check that there isn't [already an issue](https://github.com/voidzero-dev/vite-plus/issues) for the same bug.
- [x] Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.