Skip to content

Set impliedNodeFormat based on redirectedReference options - #60039

Closed
Andrew Branch (andrewbranch) wants to merge 19 commits into
microsoft:mainfrom
andrewbranch:bug/57553
Closed

Set impliedNodeFormat based on redirectedReference options#60039
Andrew Branch (andrewbranch) wants to merge 19 commits into
microsoft:mainfrom
andrewbranch:bug/57553

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

Fixes#57553

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) test it

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 23, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Andrew Branch (@andrewbranch), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Andrew Branch (@andrewbranch) Here are the results of running the user tests with tsc comparing main and refs/pull/60039/merge:

Everything looks good!

@andrewbranch
Andrew Branch (andrewbranch) marked this pull request as draft September 23, 2024 23:18
@typescript-bot

Copy link
Copy Markdown
Contributor

Andrew Branch (@andrewbranch)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15362,153~~~p=1.000 n=6
Types50,24250,242~~~p=1.000 n=6
Memory used194,850k (± 0.97%)192,487k (± 0.07%)~192,367k192,751kp=0.128 n=6
Parse Time1.57s (± 0.48%)1.57s (± 0.52%)~1.56s1.58sp=0.306 n=6
Bind Time0.86s (± 1.27%)0.86s (± 1.04%)~0.85s0.87sp=1.000 n=6
Check Time11.35s (± 0.31%)11.38s (± 0.54%)~11.28s11.45sp=0.226 n=6
Emit Time3.24s (± 0.98%)3.22s (± 0.95%)~3.17s3.24sp=0.280 n=6
Total Time17.02s (± 0.38%)17.03s (± 0.52%)~16.87s17.11sp=0.810 n=6
angular-1 - node (v18.15.0, x64)
Errors77~~~p=1.000 n=6
Symbols945,734945,734~~~p=1.000 n=6
Types410,049410,049~~~p=1.000 n=6
Memory used1,222,792k (± 0.00%)1,222,786k (± 0.00%)~1,222,730k1,222,824kp=0.748 n=6
Parse Time6.67s (± 0.27%)6.64s (± 0.37%)~6.61s6.67sp=0.120 n=6
Bind Time1.86s (± 0.40%)1.86s (± 0.40%)~1.85s1.87sp=1.000 n=6
Check Time31.25s (± 0.44%)31.26s (± 0.41%)~31.12s31.47sp=0.810 n=6
Emit Time15.02s (± 0.40%)15.06s (± 0.30%)~14.98s15.11sp=0.228 n=6
Total Time54.79s (± 0.27%)54.83s (± 0.25%)~54.68s55.07sp=0.419 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,521,5132,521,513~~~p=1.000 n=6
Types936,002936,002~~~p=1.000 n=6
Memory used2,351,490k (± 0.00%)2,351,526k (± 0.00%)~2,351,421k2,351,569kp=0.066 n=6
Parse Time9.28s (± 0.34%)9.29s (± 0.23%)~9.26s9.31sp=0.567 n=6
Bind Time2.13s (± 0.49%)2.13s (± 0.46%)~2.12s2.14sp=0.315 n=6
Check Time73.53s (± 0.64%)73.63s (± 0.23%)~73.44s73.88sp=0.810 n=6
Emit Time0.28s (± 1.47%)0.28s (± 1.47%)~0.27s0.28sp=1.000 n=6
Total Time85.22s (± 0.58%)85.32s (± 0.18%)~85.14s85.55sp=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,246,9331,246,934+1 (+ 0.00%)~~p=0.001 n=6
Types264,605264,605~~~p=1.000 n=6
Memory used2,399,827k (± 0.04%)2,399,584k (± 0.02%)~2,398,990k2,399,941kp=0.810 n=6
Parse Time5.04s (± 1.01%)5.10s (± 0.68%)~5.06s5.15sp=0.092 n=6
Bind Time1.91s (± 0.61%)1.91s (± 0.63%)~1.89s1.92sp=0.933 n=6
Check Time34.86s (± 0.14%)34.81s (± 0.30%)~34.69s34.99sp=0.148 n=6
Emit Time3.03s (± 4.84%)3.23s (± 5.20%)🔻+0.21s (+ 6.88%)3.02s3.42sp=0.037 n=6
Total Time44.86s (± 0.31%)45.06s (± 0.18%)+0.20s (+ 0.44%)44.96s45.18sp=0.045 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,246,9331,246,934+1 (+ 0.00%)~~p=0.001 n=6
Types264,605264,605~~~p=1.000 n=6
Memory used2,474,586k (± 0.02%)2,474,130k (± 0.02%)~2,473,691k2,474,898kp=0.128 n=6
Parse Time5.26s (± 0.37%)5.28s (± 1.45%)~5.18s5.37sp=0.423 n=6
Bind Time1.72s (± 1.20%)1.73s (± 0.99%)~1.70s1.75sp=0.216 n=6
Check Time35.34s (± 0.33%)35.24s (± 0.27%)~35.14s35.40sp=0.149 n=6
Emit Time2.99s (± 1.03%)3.08s (± 5.16%)~2.94s3.35sp=0.574 n=6
Total Time45.34s (± 0.18%)45.33s (± 0.39%)~45.07s45.57sp=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols260,157260,158+1 (+ 0.00%)~~p=0.001 n=6
Types106,293106,293~~~p=1.000 n=6
Memory used436,080k (± 0.03%)435,980k (± 0.02%)~435,901k436,108kp=0.378 n=6
Parse Time3.45s (± 0.85%)3.44s (± 0.66%)~3.42s3.48sp=0.746 n=6
Bind Time1.29s (± 1.24%)1.30s (± 0.42%)~1.30s1.31sp=0.055 n=6
Check Time18.12s (± 0.31%)18.14s (± 0.35%)~18.07s18.26sp=0.520 n=6
Emit Time1.52s (± 0.99%)1.52s (± 1.40%)~1.49s1.54sp=0.413 n=6
Total Time24.37s (± 0.25%)24.41s (± 0.13%)~24.36s24.46sp=0.226 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors6868~~~p=1.000 n=6
Symbols225,018225,018~~~p=1.000 n=6
Types94,24994,249~~~p=1.000 n=6
Memory used370,282k (± 0.02%)370,303k (± 0.02%)~370,199k370,397kp=0.689 n=6
Parse Time3.44s (± 1.21%)3.44s (± 0.81%)~3.40s3.47sp=1.000 n=6
Bind Time1.94s (± 1.97%)1.93s (± 2.02%)~1.87s1.99sp=0.518 n=6
Check Time19.49s (± 0.29%)19.49s (± 0.54%)~19.38s19.62sp=1.000 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.88s (± 0.43%)24.86s (± 0.60%)~24.66s25.05sp=0.629 n=6
vscode - node (v18.15.0, x64)
Errors11~~~p=1.000 n=6
Symbols3,094,4983,094,498~~~p=1.000 n=6
Types1,066,7391,066,739~~~p=1.000 n=6
Memory used3,192,396k (± 0.00%)3,192,389k (± 0.00%)~3,192,355k3,192,447kp=0.630 n=6
Parse Time13.92s (± 0.25%)13.97s (± 0.40%)~13.89s14.02sp=0.168 n=6
Bind Time4.42s (± 2.20%)4.36s (± 0.28%)~4.34s4.37sp=0.360 n=6
Check Time82.44s (± 0.46%)82.15s (± 0.40%)~81.72s82.67sp=0.128 n=6
Emit Time22.38s (± 0.35%)22.49s (± 0.94%)~22.28s22.87sp=0.575 n=6
Total Time123.17s (± 0.26%)122.97s (± 0.30%)~122.54s123.49sp=0.378 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols277,129277,129~~~p=1.000 n=6
Types113,106113,106~~~p=1.000 n=6
Memory used426,977k (± 0.01%)426,996k (± 0.02%)~426,936k427,104kp=1.000 n=6
Parse Time3.95s (± 0.37%)3.93s (± 0.30%)~3.91s3.94sp=0.079 n=6
Bind Time1.72s (± 1.13%)1.72s (± 0.44%)~1.71s1.73sp=0.396 n=6
Check Time17.53s (± 0.35%)17.54s (± 0.20%)~17.48s17.58sp=0.747 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time23.20s (± 0.28%)23.20s (± 0.13%)~23.14s23.23sp=0.872 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols539,981539,981~~~p=1.000 n=6
Types181,270181,270~~~p=1.000 n=6
Memory used483,418k (± 0.02%)483,397k (± 0.01%)~483,358k483,439kp=0.521 n=6
Parse Time3.21s (± 0.58%)3.23s (± 0.51%)~3.21s3.25sp=0.462 n=6
Bind Time1.16s (± 0.85%)1.16s (± 1.09%)~1.14s1.18sp=0.801 n=6
Check Time18.63s (± 0.27%)18.62s (± 0.26%)~18.54s18.67sp=0.628 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time23.01s (± 0.29%)23.00s (± 0.25%)~22.93s23.07sp=0.687 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Andrew Branch (@andrewbranch) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60039/merge:

