voidzero-dev / voidzero-dev/vite-plus

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

Abierto
#1,610 2 comentarios 0 reacciones 1 asignado Reclamado por @semimikoh Ver en GitHub
bug
Lenguaje dominante
Rust
Estrellas
5.8k
Forks
262
Merge medio
23 h 41 min
PR fusionados (30 d)
138

Descripción

### 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).

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.