voidzero-dev / voidzero-dev/vite-plus

Warn for unsupported package manager flags instead of silently ignoring

Aperta
#1,914 1 commento 1 reazione 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
5.8k
Fork
262
Merge medio
1g 34m
PR unite (30g)
135

Descrizione

### Description

`vp pm` is a package manager compatibility layer, since different underlying package managers can have some small differences. It is common to meet cases that there is a `--abc` flag can be passed to Xpm, but not to Ypm.

The current Vite+'s behavior is not united. It sometimes prints a warning (e.g. `--fix-lockfile`, `--offline`, `--latest`) but it also silently ignores some of them (e.g. `--workspace`, `--save-catalog`), which may make users confused.

### Suggested solution

We are supposed to show warnings for these cases instead of silently ignoring, it can help users or agents know how to use the package manager correctly.

As for the implementation, I think checking and writing all of them by hand can be a little bit troublesome. We'd better to find a way to check them unitedly or use Rust's language feature like macro or `Drop` trait to reduce complex works.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start at the `vp pm` package-manager compatibility layer and trace how supported and unsupported flags are handled, comparing existing warnings with flags that are silently ignored. Done means unsupported flags consistently produce warnings without changing the behavior of supported flags; the issue does not identify specific files or tests to run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
cli, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.