microsoft / microsoft/TypeScript

[tsserver] Make "configure excludes" warning more debuggable

Aperta
#59,681 2 commenti 12 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Awaiting More Feedback Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

🔍 Search Terms

To enable project-wide JavaScript/TypeScript language features

exclude large folders

configure excludes

✅ Viability Checklist
⭐ Suggestion

Make "configure excludes" warning more debuggable

Context

In some scenarios, one may get the following warning in VSCode from tsserver, together with "Configure excludes" button in the status bar in bottom-right:

To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.

When this happens, "find references" and other VSCode features do not work.

Problem

This warning is not very debuggable; the burden is on the user to guess possible causes. Maybe they checked in some file(s) recently that trigger it; maybe they did a local build which produced a lot of artifacts which is picked by include but not in exclude list. etc.

In a huge monorepo, finding this out is difficult.

Also it's not clear what is the root cause of this warning:

  • is it about large number of files?
  • is it about large size of files? (individual files size? sum?)
  • is it about .js files only? .ts files? other types?

In my tsserver.log (which is 100k+ lines), I found some largeFileReferenced logs, I fixed those, but it didn't fix the issue. I also found some Non TS file size exceeded limit logs. But in any case it's just my random guesses, not sure if this is linked to the problem.

Solution

  • The warning in VSCode should be more actionable / debuggable. Perhaps it should link to a help article or a GH issue?
  • There should be enough info in tsserver.log to make it debuggable.
  • The help article should explain how to analyze tsserver.log to find relevant info.
📃 Motivating Example

Past discussions where people report the warning but don't provide repro (probably because they don't understand why the issue happens), example: https://github.com/microsoft/TypeScript/issues/53492

💻 Use Cases
  1. What do you want to use this for?

When I get the warning about "configure excludes" I want to know exactly what to look for. Should I look for large files? (define how large?) Should I look for large folders? (define how large?)

  1. What shortcomings exist with current approaches?
  2. What workarounds are you using in the meantime?

Random guesses + git bisect.

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 riproducendo l'avviso di VSCode "Configure excludes" ed esaminando le voci referenziate di tsserver.log, incluse largeFileReferenced e Non TS file size exceeded limit. Determina quali informazioni sono necessarie agli utenti per identificare la causa, quindi verifica che l'avviso, l'output del log o l'articolo della guida rendano l'indagine praticabile.

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

Valutazione

Stack tecnologico
typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.