Skip to content

Fix #33569 - Enable declaration emit for late-bound function members #53034

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

Merged

Conversation

weswigham
Copy link
Member

This is quite a bit simpler than the older fix rather than trying to make exports and cjs merges resolve in a predictable order (and handling the circularities involved), this just resets the export member cache when a cjs merge occurs (so the final resolved exports with both cjs merge members and late bound members gets recalculated). Hopefully the simpler fix should mean there's no crash in RWC/DT this time~

Fixes #33569

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 28, 2023
@weswigham
Copy link
Member Author

@typescript-bot pack this
@typescript-bot user test this inline
@typescript-bot test this
@typescript-bot run dt
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2023

Heya @weswigham, I've started to run the diff-based user code test suite on this PR at 022a8af. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2023

Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/147816/artifacts?artifactName=tgz&fileId=3E74031A4E2875844774BA44BD6A1CE84D51C54F139FAB41A1318BC536DF1F6002&fileName=/typescript-5.1.0-insiders.20230228.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

@typescript-bot
Copy link
Collaborator

@weswigham Here are the results of running the user test suite comparing main and refs/pull/53034/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..53034
Metric main 53034 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 359,743k (± 0.03%) 359,762k (± 0.02%) ~ 359,694k 359,851k p=0.575 n=6
Parse Time 3.50s (± 0.66%) 3.49s (± 0.93%) ~ 3.46s 3.53s p=0.677 n=6
Bind Time 1.13s (± 1.09%) 1.13s (± 1.22%) ~ 1.11s 1.14s p=1.000 n=6
Check Time 8.63s (± 0.59%) 8.67s (± 0.60%) ~ 8.60s 8.75s p=0.227 n=6
Emit Time 7.42s (± 0.46%) 7.42s (± 0.61%) ~ 7.37s 7.49s p=1.000 n=6
Total Time 20.67s (± 0.33%) 20.71s (± 0.50%) ~ 20.55s 20.85s p=0.375 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 189,612k (± 0.05%) 190,502k (± 1.25%) ~ 189,498k 195,356k p=0.378 n=6
Parse Time 1.48s (± 0.85%) 1.49s (± 0.93%) ~ 1.47s 1.51s p=0.506 n=6
Bind Time 0.77s (± 1.06%) 0.77s (± 0.00%) ~ 0.77s 0.77s p=0.290 n=6
Check Time 9.27s (± 0.75%) 9.32s (± 0.68%) ~ 9.25s 9.43s p=0.172 n=6
Emit Time 2.73s (± 0.86%) 2.73s (± 1.00%) ~ 2.70s 2.77s p=0.934 n=6
Total Time 14.24s (± 0.59%) 14.30s (± 0.43%) ~ 14.23s 14.41s p=0.128 n=6
Monaco - node (v18.10.0, x64)
Memory used 343,844k (± 0.01%) 343,844k (± 0.01%) ~ 343,804k 343,875k p=0.936 n=6
Parse Time 2.62s (± 1.52%) 2.63s (± 0.47%) ~ 2.61s 2.64s p=1.000 n=6
Bind Time 1.01s (± 0.40%) 1.01s (± 0.40%) ~ 1.01s 1.02s p=0.218 n=6
Check Time 7.01s (± 0.55%) 7.04s (± 0.66%) ~ 6.98s 7.09s p=0.295 n=6
Emit Time 4.20s (± 0.85%) 4.23s (± 1.13%) ~ 4.17s 4.28s p=0.295 n=6
Total Time 14.85s (± 0.30%) 14.90s (± 0.54%) ~ 14.80s 15.00s p=0.229 n=6
TFS - node (v18.10.0, x64)
Memory used 299,884k (± 0.01%) 299,897k (± 0.01%) ~ 299,861k 299,916k p=0.470 n=6
Parse Time 2.03s (± 1.11%) 2.03s (± 1.22%) ~ 2.00s 2.06s p=0.871 n=6
Bind Time 1.14s (± 0.55%) 1.14s (± 0.66%) ~ 1.13s 1.15s p=0.718 n=6
Check Time 6.51s (± 0.77%) 6.49s (± 0.48%) ~ 6.45s 6.54s p=0.466 n=6
Emit Time 3.84s (± 0.71%) 3.84s (± 1.20%) ~ 3.78s 3.91s p=0.936 n=6
Total Time 13.53s (± 0.60%) 13.51s (± 0.51%) ~ 13.42s 13.62s p=0.748 n=6
material-ui - node (v18.10.0, x64)
Memory used 476,416k (± 0.00%) 476,411k (± 0.01%) ~ 476,366k 476,443k p=0.936 n=6
Parse Time 3.12s (± 0.60%) 3.13s (± 1.00%) ~ 3.09s 3.18s p=0.744 n=6
Bind Time 0.90s (± 0.57%) 0.91s (± 0.45%) +0.01s (+ 0.92%) 0.91s 0.92s p=0.022 n=6
Check Time 16.98s (± 0.29%) 17.15s (± 0.50%) +0.18s (+ 1.05%) 17.06s 17.24s p=0.005 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.00s (± 0.29%) 21.19s (± 0.51%) +0.19s (+ 0.92%) 21.06s 21.34s p=0.005 n=6
xstate - node (v18.10.0, x64)
Memory used 548,079k (± 0.02%) 548,075k (± 0.03%) ~ 547,896k 548,326k p=1.000 n=6
Parse Time 4.07s (± 0.52%) 4.11s (± 0.37%) +0.03s (+ 0.86%) 4.09s 4.12s p=0.019 n=6
Bind Time 1.67s (± 1.06%) 1.68s (± 1.17%) ~ 1.65s 1.70s p=0.073 n=6
Check Time 2.76s (± 0.78%) 2.77s (± 0.30%) ~ 2.76s 2.78s p=0.406 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.58s (± 0.47%) 8.64s (± 0.23%) +0.06s (+ 0.74%) 8.61s 8.67s p=0.013 n=6
Angular - node (v16.17.1, x64)
Memory used 359,092k (± 0.00%) 359,061k (± 0.01%) ~ 359,024k 359,111k p=0.078 n=6
Parse Time 3.72s (± 0.47%) 3.73s (± 0.32%) ~ 3.71s 3.74s p=0.744 n=6
Bind Time 1.19s (± 0.43%) 1.20s (± 0.68%) ~ 1.19s 1.21s p=0.523 n=6
Check Time 9.40s (± 0.32%) 9.44s (± 0.39%) ~ 9.39s 9.49s p=0.221 n=6
Emit Time 7.88s (± 0.52%) 7.91s (± 0.47%) ~ 7.89s 7.98s p=0.373 n=6
Total Time 22.20s (± 0.13%) 22.28s (± 0.17%) +0.07s (+ 0.34%) 22.22s 22.32s p=0.013 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 191,848k (± 0.70%) 191,783k (± 0.69%) ~ 191,120k 194,492k p=0.471 n=6
Parse Time 1.57s (± 0.63%) 1.57s (± 1.10%) ~ 1.54s 1.59s p=0.869 n=6
Bind Time 0.82s (± 0.00%) 0.83s (± 0.66%) ~ 0.82s 0.83s p=0.071 n=6
Check Time 10.06s (± 0.57%) 10.09s (± 0.79%) ~ 10.01s 10.22s p=0.629 n=6
Emit Time 3.01s (± 1.12%) 2.99s (± 0.65%) ~ 2.96s 3.02s p=0.328 n=6
Total Time 15.45s (± 0.49%) 15.47s (± 0.44%) ~ 15.42s 15.58s p=0.568 n=6
Monaco - node (v16.17.1, x64)
Memory used 343,125k (± 0.00%) 343,118k (± 0.00%) ~ 343,106k 343,134k p=0.377 n=6
Parse Time 2.78s (± 0.66%) 2.80s (± 0.52%) +0.02s (+ 0.84%) 2.79s 2.83s p=0.046 n=6
Bind Time 1.08s (± 1.08%) 1.09s (± 1.11%) ~ 1.08s 1.11s p=0.438 n=6
Check Time 7.68s (± 0.19%) 7.70s (± 0.40%) ~ 7.67s 7.75s p=0.124 n=6
Emit Time 4.41s (± 0.78%) 4.42s (± 0.67%) ~ 4.38s 4.46s p=0.334 n=6
Total Time 15.94s (± 0.36%) 16.02s (± 0.35%) ~ 15.95s 16.07s p=0.077 n=6
TFS - node (v16.17.1, x64)
Memory used 299,248k (± 0.00%) 299,250k (± 0.01%) ~ 299,224k 299,285k p=1.000 n=6
Parse Time 2.16s (± 0.54%) 2.16s (± 0.35%) ~ 2.15s 2.17s p=0.796 n=6
Bind Time 1.24s (± 1.07%) 1.24s (± 0.94%) ~ 1.22s 1.25s p=0.932 n=6
Check Time 7.15s (± 0.57%) 7.20s (± 0.79%) ~ 7.12s 7.28s p=0.149 n=6
Emit Time 4.34s (± 0.67%) 4.34s (± 0.54%) ~ 4.32s 4.38s p=0.808 n=6
Total Time 14.89s (± 0.41%) 14.94s (± 0.40%) ~ 14.87s 15.03s p=0.127 n=6
material-ui - node (v16.17.1, x64)
Memory used 475,645k (± 0.01%) 475,657k (± 0.00%) ~ 475,624k 475,677k p=0.298 n=6
Parse Time 3.29s (± 0.19%) 3.29s (± 0.33%) ~ 3.28s 3.31s p=0.787 n=6
Bind Time 0.96s (± 0.00%) 0.96s (± 0.78%) ~ 0.95s 0.97s p=0.598 n=6
Check Time 18.07s (± 0.56%) 18.05s (± 0.40%) ~ 17.96s 18.15s p=0.936 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.32s (± 0.45%) 22.30s (± 0.34%) ~ 22.21s 22.40s p=0.936 n=6
xstate - node (v16.17.1, x64)
Memory used 545,693k (± 0.02%) 545,847k (± 0.02%) +154k (+ 0.03%) 545,724k 546,001k p=0.031 n=6
Parse Time 4.27s (± 0.54%) 4.29s (± 0.27%) ~ 4.27s 4.30s p=0.091 n=6
Bind Time 1.76s (± 0.43%) 1.76s (± 0.23%) ~ 1.76s 1.77s p=0.389 n=6
Check Time 2.99s (± 0.69%) 2.99s (± 0.66%) ~ 2.96s 3.01s p=0.624 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.11s (± 0.36%) 9.13s (± 0.15%) ~ 9.11s 9.14s p=0.369 n=6
Angular - node (v14.15.1, x64)
Memory used 352,813k (± 0.00%) 352,815k (± 0.00%) ~ 352,788k 352,837k p=0.575 n=6
Parse Time 3.69s (± 0.41%) 3.70s (± 0.50%) ~ 3.67s 3.72s p=0.402 n=6
Bind Time 1.24s (± 0.41%) 1.25s (± 0.44%) ~ 1.24s 1.25s p=0.640 n=6
Check Time 9.68s (± 0.48%) 9.71s (± 0.56%) ~ 9.64s 9.77s p=0.335 n=6
Emit Time 8.39s (± 0.83%) 8.38s (± 0.55%) ~ 8.32s 8.45s p=0.873 n=6
Total Time 23.00s (± 0.40%) 23.04s (± 0.35%) ~ 22.96s 23.17s p=0.423 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 186,518k (± 0.01%) 186,534k (± 0.02%) ~ 186,509k 186,586k p=0.520 n=6
Parse Time 1.57s (± 0.52%) 1.57s (± 0.66%) ~ 1.56s 1.59s p=0.270 n=6
Bind Time 0.84s (± 0.97%) 0.84s (± 0.61%) ~ 0.84s 0.85s p=0.140 n=6
Check Time 10.13s (± 0.37%) 10.19s (± 0.48%) ~ 10.13s 10.25s p=0.054 n=6
Emit Time 3.13s (± 0.93%) 3.13s (± 0.57%) ~ 3.11s 3.16s p=0.936 n=6
Total Time 15.66s (± 0.47%) 15.73s (± 0.38%) ~ 15.66s 15.80s p=0.149 n=6
Monaco - node (v14.15.1, x64)
Memory used 338,136k (± 0.02%) 338,114k (± 0.01%) ~ 338,085k 338,155k p=0.872 n=6
Parse Time 2.88s (± 0.42%) 2.88s (± 0.53%) ~ 2.86s 2.90s p=0.806 n=6
Bind Time 1.09s (± 0.37%) 1.11s (± 0.68%) +0.02s (+ 1.53%) 1.10s 1.12s p=0.005 n=6
Check Time 8.07s (± 0.44%) 8.12s (± 0.49%) ~ 8.07s 8.16s p=0.106 n=6
Emit Time 4.68s (± 0.93%) 4.67s (± 0.59%) ~ 4.65s 4.72s p=0.871 n=6
Total Time 16.71s (± 0.33%) 16.77s (± 0.33%) ~ 16.69s 16.82s p=0.078 n=6
TFS - node (v14.15.1, x64)
Memory used 294,293k (± 0.00%) 294,288k (± 0.00%) ~ 294,272k 294,303k p=0.688 n=6
Parse Time 2.37s (± 0.73%) 2.37s (± 0.63%) ~ 2.36s 2.40s p=0.934 n=6
Bind Time 1.06s (± 0.98%) 1.07s (± 0.70%) ~ 1.06s 1.08s p=0.611 n=6
Check Time 7.46s (± 0.20%) 7.48s (± 0.49%) ~ 7.42s 7.52s p=0.258 n=6
Emit Time 4.29s (± 0.82%) 4.26s (± 0.62%) ~ 4.24s 4.31s p=0.294 n=6
Total Time 15.19s (± 0.36%) 15.19s (± 0.33%) ~ 15.13s 15.26s p=0.686 n=6
material-ui - node (v14.15.1, x64)
Memory used 471,312k (± 0.01%) 471,329k (± 0.00%) ~ 471,315k 471,356k p=0.128 n=6
Parse Time 3.45s (± 0.39%) 3.46s (± 0.32%) ~ 3.44s 3.47s p=0.120 n=6
Bind Time 1.00s (± 0.55%) 1.02s (± 2.15%) +0.02s (+ 2.51%) 1.00s 1.06s p=0.015 n=6
Check Time 18.89s (± 0.48%) 18.93s (± 0.39%) ~ 18.83s 19.01s 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 23.35s (± 0.41%) 23.41s (± 0.40%) ~ 23.27s 23.54s p=0.258 n=6
xstate - node (v14.15.1, x64)
Memory used 534,380k (± 0.00%) 534,405k (± 0.01%) ~ 534,369k 534,445k p=0.199 n=6
Parse Time 4.46s (± 1.07%) 4.55s (± 1.32%) ~ 4.43s 4.60s p=0.076 n=6
Bind Time 1.77s (± 3.29%) 1.70s (± 2.58%) ~ 1.66s 1.78s p=0.089 n=6
Check Time 3.13s (± 0.57%) 3.16s (± 0.24%) +0.03s (+ 0.91%) 3.15s 3.17s p=0.007 n=6
Emit Time 0.10s (± 4.15%) 0.10s (± 0.00%) ~ 0.10s 0.10s p=0.405 n=6
Total Time 9.46s (± 0.19%) 9.50s (± 0.25%) +0.04s (+ 0.42%) 9.47s 9.53s p=0.018 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 53034 6
Baseline main 6

