microsoft / microsoft/TypeScript

Gradually "warm up" shape calculation in incremental scenarios

Abierto
#43,912 0 comentarios 1 reacción 1 asignado Ver en GitHub

@sheetalkamat ya está trabajando en esto.

Desde el 1/5/2021.

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

Descripción

Background

In incremental scenarios, we need to understand the "shape" of a module to determine whether its dependencies also need to be checked; however, declaration files are expensive to generate. In cases where --declaration isn't on, it can be wasteful to spend time on that.

Proposal

In some cases, it can be cheaper just to assume that a change to a module should trigger a re-check of its transitive dependencies - so we could consider the JavaScript output (or maybe even just the TypeScript input) to determine the initial shape, and then "graduate" to using the declaration files if they're referenced often enough.

  • figure out the set of dependent modules. If the set of dependencies is "large", then use the .d.ts output as the shape; otherwise, use the .js output
  • if a module gets changed often enough and it's using .js to determine shape, we switch to using its .d.ts output to determine shape

Originally posted by @DanielRosenwasser in https://github.com/microsoft/TypeScript/issues/41219#issuecomment-829703912

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.

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.