microsoft / microsoft/TypeScript
[tsserver] Make "configure excludes" warning more debuggable
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
🔍 Search Terms
To enable project-wide JavaScript/TypeScript language features
exclude large folders
configure excludes
✅ Viability Checklist
- 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 isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
⭐ 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
.jsfiles only?.tsfiles? 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.logto 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
- 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?)
- What shortcomings exist with current approaches?
- What workarounds are you using in the meantime?
Random guesses + git bisect.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die VSCode-Warnung „Configure excludes“ zu reproduzieren und die referenzierten Einträge in tsserver.log zu untersuchen, einschließlich largeFileReferenced und Non TS file size exceeded limit. Ermittle, welche Informationen Benutzer benötigen, um die Ursache zu identifizieren, und überprüfe anschließend, ob die Warnung, die Log-Ausgabe oder der Hilfeartikel die Untersuchung umsetzbar macht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, vscode
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100