TSServer

Comparison Report - main..53034
Metric main 53034 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,366ms (± 0.52%) 2,360ms (± 0.67%) ~ 2,340ms 2,380ms p=0.470 n=6
Req 2 - geterr 5,310ms (± 0.54%) 5,305ms (± 0.79%) ~ 5,251ms 5,368ms p=1.000 n=6
Req 3 - references 338ms (± 1.46%) 339ms (± 1.11%) ~ 335ms 346ms p=0.469 n=6
Req 4 - navto 285ms (± 0.37%) 287ms (± 0.52%) +3ms (+ 1.00%) 286ms 290ms p=0.007 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 78ms (± 0.81%) 74ms (± 5.28%) ~ 70ms 78ms p=0.059 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,515ms (± 0.73%) 2,536ms (± 0.58%) ~ 2,520ms 2,556ms p=0.093 n=6
Req 2 - geterr 3,977ms (± 0.34%) 3,975ms (± 0.85%) ~ 3,951ms 4,027ms p=0.378 n=6
Req 3 - references 352ms (± 0.55%) 353ms (± 0.61%) ~ 349ms 354ms p=0.548 n=6
Req 4 - navto 291ms (± 0.36%) 294ms (± 0.28%) +3ms (+ 1.03%) 292ms 294ms p=0.005 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.60%) 68ms (± 0.60%) ~ 68ms 69ms p=0.218 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,163ms (± 0.28%) 3,171ms (± 0.41%) ~ 3,151ms 3,190ms p=0.228 n=6
Req 2 - geterr 1,590ms (± 0.44%) 1,610ms (± 0.71%) +20ms (+ 1.28%) 1,591ms 1,622ms p=0.013 n=6
Req 3 - references 104ms (± 1.59%) 105ms (± 2.41%) ~ 102ms 109ms p=0.331 n=6
Req 4 - navto 358ms (± 0.37%) 360ms (± 0.32%) +2ms (+ 0.56%) 358ms 361ms p=0.033 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 428ms (± 0.64%) 424ms (± 1.47%) ~ 416ms 432ms p=0.296 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,473ms (± 1.47%) 2,489ms (± 1.79%) ~ 2,451ms 2,576ms p=0.335 n=6
Req 2 - geterr 5,693ms (± 0.61%) 5,733ms (± 0.50%) ~ 5,694ms 5,765ms p=0.066 n=6
Req 3 - references 349ms (± 0.76%) 352ms (± 1.07%) ~ 347ms 356ms p=0.170 n=6
Req 4 - navto 280ms (± 0.71%) 280ms (± 0.80%) ~ 277ms 282ms p=0.412 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 86ms (± 2.52%) 87ms (± 4.66%) ~ 83ms 93ms p=0.737 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,669ms (± 0.90%) 2,674ms (± 0.60%) ~ 2,650ms 2,697ms p=0.575 n=6
Req 2 - geterr 4,362ms (± 0.45%) 4,361ms (± 0.26%) ~ 4,343ms 4,377ms p=0.936 n=6
Req 3 - references 363ms (± 0.95%) 366ms (± 0.88%) ~ 359ms 367ms p=0.066 n=6
Req 4 - navto 288ms (± 0.99%) 289ms (± 1.16%) ~ 284ms 293ms p=0.571 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 74ms (± 1.11%) 74ms (± 1.14%) ~ 73ms 75ms p=0.718 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,326ms (± 0.23%) 3,342ms (± 0.60%) ~ 3,315ms 3,366ms p=0.172 n=6
Req 2 - geterr 1,766ms (± 1.28%) 1,775ms (± 0.77%) ~ 1,761ms 1,794ms p=0.378 n=6
Req 3 - references 113ms (± 1.92%) 112ms (± 2.33%) ~ 109ms 115ms p=0.805 n=6
Req 4 - navto 343ms (± 1.22%) 348ms (± 1.51%) ~ 340ms 353ms p=0.090 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 432ms (± 0.86%) 435ms (± 0.68%) ~ 431ms 439ms p=0.145 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,552ms (± 0.48%) 2,583ms (± 0.48%) +31ms (+ 1.23%) 2,566ms 2,604ms p=0.008 n=6
Req 2 - geterr 6,008ms (± 0.34%) 6,030ms (± 0.62%) ~ 5,958ms 6,063ms p=0.066 n=6
Req 3 - references 364ms (± 0.53%) 366ms (± 0.67%) ~ 364ms 369ms p=0.324 n=6
Req 4 - navto 278ms (± 1.85%) 279ms (± 1.96%) ~ 274ms 286ms p=0.466 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 98ms (± 2.23%) 99ms (± 3.06%) ~ 95ms 102ms p=0.745 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,805ms (± 0.87%) 2,817ms (± 0.22%) ~ 2,806ms 2,824ms p=0.297 n=6
Req 2 - geterr 4,435ms (± 1.87%) 4,398ms (± 0.43%) ~ 4,366ms 4,420ms p=0.226 n=6
Req 3 - references 392ms (± 6.00%) 394ms (± 5.91%) ~ 376ms 425ms p=0.575 n=6
Req 4 - navto 291ms (± 1.80%) 293ms (± 1.62%) ~ 286ms 298ms p=0.518 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 91ms (± 8.85%) 97ms (± 6.67%) ~ 85ms 102ms p=0.195 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,630ms (± 0.58%) 3,653ms (± 0.57%) ~ 3,638ms 3,693ms p=0.109 n=6
Req 2 - geterr 1,840ms (± 0.41%) 1,834ms (± 0.61%) ~ 1,819ms 1,852ms p=0.335 n=6
Req 3 - references 129ms (± 2.97%) 128ms (± 1.96%) ~ 124ms 131ms p=0.871 n=6
Req 4 - navto 374ms (± 0.68%) 373ms (± 1.55%) ~ 362ms 378ms p=0.935 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 450ms (± 2.24%) 452ms (± 3.46%) ~ 434ms 470ms p=1.000 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 53034 6
Baseline main 6

