Skip to content

Revert fix for intersections in template literals, fix differently - #52836

Merged
Jake Bailey (jakebailey) merged 14 commits into
microsoft:mainfrom
jakebailey:fix-52345
Mar 20, 2023
Merged

Revert fix for intersections in template literals, fix differently#52836
Jake Bailey (jakebailey) merged 14 commits into
microsoft:mainfrom
jakebailey:fix-52345

Conversation

@jakebailey

@jakebaileyJake Bailey (jakebailey) commented Feb 18, 2023

Copy link
Copy Markdown
Member

For #52345

This reverts #48044, which with nearly a year more experience no longer looks correct to my eyes (I regret merging it), and instead implements a different fix for the issue. This one instead avoids expanding out intersections, leaving them in place like the other non-string-y types.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 18, 2023
@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite on this PR at bb599af. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the perf test suite on this PR at bb599af. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based top-repos suite on this PR at bb599af. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based top-repos suite (tsserver) on this PR at bb599af. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the tarball bundle task on this PR at bb599af. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the extended test suite on this PR at bb599af. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the parallelized Definitely Typed test suite on this PR at bb599af. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite (tsserver) on this PR at bb599af. You can monitor the build here.

Update: The results are in!

@typescript-bot

This comment was marked as outdated.

@typescript-botTypeScript Bot (typescript-bot) added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 18, 2023
@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing main and refs/pull/52836/merge:

Everything looks good!

