Skip to content

Fixed narrowing based on aliased discriminants coming from destructured parameters #56860

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

Conversation

Andarist
Copy link
Contributor

fixes #56351

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Dec 23, 2023
@weswigham
Copy link
Member

@typescript-bot test this
@typescript-bot run dt
@typescript-bot test top100
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 3, 2024

Heya @weswigham, I've started to run the diff-based top-repos suite on this PR at 7253100. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 3, 2024

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 7253100. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 3, 2024

Heya @weswigham, I've started to run the regular perf test suite on this PR at 7253100. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,488k (± 0.01%) 295,449k (± 0.01%) ~ 295,395k 295,502k p=0.066 n=6
Parse Time 2.65s (± 0.21%) 2.65s (± 0.24%) ~ 2.64s 2.66s p=0.201 n=6
Bind Time 0.82s (± 0.63%) 0.82s (± 0.00%) ~ 0.82s 0.82s p=0.174 n=6
Check Time 8.15s (± 0.29%) 8.16s (± 0.09%) ~ 8.15s 8.17s p=0.510 n=6
Emit Time 7.09s (± 0.35%) 7.11s (± 0.28%) ~ 7.09s 7.15s p=0.254 n=6
Total Time 18.71s (± 0.17%) 18.74s (± 0.09%) ~ 18.72s 18.77s p=0.120 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,457k (± 1.55%) 192,485k (± 1.24%) ~ 191,485k 197,356k p=0.471 n=6
Parse Time 1.36s (± 1.84%) 1.35s (± 0.81%) ~ 1.33s 1.36s p=0.741 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.26s (± 0.55%) 9.23s (± 0.31%) ~ 9.21s 9.28s p=0.289 n=6
Emit Time 2.62s (± 0.46%) 2.62s (± 0.72%) ~ 2.60s 2.64s p=0.806 n=6
Total Time 13.95s (± 0.50%) 13.92s (± 0.30%) ~ 13.86s 13.97s p=0.471 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,395k (± 0.01%) 347,401k (± 0.01%) ~ 347,373k 347,420k p=0.810 n=6
Parse Time 2.46s (± 0.17%) 2.46s (± 0.48%) ~ 2.44s 2.47s p=0.787 n=6
Bind Time 0.92s (± 0.59%) 0.93s (± 0.56%) ~ 0.92s 0.93s p=0.640 n=6
Check Time 6.89s (± 0.30%) 6.88s (± 0.33%) ~ 6.86s 6.91s p=0.366 n=6
Emit Time 4.04s (± 0.29%) 4.05s (± 0.60%) ~ 4.02s 4.09s p=0.292 n=6
Total Time 14.31s (± 0.09%) 14.31s (± 0.34%) ~ 14.27s 14.40s p=0.465 n=6
TFS - node (v18.15.0, x64)
Memory used 302,726k (± 0.00%) 302,721k (± 0.01%) ~ 302,695k 302,749k p=0.470 n=6
Parse Time 1.99s (± 1.51%) 2.00s (± 0.75%) ~ 1.99s 2.03s p=0.514 n=6
Bind Time 1.00s (± 2.08%) 1.01s (± 1.73%) ~ 0.99s 1.04s p=0.166 n=6
Check Time 6.30s (± 0.31%) 6.31s (± 0.34%) ~ 6.27s 6.33s p=0.512 n=6
Emit Time 3.57s (± 0.60%) 3.57s (± 0.51%) ~ 3.55s 3.59s p=0.869 n=6
Total Time 12.86s (± 0.40%) 12.90s (± 0.09%) ~ 12.88s 12.91s p=0.217 n=6
material-ui - node (v18.15.0, x64)
Memory used 506,827k (± 0.00%) 506,818k (± 0.00%) ~ 506,787k 506,849k p=0.521 n=6
Parse Time 2.58s (± 0.57%) 2.58s (± 0.32%) ~ 2.57s 2.59s p=0.740 n=6
Bind Time 0.99s (± 0.99%) 0.99s (± 1.43%) ~ 0.97s 1.01s p=0.869 n=6
Check Time 16.92s (± 0.47%) 16.96s (± 0.20%) ~ 16.90s 16.99s p=0.173 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.49s (± 0.45%) 20.54s (± 0.15%) ~ 20.48s 20.56s p=0.126 n=6
xstate - node (v18.15.0, x64)
Memory used 512,909k (± 0.01%) 512,862k (± 0.01%) ~ 512,813k 512,904k p=0.149 n=6
Parse Time 3.28s (± 0.26%) 3.28s (± 0.26%) ~ 3.27s 3.29s p=0.796 n=6
Bind Time 1.54s (± 0.27%) 1.54s (± 0.26%) ~ 1.54s 1.55s p=0.218 n=6
Check Time 2.81s (± 0.37%) 2.83s (± 0.27%) +0.02s (+ 0.59%) 2.82s 2.84s p=0.018 n=6
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) ~ 0.07s 0.07s p=1.000 n=6
Total Time 7.70s (± 0.13%) 7.72s (± 0.18%) +0.03s (+ 0.32%) 7.70s 7.74s p=0.014 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,340ms (± 0.34%) 2,336ms (± 0.49%) ~ 2,323ms 2,355ms p=0.521 n=6
Req 2 - geterr 5,433ms (± 1.34%) 5,456ms (± 1.36%) ~ 5,342ms 5,506ms p=1.000 n=6
Req 3 - references 325ms (± 1.09%) 328ms (± 1.14%) ~ 324ms 334ms p=0.198 n=6
Req 4 - navto 277ms (± 1.30%) 275ms (± 1.18%) ~ 273ms 280ms p=0.357 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 87ms (± 6.04%) 89ms (± 5.97%) ~ 82ms 93ms p=0.869 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,496ms (± 0.48%) 2,481ms (± 0.97%) ~ 2,442ms 2,516ms p=0.298 n=6
Req 2 - geterr 4,107ms (± 1.38%) 4,112ms (± 1.55%) ~ 4,080ms 4,242ms p=0.936 n=6
Req 3 - references 340ms (± 0.97%) 346ms (± 0.68%) +6ms (+ 1.62%) 341ms 347ms p=0.014 n=6
Req 4 - navto 284ms (± 0.52%) 284ms (± 0.36%) ~ 282ms 285ms p=0.510 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 87ms (± 5.29%) 89ms (± 1.00%) ~ 88ms 90ms p=0.557 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,607ms (± 0.33%) 2,599ms (± 0.64%) ~ 2,577ms 2,622ms p=0.521 n=6
Req 2 - geterr 1,734ms (± 2.52%) 1,686ms (± 2.64%) -48ms (- 2.79%) 1,634ms 1,743ms p=0.045 n=6
Req 3 - references 117ms (± 9.01%) 113ms (± 9.41%) ~ 102ms 123ms p=0.466 n=6
Req 4 - navto 365ms (± 0.17%) 364ms (± 0.69%) ~ 359ms 366ms p=0.654 n=6
Req 5 - completionInfo count 2,073 (± 0.00%) 2,073 (± 0.00%) ~ 2,073 2,073 p=1.000 n=6
Req 5 - completionInfo 308ms (± 3.06%) 307ms (± 1.79%) ~ 298ms 313ms p=0.809 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 153.17ms (± 0.20%) 153.12ms (± 0.22%) ~ 152.04ms 158.29ms p=0.071 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.45ms (± 0.14%) 228.11ms (± 0.14%) -0.33ms (- 0.15%) 226.95ms 231.54ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 230.23ms (± 0.19%) 230.14ms (± 0.18%) -0.10ms (- 0.04%) 228.47ms 236.68ms p=0.023 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.96ms (± 0.18%) 229.86ms (± 0.21%) -0.10ms (- 0.04%) 228.10ms 238.01ms p=0.005 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

Hey @weswigham, the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

@typescript-bot
Copy link
Collaborator

@weswigham Here are the results of running the top-repos suite comparing main and refs/pull/56860/merge:

Everything looks good!

@gabritto gabritto merged commit 5a35509 into microsoft:main Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Aliased discriminants with declarations in binding elements within parameters are not narrowing
4 participants