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

When relating a deferred index type over a mapped type on the source side ... #56742

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

weswigham
Copy link
Member

@weswigham weswigham commented Dec 11, 2023

actually compare against the mapped type's apparent keys.

FIxes #56718 - the emit is fine (all the anonymous/local types are inlined and duplicated like you'd expect), our relationship logic was just too strict when relating deferred index types of mapped types, so in the emit, when the keyof {big anonymous mapped type} got duplicated into two places, we failed to recognize them as the same type.

…side, actually compare against the mapped type's apparent keys
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Dec 11, 2023
@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 11, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 11, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 11, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 11, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 11, 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/159064/artifacts?artifactName=tgz&fileId=81A960F26A44587A8544C1550501F826DB3C1BB10B2682D1516117907403737F02&fileName=/typescript-5.4.0-insiders.20231211.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/pr-build@5.4.0-pr-56742-5".;

@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/56742/merge:

Everything looks good!

@jakebailey
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 11, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@jakebailey
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,356k (± 0.02%) 295,368k (± 0.01%) ~ 295,355k 295,393k p=1.000 n=6
Parse Time 2.64s (± 0.41%) 2.65s (± 0.21%) ~ 2.64s 2.65s p=0.476 n=6
Bind Time 0.82s (± 0.50%) 0.82s (± 0.00%) ~ 0.82s 0.82s p=0.405 n=6
Check Time 8.13s (± 0.40%) 8.11s (± 0.31%) ~ 8.07s 8.14s p=0.288 n=6
Emit Time 7.10s (± 0.30%) 7.08s (± 0.27%) ~ 7.07s 7.12s p=0.256 n=6
Total Time 18.69s (± 0.17%) 18.66s (± 0.15%) ~ 18.61s 18.69s p=0.170 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 195,296k (± 1.53%) 193,398k (± 1.56%) ~ 191,450k 197,305k p=0.810 n=6
Parse Time 1.36s (± 1.20%) 1.35s (± 0.38%) ~ 1.35s 1.36s p=0.933 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.27s (± 0.29%) 9.31s (± 0.52%) ~ 9.22s 9.36s p=0.076 n=6
Emit Time 2.61s (± 0.46%) 2.62s (± 0.84%) ~ 2.60s 2.66s p=0.800 n=6
Total Time 13.97s (± 0.17%) 14.01s (± 0.42%) ~ 13.91s 14.09s p=0.088 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,374k (± 0.01%) 347,354k (± 0.01%) ~ 347,332k 347,397k p=0.229 n=6
Parse Time 2.46s (± 0.17%) 2.45s (± 0.26%) -0.01s (- 0.47%) 2.44s 2.46s p=0.009 n=6
Bind Time 0.93s (± 0.44%) 0.92s (± 0.56%) ~ 0.92s 0.93s p=0.112 n=6
Check Time 6.90s (± 0.48%) 6.90s (± 0.35%) ~ 6.86s 6.92s p=0.685 n=6
Emit Time 4.05s (± 0.36%) 4.05s (± 0.35%) ~ 4.03s 4.07s p=1.000 n=6
Total Time 14.34s (± 0.29%) 14.32s (± 0.22%) ~ 14.28s 14.35s p=0.418 n=6
TFS - node (v18.15.0, x64)
Memory used 302,649k (± 0.00%) 302,634k (± 0.00%) -16k (- 0.01%) 302,621k 302,645k p=0.037 n=6
Parse Time 2.00s (± 1.08%) 2.01s (± 0.94%) ~ 1.99s 2.03s p=0.618 n=6
Bind Time 1.00s (± 1.09%) 0.99s (± 0.55%) ~ 0.99s 1.00s p=0.476 n=6
Check Time 6.28s (± 0.33%) 6.27s (± 0.36%) ~ 6.23s 6.29s p=0.466 n=6
Emit Time 3.58s (± 0.61%) 3.59s (± 0.72%) ~ 3.54s 3.61s p=0.328 n=6
Total Time 12.86s (± 0.31%) 12.86s (± 0.34%) ~ 12.79s 12.91s p=1.000 n=6
material-ui - node (v18.15.0, x64)
Memory used 506,796k (± 0.00%) 506,750k (± 0.00%) -46k (- 0.01%) 506,724k 506,782k p=0.013 n=6
Parse Time 2.58s (± 0.72%) 2.58s (± 0.68%) ~ 2.56s 2.61s p=0.871 n=6
Bind Time 0.99s (± 1.23%) 0.99s (± 1.05%) ~ 0.97s 1.00s p=1.000 n=6
Check Time 16.89s (± 0.56%) 16.90s (± 0.55%) ~ 16.76s 17.02s p=0.630 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.45s (± 0.41%) 20.47s (± 0.45%) ~ 20.31s 20.56s p=0.574 n=6
xstate - node (v18.15.0, x64)
Memory used 512,813k (± 0.01%) 512,846k (± 0.01%) +33k (+ 0.01%) 512,806k 512,933k p=0.045 n=6
Parse Time 3.27s (± 0.32%) 3.27s (± 0.36%) ~ 3.26s 3.29s p=0.801 n=6
Bind Time 1.54s (± 0.54%) 1.54s (± 0.36%) ~ 1.53s 1.54s p=0.855 n=6
Check Time 2.80s (± 0.37%) 2.81s (± 0.75%) ~ 2.79s 2.84s p=0.871 n=6
Emit Time 0.07s (± 0.00%) 0.07s (± 5.69%) ~ 0.07s 0.08s p=0.405 n=6
Total Time 7.69s (± 0.10%) 7.69s (± 0.20%) ~ 7.67s 7.71s p=0.864 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,345ms (± 0.82%) 2,341ms (± 0.32%) ~ 2,331ms 2,352ms p=1.000 n=6
Req 2 - geterr 5,428ms (± 1.36%) 5,452ms (± 1.38%) ~ 5,376ms 5,540ms p=0.261 n=6
Req 3 - references 324ms (± 0.77%) 337ms (± 7.47%) ~ 323ms 388ms p=0.166 n=6
Req 4 - navto 276ms (± 1.25%) 273ms (± 1.88%) ~ 263ms 277ms p=0.300 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 89ms (± 6.27%) 85ms (± 8.01%) ~ 77ms 92ms p=0.121 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,492ms (± 0.42%) 2,476ms (± 0.76%) ~ 2,448ms 2,498ms p=0.128 n=6
Req 2 - geterr 4,085ms (± 1.59%) 4,167ms (± 1.85%) ~ 4,059ms 4,231ms p=0.128 n=6
Req 3 - references 345ms (± 0.62%) 338ms (± 1.50%) -7ms (- 2.08%) 334ms 345ms p=0.015 n=6
Req 4 - navto 285ms (± 0.34%) 285ms (± 1.25%) ~ 282ms 292ms p=0.618 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 89ms (± 0.71%) 83ms (± 7.26%) ~ 77ms 89ms p=0.059 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,600ms (± 0.56%) 2,595ms (± 0.93%) ~ 2,565ms 2,619ms p=0.872 n=6
Req 2 - geterr 1,694ms (± 2.42%) 1,697ms (± 2.78%) ~ 1,642ms 1,758ms p=1.000 n=6
Req 3 - references 116ms (± 8.85%) 116ms (± 8.82%) ~ 102ms 123ms p=0.934 n=6
Req 4 - navto 365ms (± 0.55%) 365ms (± 0.17%) ~ 364ms 366ms p=0.262 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 307ms (± 1.81%) 309ms (± 1.57%) ~ 302ms 313ms p=1.000 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.09ms (± 0.21%) 152.97ms (± 0.18%) -0.12ms (- 0.08%) 151.79ms 155.66ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.58ms (± 0.16%) 228.56ms (± 0.19%) ~ 227.36ms 241.89ms p=0.134 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.82ms (± 0.18%) 229.83ms (± 0.19%) ~ 228.27ms 236.43ms p=0.704 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.50ms (± 0.18%) 229.69ms (± 0.18%) +0.19ms (+ 0.08%) 228.12ms 232.50ms p=0.000 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

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.

TypeScript emits d.ts file that is invalid for complex mapped type.
4 participants