Startup

Comparison Report - main..53034
Metric main 53034 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.60ms (± 0.21%) 142.95ms (± 0.20%) +0.35ms (+ 0.25%) 142.09ms 145.19ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 226.92ms (± 0.14%) 228.03ms (± 0.16%) +1.11ms (+ 0.49%) 227.07ms 231.47ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 228.85ms (± 0.19%) 229.37ms (± 0.15%) +0.52ms (+ 0.23%) 228.50ms 234.31ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 209.89ms (± 0.20%) 210.03ms (± 0.16%) +0.14ms (+ 0.07%) 209.12ms 213.99ms p=0.000 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 53034 6
Baseline main 6

Developer Information:

Download Benchmark

if (merged === exported) {
// We just mutated a symbol, reset any cached links we may have already set
// (Notably required to make late bound members appear)
getSymbolLinks(merged).resolvedExports = undefined;
Copy link
Member

Choose a reason for hiding this comment

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

There's no precedent for doing this as far as I can tell; is it likely this information has already been read once before and so some places will have stale info?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's also no other place where we mutate the .exports of a transient symbol like we do on the lines above, so we just kinda have to. The alternative is what the prior PR does, which is attempt to guarantee an ordering of the operations, but that creates an unsolvable circular dependency that, when caught, breaks a bunch. So this is probably as good as it gets, since whatever stale-cache-data issues this introduces (which I don't think should be too much since we do this export= cjs merge pretty early) only applies to cjs assigned export= objects with late bound members merged into them, without affecting the validity of a bunch of code that already works.

@weswigham
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 8, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

Hey @weswigham, it looks like the DT test run failed. Please check the log for more details.
You can check the log here.

@weswigham weswigham merged commit 2b9d792 into microsoft:main Mar 15, 2023
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
Archived in project
Development

Successfully merging this pull request may close these issues.

Handle element access expressions in JS/TS with late-bound names
4 participants