Everything looks good!

@Andarist

Copy link
Copy Markdown
Contributor

I have a strong suspicion that redirected references and impliedNodeFormat are behind crashes like this one. In the cal.com's case, we can bisect the crash to #59479 but those kind of crashes were present way before that PR.

I'm still trying to reduce that repro case but I figured out it might be an interesting info to you. I have confirmed that this PR doesn't fix that issue right now.

Comment threadsrc/compiler/program.ts
Comment threadsrc/compiler/program.ts Outdated
@andrewbranch

Andrew Branch (andrewbranch) commented Sep 24, 2024

Copy link
Copy Markdown
MemberAuthor

I think our strategy here is going to have to change significantly. The fix in this PR as it stands breaks the scenario tested in 100f939. We can’t actually skip setting impliedNodeFormat on source files in any case; we can only choose how to interpret the value there.

@sheetalkamat

Copy link
Copy Markdown
Member

I feel like this value should be in program instead of on sourceFile because sourceFiles are shared across programs. Eg thats what we did for module resolution as it causes issues otherwise. Otherwise sourceFile with given options "OptionsAffectingSourceFile" need to handle these cases and then it starts depending on ModuleResolution options again? (we removed that dependency)

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

That’s one option I thought about. moduleResolution is already correctly marked as affecting source files. Unfortunately, impliedNodeFormat is public on SourceFile. But internally, most if not all accesses happen through Program now, so I think we could just always set impliedNodeFormat on source files and let the Program-based accesses decide whether to return anything.