1 similar comment
@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing main and refs/pull/52836/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..52836
Metricmain52836DeltaBestWorstp-value
Angular - node (v18.10.0, x64)
Memory used359,387k (± 0.01%)359,394k (± 0.01%)~359,338k359,442kp=0.628 n=6
Parse Time3.50s (± 0.86%)3.49s (± 0.89%)~3.44s3.53sp=0.683 n=6
Bind Time1.17s (± 0.44%)1.17s (± 0.76%)~1.16s1.18sp=0.541 n=6
Check Time8.77s (± 0.62%)8.69s (± 0.45%)-0.08s (- 0.87%)8.63s8.74sp=0.020 n=6
Emit Time7.61s (± 0.92%)7.59s (± 0.37%)~7.56s7.63sp=0.871 n=6
Total Time21.05s (± 0.62%)20.94s (± 0.29%)~20.85s21.02sp=0.106 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used190,827k (± 1.19%)190,855k (± 1.19%)~189,912k195,477kp=0.936 n=6
Parse Time1.48s (± 0.66%)1.48s (± 0.90%)~1.46s1.50sp=0.620 n=6
Bind Time0.79s (± 0.52%)0.79s (± 0.52%)~0.79s0.80sp=1.000 n=6
Check Time9.42s (± 0.88%)9.42s (± 0.22%)~9.40s9.45sp=0.688 n=6
Emit Time2.82s (± 1.62%)2.79s (± 1.12%)~2.76s2.83sp=0.374 n=6
Total Time14.51s (± 0.77%)14.48s (± 0.32%)~14.42s14.54sp=0.470 n=6
Monaco - node (v18.10.0, x64)
Memory used343,979k (± 0.01%)343,986k (± 0.02%)~343,886k344,078kp=0.936 n=6
Parse Time2.62s (± 1.17%)2.62s (± 0.95%)~2.58s2.65sp=0.872 n=6
Bind Time1.03s (± 0.81%)1.03s (± 1.18%)~1.02s1.05sp=0.928 n=6
Check Time7.12s (± 0.44%)7.09s (± 0.37%)~7.06s7.13sp=0.091 n=6
Emit Time4.33s (± 0.35%)4.32s (± 0.54%)~4.29s4.35sp=1.000 n=6
Total Time15.10s (± 0.30%)15.07s (± 0.37%)~14.97s15.12sp=0.628 n=6
TFS - node (v18.10.0, x64)
Memory used300,028k (± 0.00%)300,045k (± 0.01%)~300,027k300,087kp=0.149 n=6
Parse Time2.07s (± 1.48%)2.06s (± 0.78%)~2.04s2.08sp=0.331 n=6
Bind Time1.17s (± 0.44%)1.17s (± 0.35%)~1.16s1.17sp=0.114 n=6
Check Time6.57s (± 0.30%)6.58s (± 0.35%)~6.54s6.60sp=0.325 n=6
Emit Time3.93s (± 0.66%)3.93s (± 0.63%)~3.90s3.97sp=1.000 n=6
Total Time13.75s (± 0.50%)13.74s (± 0.27%)~13.70s13.79sp=0.374 n=6
material-ui - node (v18.10.0, x64)
Memory used476,411k (± 0.01%)476,424k (± 0.01%)~476,362k476,458kp=0.470 n=6
Parse Time3.15s (± 1.09%)3.15s (± 0.79%)~3.10s3.17sp=1.000 n=6
Bind Time0.97s (± 0.42%)0.97s (± 0.65%)~0.96s0.98sp=0.673 n=6
Check Time17.18s (± 0.32%)17.21s (± 0.49%)~17.11s17.33sp=0.872 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time21.30s (± 0.21%)21.32s (± 0.44%)~21.21s21.46sp=0.748 n=6
xstate - node (v18.10.0, x64)
Memory used548,608k (± 0.03%)548,528k (± 0.02%)~548,364k548,693kp=0.471 n=6
Parse Time4.06s (± 0.37%)4.07s (± 0.18%)~4.06s4.08sp=0.060 n=6
Bind Time1.72s (± 1.14%)1.73s (± 1.45%)~1.69s1.75sp=0.505 n=6
Check Time2.81s (± 0.70%)2.82s (± 0.49%)~2.80s2.84sp=0.366 n=6
Emit Time0.08s (± 0.00%)0.08s (± 0.00%)~0.08s0.08sp=1.000 n=6
Total Time8.67s (± 0.33%)8.70s (± 0.16%)~8.68s8.72sp=0.078 n=6
Angular - node (v16.17.1, x64)
Memory used358,760k (± 0.01%)358,747k (± 0.01%)~358,712k358,793kp=0.471 n=6
Parse Time3.72s (± 0.63%)3.71s (± 0.22%)~3.70s3.72sp=0.869 n=6
Bind Time1.22s (± 0.42%)1.23s (± 0.61%)~1.22s1.24sp=0.247 n=6
Check Time9.54s (± 0.49%)9.51s (± 0.40%)~9.46s9.56sp=0.296 n=6
Emit Time8.12s (± 1.35%)8.03s (± 0.72%)~7.98s8.14sp=0.090 n=6
Total Time22.60s (± 0.48%)22.48s (± 0.35%)~22.40s22.63sp=0.065 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used191,518k (± 0.02%)192,651k (± 0.93%)~191,430k195,104kp=0.936 n=6
Parse Time1.57s (± 0.67%)1.56s (± 0.96%)~1.54s1.58sp=0.933 n=6
Bind Time0.84s (± 0.00%)0.84s (± 0.00%)~0.84s0.84sp=1.000 n=6
Check Time10.13s (± 0.44%)10.12s (± 0.63%)~10.02s10.18sp=1.000 n=6
Emit Time3.08s (± 0.96%)3.06s (± 1.02%)~3.03s3.12sp=0.219 n=6
Total Time15.60s (± 0.34%)15.58s (± 0.50%)~15.47s15.66sp=0.630 n=6
Monaco - node (v16.17.1, x64)
Memory used343,256k (± 0.00%)343,265k (± 0.01%)~343,202k343,295kp=0.228 n=6
Parse Time2.80s (± 0.52%)2.80s (± 0.64%)~2.77s2.82sp=1.000 n=6
Bind Time1.11s (± 0.68%)1.11s (± 0.46%)~1.11s1.12sp=0.784 n=6
Check Time7.77s (± 0.22%)7.78s (± 0.36%)~7.75s7.82sp=0.867 n=6
Emit Time4.50s (± 0.57%)4.50s (± 0.76%)~4.45s4.55sp=1.000 n=6
Total Time16.18s (± 0.17%)16.19s (± 0.35%)~16.10s16.25sp=0.469 n=6
TFS - node (v16.17.1, x64)
Memory used299,386k (± 0.01%)299,377k (± 0.01%)~299,356k299,403kp=0.471 n=6
Parse Time2.19s (± 0.53%)2.19s (± 0.85%)~2.16s2.21sp=0.363 n=6
Bind Time1.26s (± 0.65%)1.26s (± 0.60%)~1.25s1.27sp=0.729 n=6
Check Time7.21s (± 0.35%)7.19s (± 0.29%)~7.16s7.21sp=0.193 n=6
Emit Time4.22s (± 0.56%)4.22s (± 0.63%)~4.19s4.26sp=0.935 n=6
Total Time14.87s (± 0.37%)14.86s (± 0.25%)~14.79s14.89sp=1.000 n=6
material-ui - node (v16.17.1, x64)
Memory used475,716k (± 0.01%)475,690k (± 0.00%)~475,682k475,700kp=0.520 n=6
Parse Time3.33s (± 0.31%)3.32s (± 0.36%)~3.31s3.34sp=0.675 n=6
Bind Time1.02s (± 0.50%)1.01s (± 0.54%)-0.01s (- 0.81%)1.01s1.02sp=0.038 n=6
Check Time18.15s (± 0.45%)18.18s (± 0.38%)~18.11s18.27sp=0.689 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time22.50s (± 0.37%)22.53s (± 0.26%)~22.46s22.60sp=0.936 n=6
xstate - node (v16.17.1, x64)
Memory used546,058k (± 0.02%)546,143k (± 0.02%)~545,996k546,243kp=0.173 n=6
Parse Time4.24s (± 0.19%)4.25s (± 0.32%)~4.23s4.27sp=0.133 n=6
Bind Time1.81s (± 0.29%)1.80s (± 0.29%)~1.80s1.81sp=0.311 n=6
Check Time3.07s (± 0.63%)3.07s (± 0.63%)~3.04s3.09sp=1.000 n=6
Emit Time0.09s (± 0.00%)0.09s (± 0.00%)~0.09s0.09sp=1.000 n=6
Total Time9.21s (± 0.20%)9.22s (± 0.22%)~9.19s9.25sp=0.373 n=6
Angular - node (v14.15.1, x64)
Memory used352,281k (± 0.00%)352,277k (± 0.00%)~352,267k352,298kp=0.378 n=6
Parse Time3.71s (± 0.41%)3.71s (± 0.34%)~3.70s3.73sp=0.512 n=6
Bind Time1.28s (± 0.32%)1.28s (± 0.59%)~1.27s1.29sp=1.000 n=6
Check Time9.82s (± 0.39%)9.83s (± 0.78%)~9.74s9.97sp=0.936 n=6
Emit Time8.40s (± 0.73%)8.38s (± 0.49%)~8.35s8.46sp=0.572 n=6
Total Time23.22s (± 0.28%)23.21s (± 0.46%)~23.09s23.37sp=0.809 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used187,203k (± 0.71%)186,645k (± 0.01%)~186,624k186,661kp=0.471 n=6
Parse Time1.57s (± 0.52%)1.59s (± 0.86%)~1.57s1.61sp=0.058 n=6
Bind Time0.85s (± 0.64%)0.85s (± 0.48%)~0.85s0.86sp=0.282 n=6
Check Time10.17s (± 0.32%)10.24s (± 0.25%)+0.07s (+ 0.69%)10.20s10.27sp=0.010 n=6
Emit Time3.18s (± 0.92%)3.18s (± 1.19%)~3.13s3.23sp=0.808 n=6
Total Time15.78s (± 0.26%)15.86s (± 0.29%)+0.08s (+ 0.52%)15.79s15.91sp=0.024 n=6
Monaco - node (v14.15.1, x64)
Memory used338,099k (± 0.00%)338,113k (± 0.00%)~338,098k338,131kp=0.065 n=6
Parse Time2.90s (± 0.28%)2.90s (± 0.86%)~2.86s2.93sp=0.933 n=6
Bind Time1.12s (± 0.49%)1.12s (± 1.43%)~1.11s1.15sp=0.855 n=6
Check Time8.14s (± 0.59%)8.11s (± 0.40%)~8.08s8.15sp=0.418 n=6
Emit Time4.78s (± 0.50%)4.78s (± 0.72%)~4.74s4.83sp=0.747 n=6
Total Time16.94s (± 0.37%)16.92s (± 0.45%)~16.84s17.05sp=0.469 n=6
TFS - node (v14.15.1, x64)
Memory used294,322k (± 0.00%)294,312k (± 0.00%)~294,303k294,321kp=0.228 n=6
Parse Time2.38s (± 1.04%)2.38s (± 0.68%)~2.36s2.40sp=1.000 n=6
Bind Time1.11s (± 0.95%)1.10s (± 1.15%)~1.09s1.12sp=0.456 n=6
Check Time7.54s (± 0.38%)7.55s (± 0.51%)~7.50s7.60sp=0.517 n=6
Emit Time4.62s (± 0.54%)4.65s (± 1.21%)~4.57s4.72sp=0.571 n=6
Total Time15.65s (± 0.26%)15.68s (± 0.62%)~15.54s15.78sp=0.520 n=6
material-ui - node (v14.15.1, x64)
Memory used471,221k (± 0.00%)471,231k (± 0.00%)~471,217k471,256kp=0.228 n=6
Parse Time3.49s (± 0.35%)3.47s (± 0.43%)~3.46s3.50sp=0.119 n=6
Bind Time1.04s (± 0.50%)1.04s (± 0.79%)~1.03s1.05sp=0.929 n=6
Check Time19.13s (± 0.46%)19.09s (± 0.64%)~18.99s19.33sp=0.336 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time23.66s (± 0.40%)23.61s (± 0.59%)~23.50s23.88sp=0.172 n=6
xstate - node (v14.15.1, x64)
Memory used534,492k (± 0.01%)534,458k (± 0.01%)~534,352k534,494kp=0.422 n=6
Parse Time4.58s (± 0.18%)4.58s (± 0.33%)~4.57s4.60sp=1.000 n=6
Bind Time1.72s (± 0.57%)1.72s (± 0.52%)~1.71s1.73sp=0.798 n=6
Check Time3.16s (± 0.53%)3.17s (± 0.46%)~3.15s3.19sp=0.462 n=6
Emit Time0.10s (± 0.00%)0.10s (± 4.01%)~0.10s0.11sp=0.405 n=6
Total Time9.57s (± 0.21%)9.58s (± 0.19%)~9.56s9.60sp=0.516 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current528366
Baselinemain6

