Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 14 commits into from
Mar 20, 2023

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Feb 18, 2023

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
Member Author

@typescript-bot test this
@typescript-bot test top100
@typescript-bot user test this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100
@typescript-bot run dt
@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 18, 2023
@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

Heya @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
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

Heya @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
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

Heya @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
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

Heya @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
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

Heya @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
Copy link
Collaborator

typescript-bot commented Feb 18, 2023

Heya @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-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
Collaborator

@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
Collaborator

@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
Collaborator

Heya @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
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..52836
Metric main 52836 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 359,387k (± 0.01%) 359,394k (± 0.01%) ~ 359,338k 359,442k p=0.628 n=6
Parse Time 3.50s (± 0.86%) 3.49s (± 0.89%) ~ 3.44s 3.53s p=0.683 n=6
Bind Time 1.17s (± 0.44%) 1.17s (± 0.76%) ~ 1.16s 1.18s p=0.541 n=6
Check Time 8.77s (± 0.62%) 8.69s (± 0.45%) -0.08s (- 0.87%) 8.63s 8.74s p=0.020 n=6
Emit Time 7.61s (± 0.92%) 7.59s (± 0.37%) ~ 7.56s 7.63s p=0.871 n=6
Total Time 21.05s (± 0.62%) 20.94s (± 0.29%) ~ 20.85s 21.02s p=0.106 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 190,827k (± 1.19%) 190,855k (± 1.19%) ~ 189,912k 195,477k p=0.936 n=6
Parse Time 1.48s (± 0.66%) 1.48s (± 0.90%) ~ 1.46s 1.50s p=0.620 n=6
Bind Time 0.79s (± 0.52%) 0.79s (± 0.52%) ~ 0.79s 0.80s p=1.000 n=6
Check Time 9.42s (± 0.88%) 9.42s (± 0.22%) ~ 9.40s 9.45s p=0.688 n=6
Emit Time 2.82s (± 1.62%) 2.79s (± 1.12%) ~ 2.76s 2.83s p=0.374 n=6
Total Time 14.51s (± 0.77%) 14.48s (± 0.32%) ~ 14.42s 14.54s p=0.470 n=6
Monaco - node (v18.10.0, x64)
Memory used 343,979k (± 0.01%) 343,986k (± 0.02%) ~ 343,886k 344,078k p=0.936 n=6
Parse Time 2.62s (± 1.17%) 2.62s (± 0.95%) ~ 2.58s 2.65s p=0.872 n=6
Bind Time 1.03s (± 0.81%) 1.03s (± 1.18%) ~ 1.02s 1.05s p=0.928 n=6
Check Time 7.12s (± 0.44%) 7.09s (± 0.37%) ~ 7.06s 7.13s p=0.091 n=6
Emit Time 4.33s (± 0.35%) 4.32s (± 0.54%) ~ 4.29s 4.35s p=1.000 n=6
Total Time 15.10s (± 0.30%) 15.07s (± 0.37%) ~ 14.97s 15.12s p=0.628 n=6
TFS - node (v18.10.0, x64)
Memory used 300,028k (± 0.00%) 300,045k (± 0.01%) ~ 300,027k 300,087k p=0.149 n=6
Parse Time 2.07s (± 1.48%) 2.06s (± 0.78%) ~ 2.04s 2.08s p=0.331 n=6
Bind Time 1.17s (± 0.44%) 1.17s (± 0.35%) ~ 1.16s 1.17s p=0.114 n=6
Check Time 6.57s (± 0.30%) 6.58s (± 0.35%) ~ 6.54s 6.60s p=0.325 n=6
Emit Time 3.93s (± 0.66%) 3.93s (± 0.63%) ~ 3.90s 3.97s p=1.000 n=6
Total Time 13.75s (± 0.50%) 13.74s (± 0.27%) ~ 13.70s 13.79s p=0.374 n=6
material-ui - node (v18.10.0, x64)
Memory used 476,411k (± 0.01%) 476,424k (± 0.01%) ~ 476,362k 476,458k p=0.470 n=6
Parse Time 3.15s (± 1.09%) 3.15s (± 0.79%) ~ 3.10s 3.17s p=1.000 n=6
Bind Time 0.97s (± 0.42%) 0.97s (± 0.65%) ~ 0.96s 0.98s p=0.673 n=6
Check Time 17.18s (± 0.32%) 17.21s (± 0.49%) ~ 17.11s 17.33s p=0.872 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.30s (± 0.21%) 21.32s (± 0.44%) ~ 21.21s 21.46s p=0.748 n=6
xstate - node (v18.10.0, x64)
Memory used 548,608k (± 0.03%) 548,528k (± 0.02%) ~ 548,364k 548,693k p=0.471 n=6
Parse Time 4.06s (± 0.37%) 4.07s (± 0.18%) ~ 4.06s 4.08s p=0.060 n=6
Bind Time 1.72s (± 1.14%) 1.73s (± 1.45%) ~ 1.69s 1.75s p=0.505 n=6
Check Time 2.81s (± 0.70%) 2.82s (± 0.49%) ~ 2.80s 2.84s p=0.366 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.67s (± 0.33%) 8.70s (± 0.16%) ~ 8.68s 8.72s p=0.078 n=6
Angular - node (v16.17.1, x64)
Memory used 358,760k (± 0.01%) 358,747k (± 0.01%) ~ 358,712k 358,793k p=0.471 n=6
Parse Time 3.72s (± 0.63%) 3.71s (± 0.22%) ~ 3.70s 3.72s p=0.869 n=6
Bind Time 1.22s (± 0.42%) 1.23s (± 0.61%) ~ 1.22s 1.24s p=0.247 n=6
Check Time 9.54s (± 0.49%) 9.51s (± 0.40%) ~ 9.46s 9.56s p=0.296 n=6
Emit Time 8.12s (± 1.35%) 8.03s (± 0.72%) ~ 7.98s 8.14s p=0.090 n=6
Total Time 22.60s (± 0.48%) 22.48s (± 0.35%) ~ 22.40s 22.63s p=0.065 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 191,518k (± 0.02%) 192,651k (± 0.93%) ~ 191,430k 195,104k p=0.936 n=6
Parse Time 1.57s (± 0.67%) 1.56s (± 0.96%) ~ 1.54s 1.58s p=0.933 n=6
Bind Time 0.84s (± 0.00%) 0.84s (± 0.00%) ~ 0.84s 0.84s p=1.000 n=6
Check Time 10.13s (± 0.44%) 10.12s (± 0.63%) ~ 10.02s 10.18s p=1.000 n=6
Emit Time 3.08s (± 0.96%) 3.06s (± 1.02%) ~ 3.03s 3.12s p=0.219 n=6
Total Time 15.60s (± 0.34%) 15.58s (± 0.50%) ~ 15.47s 15.66s p=0.630 n=6
Monaco - node (v16.17.1, x64)
Memory used 343,256k (± 0.00%) 343,265k (± 0.01%) ~ 343,202k 343,295k p=0.228 n=6
Parse Time 2.80s (± 0.52%) 2.80s (± 0.64%) ~ 2.77s 2.82s p=1.000 n=6
Bind Time 1.11s (± 0.68%) 1.11s (± 0.46%) ~ 1.11s 1.12s p=0.784 n=6
Check Time 7.77s (± 0.22%) 7.78s (± 0.36%) ~ 7.75s 7.82s p=0.867 n=6
Emit Time 4.50s (± 0.57%) 4.50s (± 0.76%) ~ 4.45s 4.55s p=1.000 n=6
Total Time 16.18s (± 0.17%) 16.19s (± 0.35%) ~ 16.10s 16.25s p=0.469 n=6
TFS - node (v16.17.1, x64)
Memory used 299,386k (± 0.01%) 299,377k (± 0.01%) ~ 299,356k 299,403k p=0.471 n=6
Parse Time 2.19s (± 0.53%) 2.19s (± 0.85%) ~ 2.16s 2.21s p=0.363 n=6
Bind Time 1.26s (± 0.65%) 1.26s (± 0.60%) ~ 1.25s 1.27s p=0.729 n=6
Check Time 7.21s (± 0.35%) 7.19s (± 0.29%) ~ 7.16s 7.21s p=0.193 n=6
Emit Time 4.22s (± 0.56%) 4.22s (± 0.63%) ~ 4.19s 4.26s p=0.935 n=6
Total Time 14.87s (± 0.37%) 14.86s (± 0.25%) ~ 14.79s 14.89s p=1.000 n=6
material-ui - node (v16.17.1, x64)
Memory used 475,716k (± 0.01%) 475,690k (± 0.00%) ~ 475,682k 475,700k p=0.520 n=6
Parse Time 3.33s (± 0.31%) 3.32s (± 0.36%) ~ 3.31s 3.34s p=0.675 n=6
Bind Time 1.02s (± 0.50%) 1.01s (± 0.54%) -0.01s (- 0.81%) 1.01s 1.02s p=0.038 n=6
Check Time 18.15s (± 0.45%) 18.18s (± 0.38%) ~ 18.11s 18.27s p=0.689 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.50s (± 0.37%) 22.53s (± 0.26%) ~ 22.46s 22.60s p=0.936 n=6
xstate - node (v16.17.1, x64)
Memory used 546,058k (± 0.02%) 546,143k (± 0.02%) ~ 545,996k 546,243k p=0.173 n=6
Parse Time 4.24s (± 0.19%) 4.25s (± 0.32%) ~ 4.23s 4.27s p=0.133 n=6
Bind Time 1.81s (± 0.29%) 1.80s (± 0.29%) ~ 1.80s 1.81s p=0.311 n=6
Check Time 3.07s (± 0.63%) 3.07s (± 0.63%) ~ 3.04s 3.09s p=1.000 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.21s (± 0.20%) 9.22s (± 0.22%) ~ 9.19s 9.25s p=0.373 n=6
Angular - node (v14.15.1, x64)
Memory used 352,281k (± 0.00%) 352,277k (± 0.00%) ~ 352,267k 352,298k p=0.378 n=6
Parse Time 3.71s (± 0.41%) 3.71s (± 0.34%) ~ 3.70s 3.73s p=0.512 n=6
Bind Time 1.28s (± 0.32%) 1.28s (± 0.59%) ~ 1.27s 1.29s p=1.000 n=6
Check Time 9.82s (± 0.39%) 9.83s (± 0.78%) ~ 9.74s 9.97s p=0.936 n=6
Emit Time 8.40s (± 0.73%) 8.38s (± 0.49%) ~ 8.35s 8.46s p=0.572 n=6
Total Time 23.22s (± 0.28%) 23.21s (± 0.46%) ~ 23.09s 23.37s p=0.809 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 187,203k (± 0.71%) 186,645k (± 0.01%) ~ 186,624k 186,661k p=0.471 n=6
Parse Time 1.57s (± 0.52%) 1.59s (± 0.86%) ~ 1.57s 1.61s p=0.058 n=6
Bind Time 0.85s (± 0.64%) 0.85s (± 0.48%) ~ 0.85s 0.86s p=0.282 n=6
Check Time 10.17s (± 0.32%) 10.24s (± 0.25%) +0.07s (+ 0.69%) 10.20s 10.27s p=0.010 n=6
Emit Time 3.18s (± 0.92%) 3.18s (± 1.19%) ~ 3.13s 3.23s p=0.808 n=6
Total Time 15.78s (± 0.26%) 15.86s (± 0.29%) +0.08s (+ 0.52%) 15.79s 15.91s p=0.024 n=6
Monaco - node (v14.15.1, x64)
Memory used 338,099k (± 0.00%) 338,113k (± 0.00%) ~ 338,098k 338,131k p=0.065 n=6
Parse Time 2.90s (± 0.28%) 2.90s (± 0.86%) ~ 2.86s 2.93s p=0.933 n=6
Bind Time 1.12s (± 0.49%) 1.12s (± 1.43%) ~ 1.11s 1.15s p=0.855 n=6
Check Time 8.14s (± 0.59%) 8.11s (± 0.40%) ~ 8.08s 8.15s p=0.418 n=6
Emit Time 4.78s (± 0.50%) 4.78s (± 0.72%) ~ 4.74s 4.83s p=0.747 n=6
Total Time 16.94s (± 0.37%) 16.92s (± 0.45%) ~ 16.84s 17.05s p=0.469 n=6
TFS - node (v14.15.1, x64)
Memory used 294,322k (± 0.00%) 294,312k (± 0.00%) ~ 294,303k 294,321k p=0.228 n=6
Parse Time 2.38s (± 1.04%) 2.38s (± 0.68%) ~ 2.36s 2.40s p=1.000 n=6
Bind Time 1.11s (± 0.95%) 1.10s (± 1.15%) ~ 1.09s 1.12s p=0.456 n=6
Check Time 7.54s (± 0.38%) 7.55s (± 0.51%) ~ 7.50s 7.60s p=0.517 n=6
Emit Time 4.62s (± 0.54%) 4.65s (± 1.21%) ~ 4.57s 4.72s p=0.571 n=6
Total Time 15.65s (± 0.26%) 15.68s (± 0.62%) ~ 15.54s 15.78s p=0.520 n=6
material-ui - node (v14.15.1, x64)
Memory used 471,221k (± 0.00%) 471,231k (± 0.00%) ~ 471,217k 471,256k p=0.228 n=6
Parse Time 3.49s (± 0.35%) 3.47s (± 0.43%) ~ 3.46s 3.50s p=0.119 n=6
Bind Time 1.04s (± 0.50%) 1.04s (± 0.79%) ~ 1.03s 1.05s p=0.929 n=6
Check Time 19.13s (± 0.46%) 19.09s (± 0.64%) ~ 18.99s 19.33s p=0.336 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.66s (± 0.40%) 23.61s (± 0.59%) ~ 23.50s 23.88s p=0.172 n=6
xstate - node (v14.15.1, x64)
Memory used 534,492k (± 0.01%) 534,458k (± 0.01%) ~ 534,352k 534,494k p=0.422 n=6
Parse Time 4.58s (± 0.18%) 4.58s (± 0.33%) ~ 4.57s 4.60s p=1.000 n=6
Bind Time 1.72s (± 0.57%) 1.72s (± 0.52%) ~ 1.71s 1.73s p=0.798 n=6
Check Time 3.16s (± 0.53%) 3.17s (± 0.46%) ~ 3.15s 3.19s p=0.462 n=6
Emit Time 0.10s (± 0.00%) 0.10s (± 4.01%) ~ 0.10s 0.11s p=0.405 n=6
Total Time 9.57s (± 0.21%) 9.58s (± 0.19%) ~ 9.56s 9.60s p=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)
Benchmark Name Iterations
Current 52836 6
Baseline main 6

