microsoft / microsoft/TypeScript

Feature request: mode for --build to keep going after a project fails

Abierto
#42,739 0 comentarios 11 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

In Discussion Suggestion
Lenguaje dominante
Go
Estrellas
111k
Forks
14.4k
Merge medio
1 d 19 h
PR fusionados (30 d)
117

Descripción

Suggestion

🔍 Search Terms

build
keep going
bail
fail fast
project references
large monorepo
-b

https://github.com/microsoft/TypeScript/issues/25600
https://github.com/microsoft/TypeScript/issues/32651

✅ Viability 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, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

It would be nice if there was a way to configure TypeScript --build to try to keep building projects after encountering an error anyway, so that it will continue to build all of the projects regardless of any errors, so more errors in more projects could be seen at one time.

📃 Motivating Example

I work in a fairly large monorepo where we have set up project references for all of our projects. We currently have about 80,000 TypeScript files spread out amongst ~1,000 projects. The project dependency graph is fairly tight, with many of these projects sharing many upstream projects as dependencies.

One pain point we've encountered is when making a change to a project that many other projects depend on (or when updating TypeScript or a widely-used package or @types package) is that:

a) A complete TypeScript --build takes a lot of time to run.
b) Our TypeScript --build stops after finding the first set of failures.

This combination makes the feedback loop really slow and painful as we repeatedly have to run the slow build in order to uncover all of the issues to fix or add @ts-expect-error comments.

💻 Use Cases

  • Making changes to types in projects that cause errors in many other projects
  • Updating TypeScript versions
  • Updating packages

Currently, any of these tasks requires slow feedback loops that can make the work drag on for hours since only a handful of projects can be fixed at a time. We are currently doing this by fixing the few projects that TypeScript shows us errors for, and then starting the build again, waiting for it to get farther, and repeating until the build fully passes.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

No se especifican archivos ni tests. Empieza rastreando la implementación de --build de TypeScript y la planificación de referencias de proyectos; después, determina cómo debería gestionar un modo keep-going los proyectos fallidos y sus dependientes. Se considera terminado cuando la opción sigue compilando los proyectos aptos después de los fallos y notifica los errores de toda la compilación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
build-system, cli
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.