microsoft / microsoft/TypeScript

Add '--bail' option when running '--build' mode

Aperta
#29,938 12 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Awaiting More Feedback Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

Search Terms

project references, bail, cascade, errors

Suggestion

When building multiple Typescript projects using the --build flag, and the projects had dependencies on each other, an error in an upstream project can cause a cascade of errors from downstream projects that obscure the original error.

A possible solution would be a --bail option (or however you'd like to name it). When provided in --build mode, it would prevent all projects downstream from a project with an error from building. While this may hide downstream errors that are only found when re-running, it will prevent "false-positive" errors from being shown.

Use Cases

Using --build mode on a large web of project references, without the possibility of being flooded with spurious errors due to one upstream typo.

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla gestione della riga di comando TypeScript per --build e traccia il modo in cui i riferimenti ai progetti vengono compilati nell’ordine delle dipendenze. Riproduci la cascata con più progetti referenziati e un errore in un progetto a monte, quindi determina come un’opzione --bail dovrebbe arrestare le build successive. Il lavoro è completato quando l’opzione funziona in modalità --build senza modificare il comportamento esistente quando è assente.

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

Valutazione

Stack tecnologico
typescript
Ambito
build-system, cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.