TSServer

Comparison Report - main..52836
Metric main 52836 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,379ms (± 1.15%) 2,371ms (± 0.73%) ~ 2,338ms 2,386ms p=0.689 n=6
Req 2 - geterr 5,371ms (± 0.57%) 5,333ms (± 0.24%) -38ms (- 0.70%) 5,320ms 5,353ms p=0.013 n=6
Req 3 - references 341ms (± 0.99%) 338ms (± 0.66%) ~ 336ms 342ms p=0.195 n=6
Req 4 - navto 281ms (± 0.65%) 283ms (± 0.58%) ~ 281ms 285ms p=0.096 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 72ms (± 1.52%) 71ms (± 1.14%) ~ 71ms 73ms p=0.177 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,503ms (± 0.78%) 2,510ms (± 0.78%) ~ 2,488ms 2,535ms p=0.748 n=6
Req 2 - geterr 4,037ms (± 0.75%) 4,013ms (± 0.69%) ~ 3,994ms 4,067ms p=0.173 n=6
Req 3 - references 353ms (± 0.51%) 353ms (± 0.62%) ~ 350ms 356ms p=1.000 n=6
Req 4 - navto 288ms (± 0.56%) 289ms (± 0.64%) ~ 286ms 291ms p=0.681 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 68ms (± 0.81%) 69ms (± 4.77%) ~ 66ms 75ms p=1.000 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,190ms (± 0.65%) 3,186ms (± 0.41%) ~ 3,168ms 3,204ms p=0.936 n=6
Req 2 - geterr 1,640ms (± 0.71%) 1,643ms (± 1.05%) ~ 1,620ms 1,667ms p=0.936 n=6
Req 3 - references 104ms (± 1.22%) 104ms (± 2.67%) ~ 102ms 109ms p=0.617 n=6
Req 4 - navto 357ms (± 0.91%) 356ms (± 0.54%) ~ 355ms 360ms p=1.000 n=6
Req 5 - completionInfo count 3,136 (± 0.00%) 3,136 (± 0.00%) ~ 3,136 3,136 p=1.000 n=6
Req 5 - completionInfo 426ms (± 1.09%) 427ms (± 0.73%) ~ 424ms 433ms p=0.377 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,535ms (± 0.66%) 2,520ms (± 0.44%) ~ 2,505ms 2,534ms p=0.106 n=6
Req 2 - geterr 5,757ms (± 0.62%) 5,723ms (± 0.30%) ~ 5,699ms 5,743ms p=0.066 n=6
Req 3 - references 350ms (± 0.58%) 355ms (± 1.54%) ~ 348ms 363ms p=0.107 n=6
Req 4 - navto 280ms (± 0.84%) 279ms (± 0.62%) ~ 276ms 281ms p=0.677 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 84ms (± 3.80%) 79ms (± 5.16%) 🟩-5ms (- 5.96%) 75ms 84ms p=0.043 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,683ms (± 1.20%) 2,684ms (± 0.59%) ~ 2,664ms 2,698ms p=0.810 n=6
Req 2 - geterr 4,377ms (± 0.50%) 4,366ms (± 0.60%) ~ 4,344ms 4,402ms p=0.422 n=6
Req 3 - references 366ms (± 1.04%) 364ms (± 0.74%) ~ 359ms 366ms p=0.196 n=6
Req 4 - navto 282ms (± 1.16%) 283ms (± 1.46%) ~ 279ms 289ms p=0.871 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 73ms (± 0.87%) 73ms (± 1.82%) ~ 71ms 75ms p=0.720 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,370ms (± 0.28%) 3,368ms (± 0.31%) ~ 3,351ms 3,383ms p=0.575 n=6
Req 2 - geterr 1,839ms (± 3.77%) 1,940ms (± 5.47%) ~ 1,780ms 2,028ms p=0.128 n=6
Req 3 - references 111ms (± 2.13%) 111ms (± 1.32%) ~ 109ms 113ms p=0.934 n=6
Req 4 - navto 345ms (± 1.27%) 343ms (± 1.53%) ~ 336ms 351ms p=0.628 n=6
Req 5 - completionInfo count 3,136 (± 0.00%) 3,136 (± 0.00%) ~ 3,136 3,136 p=1.000 n=6
Req 5 - completionInfo 431ms (± 0.82%) 433ms (± 1.31%) ~ 427ms 442ms p=0.466 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,624ms (± 0.48%) 2,619ms (± 0.52%) ~ 2,597ms 2,631ms p=1.000 n=6
Req 2 - geterr 6,095ms (± 0.55%) 6,085ms (± 0.53%) ~ 6,045ms 6,121ms p=0.471 n=6
Req 3 - references 366ms (± 0.33%) 367ms (± 1.49%) ~ 361ms 377ms p=0.744 n=6
Req 4 - navto 281ms (± 1.80%) 277ms (± 0.27%) ~ 276ms 278ms p=0.102 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 101ms (± 0.63%) 100ms (± 1.03%) ~ 99ms 101ms p=0.293 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,838ms (± 0.90%) 2,843ms (± 0.25%) ~ 2,838ms 2,857ms p=0.689 n=6
Req 2 - geterr 4,619ms (± 2.63%) 4,539ms (± 2.41%) ~ 4,446ms 4,698ms p=0.230 n=6
Req 3 - references 380ms (± 0.86%) 389ms (± 5.65%) ~ 377ms 433ms p=0.936 n=6
Req 4 - navto 293ms (± 1.31%) 294ms (± 1.17%) ~ 288ms 297ms p=0.688 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 86ms (± 9.49%) 88ms (± 9.52%) ~ 81ms 101ms p=0.627 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,684ms (± 0.86%) 3,675ms (± 0.39%) ~ 3,656ms 3,692ms p=0.748 n=6
Req 2 - geterr 1,856ms (± 2.24%) 1,852ms (± 1.66%) ~ 1,818ms 1,896ms p=1.000 n=6
Req 3 - references 127ms (± 3.89%) 126ms (± 2.84%) ~ 122ms 132ms p=0.627 n=6
Req 4 - navto 376ms (± 1.62%) 373ms (± 0.64%) ~ 369ms 376ms p=0.332 n=6
Req 5 - completionInfo count 3,136 (± 0.00%) 3,136 (± 0.00%) ~ 3,136 3,136 p=1.000 n=6
Req 5 - completionInfo 457ms (± 2.63%) 445ms (± 1.87%) ~ 436ms 455ms p=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)
Benchmark Name Iterations
Current 52836 6
Baseline main 6

