microsoft / microsoft/TypeScript
Build hangs with no diagnostics
@gabritto arbeitet bereits daran.
Seit 06.4.2023.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
I have been incrementally implementing my inferred-types repo for a couple years. I basically just put in cool TS tricks when I find them. Ultimately this repo has a LOT of types and they are highly useful to me but for that past two months I have been in TS hell.
First in the 4.x TS versions I ran into issues where the repo would crash with no reference to my code in the stack trace. I raised an issue and was happy to see it was fixed in the 5.x branch very quickly. Sadly it was only a few hours before I was without diagnostics again. This time the problem wasn't a crash but rather that tsc would just hang. I decided to first make sure that all my linting errors/warning were removed and then I followed that with a visual inspection of the extensive type tests I have in the repo to try and spot errors. At this point I have done everything I know how to do, all tests appear to pass (both runtime and type tests). There are no linting warnings or errors in src or test and yet when I run either of:
tsc -b -f -diagnosticstsc --noEmit --diagnostics
it just hangs (although potentially a red herring ... it's worth that as I've been bumping around in the dark and re-trying to run these commands ... occasionally it completes and the results are typically useful though it appears to pick up many false positives WRT to errors).
Versions:
typescript: 5.0.3
node: 16.18.23
OS: macOS Ventura 13.2.1
As touched on above, this started becoming an issue for me in the late versions of TS 4.x but has continued into TS 5.x. For what it's worth, I am DYING to get this fixed as my backlog is now crazy. I'm very happy to create a top quality video on my lessons learned when I get there. Any links which might also help me monitor and optimize performance would be super useful too. For instance:
- I have no idea of how to expect the "TS cost" for statically importing a small set of types from a large library. Is the cost only associated to those types imported?
- Is there a way to incrementally compiling sections of TS and then linking them together at the end?
- I am looking through this content on Performance and hope to find some techniques to improve the efficiency of my types but really any good resources would be a real help.
Please keep and fill in the line that best applies:
-->
- This is a not a "crash" but tsc hangs (which is maybe even worse)
- This is the behavior in every version post 4.x and all 5.x versions
⏯ Playground Link
I'd love to be able to illustrate this in the playground but I have no idea how I'd do this (it's likely not possible). Fortunately it is very easy to reproduce with my repo:
I use pnpm as a package manager so you'll be able to do a full reproduction with:
pnpm installpnpm diagnostics
💻 Code
no idea as I am getting zero diagnostics from tsc
🙁 Actual behavior
running tsc never completes. No error messages, no warning messages, just silence.
🙂 Expected behavior
I'd be happy to get an error or warning that might help point me to what area of my code is causing problems. I do sort of suspect now that it might just be scale not a particular error but I'm just shooting in the dark.
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.
Bewertung
Dieses Issue wurde noch nicht bewertet.