@Andarist

Copy link
Copy Markdown
Contributor

I can confirm that this now fixes #60029 (comment) . I'm still working on creating a test based on that crash though.

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) test it

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 24, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
test top400✅ Started👀 Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Andrew Branch (@andrewbranch), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Andrew Branch (@andrewbranch) Here are the results of running the user tests with tsc comparing main and refs/pull/60039/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure Daniel Rosenwasser (@DanielRosenwasser) and Ryan Cavanaugh (@RyanCavanaugh) are aware of the changes, just as a heads up.

@typescript-bot

Copy link
Copy Markdown
Contributor

Andrew Branch (@andrewbranch)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,34062,340~~~p=1.000 n=6
Types50,37850,378~~~p=1.000 n=6
Memory used194,485k (± 1.00%)194,026k (± 0.94%)~192,698k196,426kp=0.575 n=6
Parse Time1.30s (± 1.52%)1.30s (± 0.97%)~1.29s1.32sp=0.934 n=6
Bind Time0.71s0.71s (± 0.57%)~0.71s0.72sp=0.405 n=6
Check Time9.49s (± 0.37%)9.54s (± 0.26%)+0.04s (+ 0.46%)9.50s9.57sp=0.044 n=6
Emit Time2.72s (± 0.49%)2.73s (± 0.52%)~2.71s2.75sp=0.180 n=6
Total Time14.22s (± 0.31%)14.28s (± 0.28%)+0.06s (+ 0.45%)14.22s14.34sp=0.030 n=6
angular-1 - node (v18.15.0, x64)
Errors77~~~p=1.000 n=6
Symbols947,102947,100-2 (- 0.00%)~~p=0.001 n=6
Types410,738410,736-2 (- 0.00%)~~p=0.001 n=6
Memory used1,224,022k (± 0.00%)1,226,017k (± 0.00%)+1,995k (+ 0.16%)1,225,985k1,226,081kp=0.005 n=6
Parse Time6.59s (± 0.41%)6.71s (± 0.33%)+0.12s (+ 1.77%)6.69s6.75sp=0.005 n=6
Bind Time1.87s (± 0.22%)1.86s (± 0.28%)~1.86s1.87sp=0.112 n=6
Check Time31.41s (± 0.36%)31.39s (± 0.65%)~31.12s31.59sp=1.000 n=6
Emit Time15.04s (± 0.48%)15.42s (± 0.43%)+0.38s (+ 2.53%)15.31s15.50sp=0.005 n=6
Total Time54.91s (± 0.31%)55.38s (± 0.34%)+0.47s (+ 0.86%)55.09s55.61sp=0.008 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,521,6512,524,911+3,260 (+ 0.13%)~~p=0.001 n=6
Types936,037939,429+3,392 (+ 0.36%)~~p=0.001 n=6
Memory used2,351,711k (± 0.00%)2,451,724k (± 0.00%)🔻+100,014k (+ 4.25%)2,451,612k2,451,780kp=0.005 n=6
Parse Time9.28s (± 0.16%)9.60s (± 0.27%)+0.32s (+ 3.45%)9.56s9.64sp=0.005 n=6
Bind Time2.13s (± 0.38%)2.14s (± 0.38%)~2.13s2.15sp=0.666 n=6
Check Time73.47s (± 0.49%)74.43s (± 0.77%)+0.96s (+ 1.30%)73.59s75.13sp=0.013 n=6
Emit Time0.28s0.28s (± 2.26%)~0.27s0.29sp=1.000 n=6
Total Time85.17s (± 0.43%)86.45s (± 0.65%)+1.28s (+ 1.50%)85.59s87.10sp=0.010 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,250,0561,250,052-4 (- 0.00%)~~p=0.001 n=6
Types264,970264,969-1 (- 0.00%)~~p=0.001 n=6
Memory used2,404,460k (± 0.01%)2,404,510k (± 0.01%)~2,404,182k2,404,942kp=0.810 n=6
Parse Time5.13s (± 0.81%)5.16s (± 0.36%)~5.13s5.18sp=0.199 n=6
Bind Time1.91s (± 0.72%)1.91s (± 0.51%)~1.90s1.92sp=0.677 n=6
Check Time34.93s (± 0.22%)34.98s (± 0.25%)~34.87s35.09sp=0.423 n=6
Emit Time2.97s (± 1.32%)2.99s (± 0.98%)~2.96s3.03sp=0.748 n=6
Total Time44.95s (± 0.27%)45.06s (± 0.20%)~44.91s45.15sp=0.128 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,250,0561,250,052-4 (- 0.00%)~~p=0.001 n=6
Types264,970264,969-1 (- 0.00%)~~p=0.001 n=6
Memory used2,479,136k (± 0.02%)2,479,235k (± 0.03%)~2,478,452k2,480,713kp=0.936 n=6
Parse Time6.34s (± 0.93%)6.34s (± 0.38%)~6.31s6.38sp=0.688 n=6
Bind Time2.06s (± 0.53%)2.06s (± 0.86%)~2.03s2.08sp=0.454 n=6
Check Time41.59s (± 0.19%)41.86s (± 0.65%)~41.57s42.23sp=0.066 n=6
Emit Time3.80s (± 5.51%)3.55s (± 2.30%)~3.41s3.62sp=0.109 n=6
Total Time53.83s (± 0.35%)53.83s (± 0.60%)~53.47s54.26sp=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols260,936260,932-4 (- 0.00%)~~p=0.001 n=6
Types106,385106,384-1 (- 0.00%)~~p=0.001 n=6
Memory used436,643k (± 0.03%)436,625k (± 0.03%)~436,496k436,844kp=0.470 n=6
Parse Time3.45s (± 0.68%)3.44s (± 0.98%)~3.40s3.49sp=0.571 n=6
Bind Time1.31s (± 0.64%)1.30s (± 0.49%)~1.29s1.31sp=0.226 n=6
Check Time18.23s (± 0.25%)18.14s (± 0.49%)~18.04s18.26sp=0.108 n=6
Emit Time1.53s (± 1.06%)1.52s (± 1.73%)~1.48s1.56sp=0.212 n=6
Total Time24.51s (± 0.21%)24.41s (± 0.42%)~24.28s24.55sp=0.065 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors6868~~~p=1.000 n=6
Symbols225,916225,916~~~p=1.000 n=6
Types94,41494,414~~~p=1.000 n=6
Memory used370,906k (± 0.01%)371,019k (± 0.01%)+113k (+ 0.03%)370,942k371,087kp=0.008 n=6
Parse Time2.77s (± 0.82%)2.79s (± 0.77%)~2.76s2.81sp=0.258 n=6
Bind Time1.57s (± 1.48%)1.56s (± 0.66%)~1.55s1.58sp=0.162 n=6
Check Time15.79s (± 0.23%)15.85s (± 0.40%)+0.06s (+ 0.37%)15.80s15.94sp=0.044 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.14s (± 0.31%)20.21s (± 0.22%)~20.16s20.26sp=0.053 n=6
vscode - node (v18.15.0, x64)
Errors11~~~p=1.000 n=6
Symbols3,099,7523,099,796+44 (+ 0.00%)~~p=0.001 n=6
Types1,068,9651,068,870-95 (- 0.01%)~~p=0.001 n=6
Memory used3,196,791k (± 0.00%)3,201,832k (± 0.00%)+5,040k (+ 0.16%)3,201,774k3,201,888kp=0.005 n=6
Parse Time13.90s (± 0.36%)14.13s (± 0.41%)+0.23s (+ 1.68%)14.04s14.20sp=0.005 n=6
Bind Time4.34s (± 0.24%)4.36s (± 1.93%)~4.31s4.53sp=0.617 n=6
Check Time81.85s (± 0.18%)81.97s (± 0.37%)~81.57s82.31sp=0.688 n=6
Emit Time22.34s (± 0.31%)23.27s (± 0.43%)🔻+0.94s (+ 4.19%)23.17s23.45sp=0.005 n=6
Total Time122.43s (± 0.17%)123.73s (± 0.18%)+1.31s (+ 1.07%)123.37s123.94sp=0.005 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols278,920278,920~~~p=1.000 n=6
Types113,837113,837~~~p=1.000 n=6
Memory used428,434k (± 0.01%)428,845k (± 0.02%)+411k (+ 0.10%)428,740k428,961kp=0.005 n=6
Parse Time4.89s (± 0.38%)4.92s (± 0.59%)~4.89s4.97sp=0.075 n=6
Bind Time2.13s (± 0.65%)2.15s (± 0.38%)+0.03s (+ 1.33%)2.14s2.16sp=0.011 n=6
Check Time21.89s (± 0.46%)21.91s (± 0.33%)~21.84s22.02sp=0.573 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time28.91s (± 0.40%)28.99s (± 0.30%)~28.89s29.14sp=0.230 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols540,027540,027~~~p=1.000 n=6
Types181,292181,292~~~p=1.000 n=6
Memory used483,541k (± 0.01%)483,566k (± 0.01%)~483,518k483,621kp=0.471 n=6
Parse Time4.01s (± 0.34%)4.01s (± 0.32%)~4.00s4.03sp=0.510 n=6
Bind Time1.43s (± 0.72%)1.42s (± 0.72%)~1.41s1.44sp=0.134 n=6
Check Time22.89s (± 0.32%)22.88s (± 0.15%)~22.84s22.94sp=1.000 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time28.33s (± 0.21%)28.31s (± 0.15%)~28.26s28.39sp=0.685 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