Startup

Comparison Report - main..52836
Metric main 52836 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.31ms (± 0.19%) 142.86ms (± 0.22%) +0.54ms (+ 0.38%) 141.80ms 148.55ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 226.77ms (± 0.18%) 226.87ms (± 0.16%) +0.10ms (+ 0.05%) 225.91ms 232.20ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 228.58ms (± 0.21%) 228.58ms (± 0.17%) ~ 227.62ms 234.50ms p=0.576 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 209.39ms (± 0.18%) 209.34ms (± 0.17%) -0.05ms (- 0.02%) 208.52ms 214.06ms p=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)
Benchmark Name Iterations
Current 52836 6
Baseline main 6

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

@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
Collaborator

@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.

src/compiler/checker.ts Outdated Show resolved Hide resolved
@jakebailey
Copy link
Member Author

@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`.

@jakebailey jakebailey marked this pull request as ready for review March 14, 2023 23:53
@jakebailey jakebailey requested a review from weswigham March 15, 2023 21:41
Copy link
Member

@weswigham weswigham left a comment

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

type Unbrand<T, TBrand> = T extends infer Q & TBrand ? Q : never;

type Q = 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.

src/compiler/checker.ts Outdated Show resolved Hide resolved
src/compiler/checker.ts Outdated Show resolved Hide resolved
@jakebailey
Copy link
Member Author

jakebailey commented Mar 16, 2023

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

@jakebailey jakebailey requested a review from weswigham March 16, 2023 20:51
@typescript-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 jakebailey merged commit 716b592 into microsoft:main Mar 20, 2023
@jakebailey jakebailey deleted the fix-52345 branch March 20, 2023 02:48
@sandersn
Copy link
Member

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

@jakebailey
Copy link
Member Author

Hm, I could have sworn I ran dt.

@jakebailey
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants