Skip to content

Fixed dependent variables narrowing when they are declared using nested binding patterns #56306

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

@Andarist Andarist commented Nov 4, 2023

Closes #56307

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 4, 2023
@typescript-bot typescript-bot removed the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 21, 2023
@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug labels Nov 21, 2023
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.

This looks good, but juuust in case, I'm going to run the extended suites on this.

@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 Nov 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 27, 2023

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at a667689. 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,186k (± 0.00%) 295,186k (± 0.01%) ~ 295,165k 295,229k p=0.688 n=6
Parse Time 2.64s (± 0.28%) 2.65s (± 0.31%) ~ 2.64s 2.66s p=0.383 n=6
Bind Time 0.83s (± 1.19%) 0.83s (± 0.91%) ~ 0.82s 0.84s p=1.000 n=6
Check Time 8.03s (± 0.39%) 8.01s (± 0.18%) ~ 7.99s 8.03s p=0.124 n=6
Emit Time 7.09s (± 0.31%) 7.07s (± 0.28%) ~ 7.04s 7.10s p=0.050 n=6
Total Time 18.59s (± 0.20%) 18.55s (± 0.13%) ~ 18.52s 18.59s p=0.075 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 194,003k (± 1.47%) 194,032k (± 1.47%) ~ 190,716k 196,552k p=0.689 n=6
Parse Time 1.35s (± 0.30%) 1.36s (± 1.44%) ~ 1.34s 1.39s p=0.210 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.15s (± 0.50%) 9.19s (± 0.48%) ~ 9.15s 9.28s p=0.105 n=6
Emit Time 2.62s (± 0.67%) 2.61s (± 0.38%) ~ 2.60s 2.62s p=0.216 n=6
Total Time 13.84s (± 0.25%) 13.89s (± 0.37%) ~ 13.86s 13.99s p=0.106 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,363k (± 0.00%) 347,358k (± 0.01%) ~ 347,339k 347,392k p=0.378 n=6
Parse Time 2.45s (± 1.19%) 2.46s (± 0.54%) ~ 2.44s 2.47s p=0.315 n=6
Bind Time 0.92s (± 0.56%) 0.93s (± 0.44%) ~ 0.92s 0.93s p=0.112 n=6
Check Time 6.91s (± 0.42%) 6.93s (± 1.78%) ~ 6.86s 7.18s p=0.257 n=6
Emit Time 4.06s (± 0.19%) 4.04s (± 0.22%) -0.02s (- 0.53%) 4.03s 4.05s p=0.007 n=6
Total Time 14.35s (± 0.32%) 14.36s (± 0.86%) ~ 14.28s 14.61s p=0.572 n=6
TFS - node (v18.15.0, x64)
Memory used 302,628k (± 0.01%) 302,628k (± 0.01%) ~ 302,608k 302,667k p=1.000 n=6
Parse Time 1.99s (± 0.63%) 2.00s (± 1.39%) ~ 1.97s 2.05s p=0.805 n=6
Bind Time 1.00s (± 1.36%) 1.00s (± 1.17%) ~ 0.99s 1.02s p=0.933 n=6
Check Time 6.27s (± 0.37%) 6.28s (± 0.43%) ~ 6.26s 6.33s p=0.746 n=6
Emit Time 3.58s (± 0.29%) 3.58s (± 0.70%) ~ 3.56s 3.62s p=0.934 n=6
Total Time 12.85s (± 0.12%) 12.87s (± 0.40%) ~ 12.82s 12.94s p=0.807 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,555k (± 0.01%) 470,669k (± 0.03%) ~ 470,511k 470,786k p=0.230 n=6
Parse Time 2.57s (± 0.25%) 2.57s (± 0.80%) ~ 2.55s 2.60s p=0.615 n=6
Bind Time 0.99s (± 0.52%) 0.99s (± 1.18%) ~ 0.98s 1.01s p=0.542 n=6
Check Time 16.75s (± 0.50%) 16.71s (± 0.24%) ~ 16.65s 16.77s p=0.422 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.31s (± 0.42%) 20.27s (± 0.16%) ~ 20.24s 20.33s p=0.575 n=6
xstate - node (v18.15.0, x64)
Memory used 512,012k (± 0.01%) 512,021k (± 0.02%) ~ 511,936k 512,163k p=0.810 n=6
Parse Time 3.27s (± 0.36%) 3.27s (± 0.25%) ~ 3.26s 3.28s p=0.315 n=6
Bind Time 1.54s (± 0.49%) 1.54s (± 0.41%) ~ 1.53s 1.55s p=0.718 n=6
Check Time 2.80s (± 0.61%) 2.80s (± 0.92%) ~ 2.77s 2.84s p=1.000 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=0.405 n=6
Total Time 7.69s (± 0.28%) 7.70s (± 0.35%) ~ 7.66s 7.74s p=0.629 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,355ms (± 0.95%) 2,390ms (± 0.68%) +34ms (+ 1.46%) 2,372ms 2,413ms p=0.016 n=6
Req 2 - geterr 5,387ms (± 1.51%) 5,327ms (± 0.24%) ~ 5,307ms 5,347ms p=0.748 n=6
Req 3 - references 326ms (± 0.82%) 325ms (± 0.60%) ~ 323ms 328ms p=0.871 n=6
Req 4 - navto 277ms (± 1.39%) 279ms (± 0.57%) ~ 276ms 280ms p=0.322 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 85ms (± 5.81%) 82ms (± 6.52%) ~ 76ms 92ms p=0.405 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,494ms (± 1.16%) 2,497ms (± 0.73%) ~ 2,478ms 2,524ms p=0.630 n=6
Req 2 - geterr 4,089ms (± 2.02%) 4,060ms (± 1.88%) ~ 3,996ms 4,161ms p=0.423 n=6
Req 3 - references 339ms (± 1.70%) 342ms (± 1.62%) ~ 333ms 346ms p=0.325 n=6
Req 4 - navto 283ms (± 0.59%) 283ms (± 0.43%) ~ 282ms 285ms p=0.805 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 84ms (± 7.82%) 86ms (± 6.89%) ~ 78ms 90ms p=0.465 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,586ms (± 0.78%) 2,593ms (± 0.37%) ~ 2,579ms 2,603ms p=0.575 n=6
Req 2 - geterr 1,658ms (± 2.11%) 1,656ms (± 2.78%) ~ 1,607ms 1,718ms p=1.000 n=6
Req 3 - references 109ms (± 9.38%) 111ms (± 9.36%) ~ 101ms 124ms p=1.000 n=6
Req 4 - navto 366ms (± 0.54%) 368ms (± 1.10%) ~ 364ms 375ms p=0.446 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 (± 2.27%) 309ms (± 2.06%) ~ 303ms 318ms p=0.628 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 152.74ms (± 0.19%) 152.70ms (± 0.18%) ~ 151.55ms 154.83ms p=0.488 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.14ms (± 0.16%) 228.00ms (± 0.18%) -0.14ms (- 0.06%) 226.66ms 235.01ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.73ms (± 0.17%) 229.79ms (± 0.19%) ~ 227.92ms 235.51ms p=0.406 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.27ms (± 0.20%) 229.14ms (± 0.16%) -0.13ms (- 0.06%) 227.68ms 233.78ms p=0.028 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/56306/merge:

Everything looks good!

@weswigham weswigham merged commit 1c11e45 into microsoft:main Nov 28, 2023
@sheetalkamat sheetalkamat mentioned this pull request Nov 28, 2023
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.

Allow narrowing dependent types from nested array
4 participants