microsoft / microsoft/TypeScript

Gradually "warm up" shape calculation in incremental scenarios

Aperta
#43,912 0 commenti 1 reazione 1 assegnatario Vedi su GitHub

@sheetalkamat ci sta già lavorando.

Dal 1/5/2021.

Experimentation Needed In Discussion Rescheduled Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

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

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.