Pretty sure what I have works, though moving the storage to Program would be more efficient, though also a public API break... I don’t think I’ll have time to get this into 5.7 as I’ll be out on vacation starting tomorrow and returning past the beta deadline.

Comment threadsrc/compiler/program.ts
|| fileExtensionIsOneOf(sourceFile.fileName, [Extension.Cjs, Extension.Cts]))
ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext
|| fileExtensionIsOneOf(sourceFile.fileName, [Extension.Cts, Extension.Dcts, Extension.Cjs, Extension.Mts, Extension.Dmts, Extension.Mjs])
|| pathContainsNodeModules(sourceFile.fileName)

This comment was marked as duplicate.

@typescript-bot

Copy link
Copy Markdown
Contributor

Andrew Branch (@andrewbranch) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60039/merge:

Something interesting changed - please have a look.

Details

blakeblackshear/frigate

web/tsconfig.json

openai-translator/openai-translator

tsconfig.json

@Andarist

Copy link
Copy Markdown
Contributor

It took me a while to reduce this 🥵 but here's a test case for the crash I mentioned in my previous comments here: andrewbranch#3

…e-format-and-document-registry
Add extra test case for a weird situation with symlinks and potential `impliedNodeFormat` clash
@Andarist

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) could you build this one? :) a user would like to test effect of this PR on the VS Code crashes they experience: #60243 (comment)

@jakebailey

Jake Bailey (jakebailey) commented Dec 3, 2024

Copy link
Copy Markdown
Member

Unfortunately not, as the PR has merge conflicts.

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

Hey Andrew Branch (@andrewbranch), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/164262/artifacts?artifactName=tgz&fileId=5C36B3AB96C551B2F152060199F6CA1288F88DF0A9038EE0C59713D67D1C98DE02&fileName=/typescript-5.8.0-insiders.20241203.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.8.0-pr-60039-24".;

@github-project-automationgithub-project-automationBot moved this from Not started to Done in PR BacklogDec 10, 2025
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Jun 10, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Milestone BugPRs that fix a bug with a specific milestone

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Incorrect resolution of CJS types from dual-package dependency in multi-project build with mixed ESNext/Bundler and NodeNext modules

5 participants

@andrewbranch@typescript-bot@Andarist@sheetalkamat@jakebailey