microsoft / microsoft/TypeScript
Gradually "warm up" shape calculation in incremental scenarios
@sheetalkamat y travaille déjà.
Depuis le 1/5/2021.
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 2 j 4 h
- PR mergées (30 j)
- 132
Description
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.tsoutput as the shape; otherwise, use the.jsoutput - if a module gets changed often enough and it's using
.jsto determine shape, we switch to using its.d.tsoutput to determine shape
Originally posted by @DanielRosenwasser in https://github.com/microsoft/TypeScript/issues/41219#issuecomment-829703912
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.