TSServer

Comparison Report - main..52836
Metricmain52836DeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen2,379ms (± 1.15%)2,371ms (± 0.73%)~2,338ms2,386msp=0.689 n=6
Req 2 - geterr5,371ms (± 0.57%)5,333ms (± 0.24%)-38ms (- 0.70%)5,320ms5,353msp=0.013 n=6
Req 3 - references341ms (± 0.99%)338ms (± 0.66%)~336ms342msp=0.195 n=6
Req 4 - navto281ms (± 0.65%)283ms (± 0.58%)~281ms285msp=0.096 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo72ms (± 1.52%)71ms (± 1.14%)~71ms73msp=0.177 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen2,503ms (± 0.78%)2,510ms (± 0.78%)~2,488ms2,535msp=0.748 n=6
Req 2 - geterr4,037ms (± 0.75%)4,013ms (± 0.69%)~3,994ms4,067msp=0.173 n=6
Req 3 - references353ms (± 0.51%)353ms (± 0.62%)~350ms356msp=1.000 n=6
Req 4 - navto288ms (± 0.56%)289ms (± 0.64%)~286ms291msp=0.681 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo68ms (± 0.81%)69ms (± 4.77%)~66ms75msp=1.000 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen3,190ms (± 0.65%)3,186ms (± 0.41%)~3,168ms3,204msp=0.936 n=6
Req 2 - geterr1,640ms (± 0.71%)1,643ms (± 1.05%)~1,620ms1,667msp=0.936 n=6
Req 3 - references104ms (± 1.22%)104ms (± 2.67%)~102ms109msp=0.617 n=6
Req 4 - navto357ms (± 0.91%)356ms (± 0.54%)~355ms360msp=1.000 n=6
Req 5 - completionInfo count3,136 (± 0.00%)3,136 (± 0.00%)~3,1363,136p=1.000 n=6
Req 5 - completionInfo426ms (± 1.09%)427ms (± 0.73%)~424ms433msp=0.377 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen2,535ms (± 0.66%)2,520ms (± 0.44%)~2,505ms2,534msp=0.106 n=6
Req 2 - geterr5,757ms (± 0.62%)5,723ms (± 0.30%)~5,699ms5,743msp=0.066 n=6
Req 3 - references350ms (± 0.58%)355ms (± 1.54%)~348ms363msp=0.107 n=6
Req 4 - navto280ms (± 0.84%)279ms (± 0.62%)~276ms281msp=0.677 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo84ms (± 3.80%)79ms (± 5.16%)🟩-5ms (- 5.96%)75ms84msp=0.043 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen2,683ms (± 1.20%)2,684ms (± 0.59%)~2,664ms2,698msp=0.810 n=6
Req 2 - geterr4,377ms (± 0.50%)4,366ms (± 0.60%)~4,344ms4,402msp=0.422 n=6
Req 3 - references366ms (± 1.04%)364ms (± 0.74%)~359ms366msp=0.196 n=6
Req 4 - navto282ms (± 1.16%)283ms (± 1.46%)~279ms289msp=0.871 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo73ms (± 0.87%)73ms (± 1.82%)~71ms75msp=0.720 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen3,370ms (± 0.28%)3,368ms (± 0.31%)~3,351ms3,383msp=0.575 n=6
Req 2 - geterr1,839ms (± 3.77%)1,940ms (± 5.47%)~1,780ms2,028msp=0.128 n=6
Req 3 - references111ms (± 2.13%)111ms (± 1.32%)~109ms113msp=0.934 n=6
Req 4 - navto345ms (± 1.27%)343ms (± 1.53%)~336ms351msp=0.628 n=6
Req 5 - completionInfo count3,136 (± 0.00%)3,136 (± 0.00%)~3,1363,136p=1.000 n=6
Req 5 - completionInfo431ms (± 0.82%)433ms (± 1.31%)~427ms442msp=0.466 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen2,624ms (± 0.48%)2,619ms (± 0.52%)~2,597ms2,631msp=1.000 n=6
Req 2 - geterr6,095ms (± 0.55%)6,085ms (± 0.53%)~6,045ms6,121msp=0.471 n=6
Req 3 - references366ms (± 0.33%)367ms (± 1.49%)~361ms377msp=0.744 n=6
Req 4 - navto281ms (± 1.80%)277ms (± 0.27%)~276ms278msp=0.102 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo101ms (± 0.63%)100ms (± 1.03%)~99ms101msp=0.293 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen2,838ms (± 0.90%)2,843ms (± 0.25%)~2,838ms2,857msp=0.689 n=6
Req 2 - geterr4,619ms (± 2.63%)4,539ms (± 2.41%)~4,446ms4,698msp=0.230 n=6
Req 3 - references380ms (± 0.86%)389ms (± 5.65%)~377ms433msp=0.936 n=6
Req 4 - navto293ms (± 1.31%)294ms (± 1.17%)~288ms297msp=0.688 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo86ms (± 9.49%)88ms (± 9.52%)~81ms101msp=0.627 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen3,684ms (± 0.86%)3,675ms (± 0.39%)~3,656ms3,692msp=0.748 n=6
Req 2 - geterr1,856ms (± 2.24%)1,852ms (± 1.66%)~1,818ms1,896msp=1.000 n=6
Req 3 - references127ms (± 3.89%)126ms (± 2.84%)~122ms132msp=0.627 n=6
Req 4 - navto376ms (± 1.62%)373ms (± 0.64%)~369ms376msp=0.332 n=6
Req 5 - completionInfo count3,136 (± 0.00%)3,136 (± 0.00%)~3,1363,136p=1.000 n=6
Req 5 - completionInfo457ms (± 2.63%)445ms (± 1.87%)~436ms455msp=0.065 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
BenchmarkNameIterations
Current528366
Baselinemain6

