Skip to content

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

Merged
Wesley Wigham (weswigham) merged 2 commits into
microsoft:mainfrom
weswigham:deferred-index-source-relation
Jan 9, 2024
Merged

When relating a deferred index type over a mapped type on the source side ...#56742
Wesley Wigham (weswigham) merged 2 commits into
microsoft:mainfrom
weswigham:deferred-index-source-relation

Conversation

@weswigham

@weswighamWesley Wigham (weswigham) commented Dec 11, 2023

Copy link
Copy Markdown
Member

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
@weswigham

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@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

TypeScript Bot (typescript-bot) commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@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

TypeScript Bot (typescript-bot) commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

Hey Wesley Wigham (@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
Copy Markdown
Contributor

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

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham) Here are the results of running the top-repos suite comparing main and refs/pull/56742/merge:

Everything looks good!

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) perf test this

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,356k (± 0.02%)295,368k (± 0.01%)~295,355k295,393kp=1.000 n=6
Parse Time2.64s (± 0.41%)2.65s (± 0.21%)~2.64s2.65sp=0.476 n=6
Bind Time0.82s (± 0.50%)0.82s (± 0.00%)~0.82s0.82sp=0.405 n=6
Check Time8.13s (± 0.40%)8.11s (± 0.31%)~8.07s8.14sp=0.288 n=6
Emit Time7.10s (± 0.30%)7.08s (± 0.27%)~7.07s7.12sp=0.256 n=6
Total Time18.69s (± 0.17%)18.66s (± 0.15%)~18.61s18.69sp=0.170 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used195,296k (± 1.53%)193,398k (± 1.56%)~191,450k197,305kp=0.810 n=6
Parse Time1.36s (± 1.20%)1.35s (± 0.38%)~1.35s1.36sp=0.933 n=6
Bind Time0.72s (± 0.00%)0.72s (± 0.00%)~0.72s0.72sp=1.000 n=6
Check Time9.27s (± 0.29%)9.31s (± 0.52%)~9.22s9.36sp=0.076 n=6
Emit Time2.61s (± 0.46%)2.62s (± 0.84%)~2.60s2.66sp=0.800 n=6
Total Time13.97s (± 0.17%)14.01s (± 0.42%)~13.91s14.09sp=0.088 n=6
Monaco - node (v18.15.0, x64)
Memory used347,374k (± 0.01%)347,354k (± 0.01%)~347,332k347,397kp=0.229 n=6
Parse Time2.46s (± 0.17%)2.45s (± 0.26%)-0.01s (- 0.47%)2.44s2.46sp=0.009 n=6
Bind Time0.93s (± 0.44%)0.92s (± 0.56%)~0.92s0.93sp=0.112 n=6
Check Time6.90s (± 0.48%)6.90s (± 0.35%)~6.86s6.92sp=0.685 n=6
Emit Time4.05s (± 0.36%)4.05s (± 0.35%)~4.03s4.07sp=1.000 n=6
Total Time14.34s (± 0.29%)14.32s (± 0.22%)~14.28s14.35sp=0.418 n=6
TFS - node (v18.15.0, x64)
Memory used302,649k (± 0.00%)302,634k (± 0.00%)-16k (- 0.01%)302,621k302,645kp=0.037 n=6
Parse Time2.00s (± 1.08%)2.01s (± 0.94%)~1.99s2.03sp=0.618 n=6
Bind Time1.00s (± 1.09%)0.99s (± 0.55%)~0.99s1.00sp=0.476 n=6
Check Time6.28s (± 0.33%)6.27s (± 0.36%)~6.23s6.29sp=0.466 n=6
Emit Time3.58s (± 0.61%)3.59s (± 0.72%)~3.54s3.61sp=0.328 n=6
Total Time12.86s (± 0.31%)12.86s (± 0.34%)~12.79s12.91sp=1.000 n=6
material-ui - node (v18.15.0, x64)
Memory used506,796k (± 0.00%)506,750k (± 0.00%)-46k (- 0.01%)506,724k506,782kp=0.013 n=6
Parse Time2.58s (± 0.72%)2.58s (± 0.68%)~2.56s2.61sp=0.871 n=6
Bind Time0.99s (± 1.23%)0.99s (± 1.05%)~0.97s1.00sp=1.000 n=6
Check Time16.89s (± 0.56%)16.90s (± 0.55%)~16.76s17.02sp=0.630 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.45s (± 0.41%)20.47s (± 0.45%)~20.31s20.56sp=0.574 n=6
xstate - node (v18.15.0, x64)
Memory used512,813k (± 0.01%)512,846k (± 0.01%)+33k (+ 0.01%)512,806k512,933kp=0.045 n=6
Parse Time3.27s (± 0.32%)3.27s (± 0.36%)~3.26s3.29sp=0.801 n=6
Bind Time1.54s (± 0.54%)1.54s (± 0.36%)~1.53s1.54sp=0.855 n=6
Check Time2.80s (± 0.37%)2.81s (± 0.75%)~2.79s2.84sp=0.871 n=6
Emit Time0.07s (± 0.00%)0.07s (± 5.69%)~0.07s0.08sp=0.405 n=6
Total Time7.69s (± 0.10%)7.69s (± 0.20%)~7.67s7.71sp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,345ms (± 0.82%)2,341ms (± 0.32%)~2,331ms2,352msp=1.000 n=6
Req 2 - geterr5,428ms (± 1.36%)5,452ms (± 1.38%)~5,376ms5,540msp=0.261 n=6
Req 3 - references324ms (± 0.77%)337ms (± 7.47%)~323ms388msp=0.166 n=6
Req 4 - navto276ms (± 1.25%)273ms (± 1.88%)~263ms277msp=0.300 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo89ms (± 6.27%)85ms (± 8.01%)~77ms92msp=0.121 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,492ms (± 0.42%)2,476ms (± 0.76%)~2,448ms2,498msp=0.128 n=6
Req 2 - geterr4,085ms (± 1.59%)4,167ms (± 1.85%)~4,059ms4,231msp=0.128 n=6
Req 3 - references345ms (± 0.62%)338ms (± 1.50%)-7ms (- 2.08%)334ms345msp=0.015 n=6
Req 4 - navto285ms (± 0.34%)285ms (± 1.25%)~282ms292msp=0.618 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo89ms (± 0.71%)83ms (± 7.26%)~77ms89msp=0.059 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,600ms (± 0.56%)2,595ms (± 0.93%)~2,565ms2,619msp=0.872 n=6
Req 2 - geterr1,694ms (± 2.42%)1,697ms (± 2.78%)~1,642ms1,758msp=1.000 n=6
Req 3 - references116ms (± 8.85%)116ms (± 8.82%)~102ms123msp=0.934 n=6
Req 4 - navto365ms (± 0.55%)365ms (± 0.17%)~364ms366msp=0.262 n=6
Req 5 - completionInfo count2,073 (± 0.00%)2,073 (± 0.00%)~2,0732,073p=1.000 n=6
Req 5 - completionInfo307ms (± 1.81%)309ms (± 1.57%)~302ms313msp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time153.09ms (± 0.21%)152.97ms (± 0.18%)-0.12ms (- 0.08%)151.79ms155.66msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time228.58ms (± 0.16%)228.56ms (± 0.19%)~227.36ms241.89msp=0.134 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time229.82ms (± 0.18%)229.83ms (± 0.19%)~228.27ms236.43msp=0.704 n=600
typescript-startup - node (v18.15.0, x64)
Execution time229.50ms (± 0.18%)229.69ms (± 0.18%)+0.19ms (+ 0.08%)228.12ms232.50msp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

Comment threadsrc/compiler/checker.ts
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Milestone BugPRs 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.

5 participants

@weswigham@typescript-bot@jakebailey@gabritto@sandersn