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

Allow partial matches in discrimination logic #58974

Merged
merged 3 commits into from
Jun 25, 2024
Merged

Allow partial matches in discrimination logic #58974

merged 3 commits into from
Jun 25, 2024

Conversation

ahejlsberg
Copy link
Member

Fixes #58603.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jun 22, 2024
@ahejlsberg
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 22, 2024

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

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

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user tests with tsc comparing main and refs/pull/58974/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 192,189k (± 0.07%) 192,333k (± 0.11%) ~ 192,103k 192,594k p=0.298 n=6
Parse Time 1.31s (± 0.39%) 1.30s (± 1.35%) ~ 1.27s 1.32s p=0.504 n=6
Bind Time 0.71s 0.71s (± 0.57%) ~ 0.71s 0.72s p=0.405 n=6
Check Time 9.42s (± 0.58%) 9.45s (± 0.31%) ~ 9.41s 9.50s p=0.221 n=6
Emit Time 2.74s (± 0.30%) 2.75s (± 0.51%) ~ 2.73s 2.77s p=0.548 n=6
Total Time 14.17s (± 0.40%) 14.21s (± 0.21%) ~ 14.19s 14.27s p=0.199 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,114 944,114 ~ ~ ~ p=1.000 n=6
Types 407,051 407,050 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 1,218,359k (± 0.00%) 1,218,328k (± 0.00%) ~ 1,218,282k 1,218,370k p=0.128 n=6
Parse Time 6.64s (± 0.54%) 6.67s (± 0.51%) ~ 6.61s 6.70s p=0.376 n=6
Bind Time 1.86s (± 0.53%) 1.86s (± 0.40%) ~ 1.85s 1.87s p=0.554 n=6
Check Time 30.62s (± 0.27%) 30.59s (± 0.37%) ~ 30.49s 30.77s p=0.521 n=6
Emit Time 13.53s (± 0.62%) 13.52s (± 0.49%) ~ 13.40s 13.60s p=0.520 n=6
Total Time 52.65s (± 0.23%) 52.63s (± 0.15%) ~ 52.55s 52.76s p=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,134,511 2,134,511 ~ ~ ~ p=1.000 n=6
Types 927,068 927,067 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,116,050k (± 0.00%) 2,116,104k (± 0.01%) ~ 2,115,946k 2,116,217k p=0.378 n=6
Parse Time 6.60s (± 0.26%) 6.62s (± 0.51%) ~ 6.57s 6.66s p=0.226 n=6
Bind Time 2.33s (± 1.38%) 2.34s (± 1.35%) ~ 2.31s 2.38s p=0.405 n=6
Check Time 70.35s (± 0.91%) 70.26s (± 1.81%) ~ 68.57s 71.43s p=0.378 n=6
Emit Time 0.13s (± 3.87%) 0.14s (± 3.77%) ~ 0.13s 0.14s p=0.311 n=6
Total Time 79.41s (± 0.76%) 79.36s (± 1.57%) ~ 77.69s 80.54s p=0.378 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,230,804 1,230,806 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 261,202 261,203 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,346,482k (± 0.03%) 2,346,981k (± 0.05%) ~ 2,344,794k 2,348,282k p=0.471 n=6
Parse Time 5.93s (± 0.36%) 5.93s (± 0.90%) ~ 5.89s 6.03s p=0.630 n=6
Bind Time 2.29s (± 0.99%) 2.26s (± 0.97%) ~ 2.24s 2.30s p=0.053 n=6
Check Time 39.73s (± 0.21%) 39.76s (± 0.24%) ~ 39.60s 39.85s p=0.471 n=6
Emit Time 3.15s (± 2.63%) 3.09s (± 1.87%) ~ 3.02s 3.19s p=0.170 n=6
Total Time 51.11s (± 0.22%) 51.06s (± 0.15%) ~ 50.96s 51.13s p=0.093 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,230,804 1,230,806 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 261,202 261,203 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,421,276k (± 0.04%) 2,421,321k (± 0.05%) ~ 2,420,031k 2,422,829k p=1.000 n=6
Parse Time 5.13s (± 1.25%) 5.15s (± 1.07%) ~ 5.08s 5.22s p=0.521 n=6
Bind Time 1.69s (± 0.97%) 1.69s (± 0.81%) ~ 1.67s 1.70s p=1.000 n=6
Check Time 34.18s (± 0.30%) 34.04s (± 0.36%) ~ 33.87s 34.17s p=0.128 n=6
Emit Time 2.73s (± 2.71%) 2.72s (± 2.45%) ~ 2.63s 2.80s p=0.748 n=6
Total Time 43.77s (± 0.14%) 43.63s (± 0.27%) ~ 43.45s 43.81s p=0.066 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 258,574 258,576 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 104,825 104,825 ~ ~ ~ p=1.000 n=6
Memory used 428,227k (± 0.02%) 428,204k (± 0.01%) ~ 428,173k 428,249k p=0.936 n=6
Parse Time 3.31s (± 0.59%) 3.31s (± 0.62%) ~ 3.29s 3.34s p=1.000 n=6
Bind Time 1.31s (± 0.75%) 1.31s (± 1.63%) ~ 1.29s 1.34s p=1.000 n=6
Check Time 17.70s (± 0.42%) 17.76s (± 0.57%) ~ 17.65s 17.93s p=0.293 n=6
Emit Time 1.38s (± 1.41%) 1.38s (± 1.76%) ~ 1.34s 1.41s p=0.935 n=6
Total Time 23.70s (± 0.29%) 23.76s (± 0.45%) ~ 23.62s 23.92s p=0.261 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,565 224,565 ~ ~ ~ p=1.000 n=6
Types 93,734 93,734 ~ ~ ~ p=1.000 n=6
Memory used 369,528k (± 0.03%) 369,453k (± 0.02%) ~ 369,344k 369,614k p=0.378 n=6
Parse Time 2.77s (± 0.90%) 2.78s (± 0.98%) ~ 2.75s 2.82s p=0.289 n=6
Bind Time 1.59s (± 0.97%) 1.59s (± 1.03%) ~ 1.56s 1.61s p=1.000 n=6
Check Time 15.44s (± 0.34%) 15.46s (± 0.28%) ~ 15.40s 15.52s p=0.520 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.80s (± 0.34%) 19.82s (± 0.22%) ~ 19.77s 19.88s p=0.630 n=6
vscode - node (v18.15.0, x64)
Errors 139 139 ~ ~ ~ p=1.000 n=6
Symbols 2,854,562 2,854,562 ~ ~ ~ p=1.000 n=6
Types 976,042 976,044 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,045,625k (± 0.00%) 3,045,671k (± 0.00%) +46k (+ 0.00%) 3,045,650k 3,045,720k p=0.045 n=6
Parse Time 13.52s (± 0.18%) 13.54s (± 0.51%) ~ 13.47s 13.65s p=0.873 n=6
Bind Time 4.24s (± 0.39%) 4.25s (± 0.42%) ~ 4.23s 4.27s p=0.367 n=6
Check Time 74.11s (± 0.50%) 75.38s (± 2.95%) ~ 73.57s 78.37s p=0.689 n=6
Emit Time 24.04s (± 0.16%) 22.79s (± 8.81%) ~ 20.15s 24.27s p=0.470 n=6
Total Time 115.91s (± 0.30%) 115.96s (± 0.33%) ~ 115.45s 116.31s p=0.936 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 267,117 267,117 ~ ~ ~ p=1.000 n=6
Types 108,775 108,775 ~ ~ ~ p=1.000 n=6
Memory used 411,534k (± 0.01%) 411,588k (± 0.02%) ~ 411,491k 411,672k p=0.128 n=6
Parse Time 3.82s (± 0.87%) 3.82s (± 0.81%) ~ 3.79s 3.86s p=0.936 n=6
Bind Time 1.69s (± 0.31%) 1.69s (± 0.53%) ~ 1.68s 1.70s p=0.541 n=6
Check Time 16.70s (± 0.31%) 16.73s (± 0.36%) ~ 16.62s 16.79s p=0.470 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.20s (± 0.24%) 22.24s (± 0.32%) ~ 22.12s 22.31s p=0.336 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 525,251 525,251 ~ ~ ~ p=1.000 n=6
Types 178,574 178,574 ~ ~ ~ p=1.000 n=6
Memory used 462,644k (± 0.06%) 462,945k (± 0.05%) ~ 462,513k 463,197k p=0.128 n=6
Parse Time 3.92s (± 0.38%) 3.93s (± 0.34%) ~ 3.91s 3.95s p=0.310 n=6
Bind Time 1.46s (± 1.35%) 1.44s (± 1.34%) ~ 1.42s 1.47s p=0.195 n=6
Check Time 22.14s (± 0.32%) 22.22s (± 0.18%) ~ 22.17s 22.29s p=0.107 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.52s (± 0.30%) 27.59s (± 0.17%) ~ 27.54s 27.68s p=0.106 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top 400 repos with tsc comparing main and refs/pull/58974/merge:

Everything looks good!

@ahejlsberg
Copy link
Member Author

Tests and performance are all clean. This should be ready to merge.

@ahejlsberg ahejlsberg merged commit 6c01f6c into main Jun 25, 2024
28 checks passed
@ahejlsberg ahejlsberg deleted the fix58603-2 branch June 25, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Type union not matched starting from TS 5.1
4 participants