Startup

Comparison Report - main..52836
Metricmain52836DeltaBestWorstp-value
tsc-startup - node (v16.17.1, x64)
Execution time142.31ms (± 0.19%)142.86ms (± 0.22%)+0.54ms (+ 0.38%)141.80ms148.55msp=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time226.77ms (± 0.18%)226.87ms (± 0.16%)+0.10ms (+ 0.05%)225.91ms232.20msp=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time228.58ms (± 0.21%)228.58ms (± 0.17%)~227.62ms234.50msp=0.576 n=600
typescript-startup - node (v16.17.1, x64)
Execution time209.39ms (± 0.18%)209.34ms (± 0.17%)-0.05ms (- 0.02%)208.52ms214.06msp=0.044 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
BenchmarkNameIterations
Current528366
Baselinemain6

Developer Information:

Download Benchmark

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top-repos suite comparing main and refs/pull/52836/merge:

Something interesting changed - please have a look.

Details

refined-github/refined-github

tsconfig.json

  • error TS2322: Type 'false' is not assignable to type 'Partial<{ actionUrl: string; customCSS: string; personalToken: string; logging: boolean; logHTTP: boolean; } & { [k: string]: boolean; }>[feature:${FeatureID}]'.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top-repos suite comparing main and refs/pull/52836/merge:

Everything looks good!

@jakebailey

This comment was marked as outdated.

@jakebailey
Jake Bailey (jakebailey) marked this pull request as draft March 7, 2023 23:50
Comment threadsrc/compiler/checker.ts Outdated
@jakebailey

Copy link
Copy Markdown
MemberAuthor

Wesley Wigham (@weswigham) Do you have any commentary on this in general? I'm doubting my choice here; it does allow you to write template types that contain intersections, which, you can only use by creating more template literals (as in my Path example).

However, I'm somewhat wondering if I should instead be treating these like unions, i.e. expand them out at the top where if you have say `a${A & B}b`, that it turns into `a${A}b` & `a${B}b`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any commentary on this in general? I'm doubting my choice here; it does allow you to write template types that contain intersections, which, you can only use by creating more template literals (as in my Path example).

Hm, I think only being able to interact with branded holes with other branded types is kinda the point of branding your literal types. Simultaneously, today you can use a template literal to "unbrand" a branded type (I don't know how prevalent that is, and, obviously if you look at the prompting issue, it isn't desirable to some). I'm not crushed by replacing the "unbranding" behavior with respecting brands, though, since you can also "unbrand" a branded literal type with something like

typeUnbrand<T,TBrand>=Textends infer Q&TBrand ? Q : never;typeQ=Unbrand<"a"&{ok: any},{ok: any}>;

which is, IMO, better, since you have to specify what brands you're removing from the type.

However, I'm somewhat wondering if I should instead be treating these like unions, i.e. expand them out at the top where if you have say a${A & B}b, that it turns into a${A}b & a${B}b.

No, I don't think that's right - intersected literals always become never, so the only meaningful intersections are branded literals. So if you split the brand and the literal apart, you'd have an object alone inside a template hole, like making a/${"b" & {path:any}}/c into a/b/c & a/${{path:any}}/c, and that later type has basically no meaning (in fact, by current rules, it just makes the type into string, which'll then evaporate entirely) - it's only useful when you consider it with what it's intersected with anyway.

Comment threadsrc/compiler/checker.ts Outdated
Comment threadsrc/compiler/checker.ts Outdated
@jakebailey

Jake Bailey (jakebailey) commented Mar 16, 2023

Copy link
Copy Markdown
MemberAuthor

Thanks for the feedback! I've made the changes.

@typescript-botTypeScript Bot (typescript-bot) added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug and removed For Milestone Bug PRs that fix a bug with a specific milestone labels Mar 20, 2023
@jakebailey
Jake Bailey (jakebailey) merged commit 716b592 into microsoft:mainMar 20, 2023
@jakebailey
Jake Bailey (jakebailey) deleted the fix-52345 branch March 20, 2023 02:48
@sandersn

Copy link
Copy Markdown
Member

This breaks fragmented-store on DT. I'll get more details and file a bug.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

Hm, I could have sworn I ran dt.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

(But, that is why I decided to merge yesterday afternoon; so I could get this feedback sooner rather than later.)

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants

@jakebailey@typescript-bot@sandersn@weswigham