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

Experiment: Produce wide index signatures from the spread of an index signature #56441

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andrewbranch
Copy link
Member

Fixes #56431
Related: #27273 (does not change the behavior of dropping index signatures from the left side of a spread)

This would need a lot more test coverage if it proves viable but wanted to run the top repos first.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 17, 2023
@andrewbranch
Copy link
Member Author

@typescript-bot perf test this
@typescript-bot run dt
@typescript-bot user test this
@typescript-bot test top200

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2023

Heya @andrewbranch, I"ve started to run the diff-based user code test suite on this PR at 85c7e7a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2023

Heya @andrewbranch, I"ve started to run the diff-based top-repos suite on this PR at 85c7e7a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2023

Heya @andrewbranch, I"ve started to run the parallelized Definitely Typed test suite on this PR at 85c7e7a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2023

Heya @andrewbranch, I"ve started to run the regular perf test suite on this PR at 85c7e7a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 2 instances of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

puppeteer

packages/browsers/test/src/tsconfig.json

webpack

tsconfig.types.json

  • [NEW] error TS2345: Argument of type "{ [x: string]: any; _parent: Object; _element: string; type: string; constructor?: Function | undefined; toString?: (() => string) | undefined; toLocaleString?: (() => string) | undefined; valueOf?: (() => Object) | undefined; hasOwnProperty?: ((v: PropertyKey) => boolean) | undefined; isPrototypeOf?: ((v: Object) =..." is not assignable to parameter of type "Object".
  • [MISSING] error TS2345: Argument of type "{ _parent: Object; _element: string; type: string; constructor?: Function | undefined; toString?: (() => string) | undefined; toLocaleString?: (() => string) | undefined; valueOf?: (() => Object) | undefined; hasOwnProperty?: ((v: PropertyKey) => boolean) | undefined; isPrototypeOf?: ((v: Object) => boolean) | undef..." is not assignable to parameter of type "Object".

@typescript-bot
Copy link
Collaborator

@andrewbranch
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,163k (± 0.01%) 295,169k (± 0.02%) ~ 295,081k 295,248k p=0.689 n=6
Parse Time 2.64s (± 0.24%) 2.64s (± 0.68%) ~ 2.61s 2.66s p=0.737 n=6
Bind Time 0.83s (± 0.91%) 0.83s (± 0.76%) ~ 0.82s 0.84s p=0.718 n=6
Check Time 8.06s (± 0.33%) 8.06s (± 0.22%) ~ 8.04s 8.09s p=0.746 n=6
Emit Time 7.07s (± 0.21%) 7.08s (± 0.11%) ~ 7.07s 7.09s p=0.315 n=6
Total Time 18.61s (± 0.21%) 18.61s (± 0.16%) ~ 18.56s 18.65s p=0.871 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 191,680k (± 1.27%) 191,687k (± 1.24%) ~ 190,693k 196,542k p=0.128 n=6
Parse Time 1.36s (± 0.98%) 1.36s (± 0.89%) ~ 1.35s 1.38s p=0.591 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.16s (± 0.38%) 9.16s (± 0.45%) ~ 9.13s 9.24s p=1.000 n=6
Emit Time 2.65s (± 0.73%) 2.64s (± 0.57%) ~ 2.62s 2.66s p=0.279 n=6
Total Time 13.88s (± 0.29%) 13.87s (± 0.30%) ~ 13.83s 13.95s p=0.627 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,349k (± 0.00%) 347,359k (± 0.00%) ~ 347,339k 347,367k p=0.199 n=6
Parse Time 2.45s (± 0.45%) 2.45s (± 0.49%) ~ 2.43s 2.46s p=0.432 n=6
Bind Time 0.92s (± 0.56%) 0.92s (± 0.44%) ~ 0.92s 0.93s p=0.595 n=6
Check Time 6.90s (± 0.30%) 6.92s (± 0.40%) ~ 6.87s 6.94s p=0.168 n=6
Emit Time 4.05s (± 0.43%) 4.05s (± 0.74%) ~ 4.03s 4.11s p=1.000 n=6
Total Time 14.33s (± 0.10%) 14.35s (± 0.30%) ~ 14.31s 14.43s p=0.222 n=6
TFS - node (v18.15.0, x64)
Memory used 302,617k (± 0.01%) 302,634k (± 0.00%) ~ 302,615k 302,650k p=0.092 n=6
Parse Time 1.99s (± 0.75%) 1.99s (± 1.68%) ~ 1.95s 2.03s p=0.747 n=6
Bind Time 1.00s (± 1.09%) 1.00s (± 0.98%) ~ 0.99s 1.02s p=0.718 n=6
Check Time 6.26s (± 0.34%) 6.26s (± 0.30%) ~ 6.24s 6.29s p=0.808 n=6
Emit Time 3.58s (± 0.34%) 3.59s (± 0.52%) ~ 3.58s 3.63s p=0.111 n=6
Total Time 12.82s (± 0.15%) 12.84s (± 0.24%) ~ 12.80s 12.87s p=0.292 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,568k (± 0.00%) 470,584k (± 0.01%) ~ 470,539k 470,630k p=0.575 n=6
Parse Time 2.57s (± 0.77%) 2.58s (± 0.68%) ~ 2.56s 2.61s p=0.324 n=6
Bind Time 0.99s (± 0.76%) 0.99s (± 1.38%) ~ 0.97s 1.01s p=0.672 n=6
Check Time 16.66s (± 0.29%) 16.71s (± 0.50%) ~ 16.62s 16.84s p=0.228 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.21s (± 0.26%) 20.28s (± 0.40%) ~ 20.18s 20.40s p=0.170 n=6
xstate - node (v18.15.0, x64)
Memory used 512,827k (± 0.01%) 512,808k (± 0.01%) ~ 512,771k 512,835k p=0.378 n=6
Parse Time 3.27s (± 0.19%) 3.28s (± 0.32%) ~ 3.26s 3.29s p=0.388 n=6
Bind Time 1.55s (± 0.33%) 1.54s (± 0.68%) ~ 1.53s 1.56s p=0.794 n=6
Check Time 2.85s (± 0.50%) 2.85s (± 0.81%) ~ 2.81s 2.87s p=0.686 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 4.99%) ~ 0.08s 0.09s p=0.405 n=6
Total Time 7.75s (± 0.23%) 7.75s (± 0.37%) ~ 7.70s 7.77s p=0.746 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.61%) 2,361ms (± 0.69%) ~ 2,342ms 2,381ms p=0.630 n=6
Req 2 - geterr 5,400ms (± 1.50%) 5,398ms (± 1.70%) ~ 5,294ms 5,497ms p=1.000 n=6
Req 3 - references 325ms (± 0.75%) 325ms (± 0.79%) ~ 322ms 329ms p=0.629 n=6
Req 4 - navto 277ms (± 1.03%) 277ms (± 1.22%) ~ 273ms 280ms p=1.000 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 (± 6.42%) 85ms (± 5.81%) ~ 80ms 90ms p=0.621 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,494ms (± 0.76%) 2,502ms (± 0.86%) ~ 2,479ms 2,530ms p=0.575 n=6
Req 2 - geterr 4,106ms (± 1.89%) 4,055ms (± 1.49%) ~ 4,016ms 4,177ms p=0.199 n=6
Req 3 - references 338ms (± 1.82%) 342ms (± 1.44%) ~ 332ms 345ms p=0.257 n=6
Req 4 - navto 283ms (± 0.77%) 284ms (± 0.37%) ~ 282ms 285ms p=0.625 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 (± 6.73%) 88ms (± 5.56%) ~ 78ms 90ms p=0.120 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,863ms (± 0.52%) 2,591ms (± 0.36%) ~ 2,580ms 2,601ms p=0.630 n=6
Req 2 - geterr 1,712ms (± 1.94%) 1,716ms (± 1.81%) ~ 1,695ms 1,771ms p=0.575 n=6
Req 3 - references 117ms (± 6.23%) 108ms (± 7.68%) ~ 102ms 122ms p=0.089 n=6
Req 4 - navto 366ms (± 0.61%) 368ms (± 1.56%) ~ 358ms 376ms p=0.513 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 309ms (± 2.34%) 308ms (± 2.66%) ~ 297ms 320ms 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 152.77ms (± 0.18%) 152.71ms (± 0.16%) ~ 151.71ms 154.94ms p=0.053 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.34ms (± 0.16%) 228.13ms (± 0.14%) -0.22ms (- 0.10%) 226.93ms 231.27ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.71ms (± 0.16%) 229.76ms (± 0.19%) ~ 228.04ms 236.99ms p=0.807 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 228.94ms (± 0.18%) 228.70ms (± 0.18%) -0.25ms (- 0.11%) 227.05ms 232.98ms 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

@typescript-bot
Copy link
Collaborator

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

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

ant-design/ant-design

tsconfig.json

  • error TS2322: Type "{ [x: string]: string | boolean; allowClear: true; defaultValue: string; }" is not assignable to type "InputProps".
  • error TS2322: Type "{ [x: string]: { [x: string]: string | number | boolean | string[] | (string & {}) | CSSObject | ArrayCSSInterpolation | Keyframes | Property.Filter[] | ... 1540 more ... | undefined; ... 940 more ...; ":visited"?: CSSObject | undefined; }; }" is not assignable to type "CSSObject".

backstage/backstage

5 of 13 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2322: Type "{ [x: string]: { logLevel: string; } | { logLevel: ExtractorLogLevel.Warning; addToApiReportFile: true; }; default: { logLevel: ExtractorLogLevel.Warning; addToApiReportFile: true; }; }" is not assignable to type "IConfigMessageReportingTable".

ionic-team/ionicons

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2322: Type "{ [x: string]: boolean | undefined; "flip-rtl": boolean; "icon-rtl": boolean; "ion-color"?: boolean | undefined; }" is not assignable to type "string | { [className: string]: boolean; } | undefined".

microsoft/vscode

4 of 54 projects failed to build with the old tsc and were ignored

src/tsconfig.tsec.json

  • error TS2322: Type "{ [x: string]: string | null | undefined; VSCODE_AMD_ENTRYPOINT: string; VSCODE_HANDLES_UNCAUGHT_ERRORS: string; VSCODE_NLS_CONFIG: string; TZ?: string | undefined; }" is not assignable to type "IProcessEnvironment".

recharts/recharts

2 of 3 projects failed to build with the old tsc and were ignored

demo/tsconfig.json

  • error TS2322: Type "{ [x: number]: { hide: true; orientation: any; domain: number[]; originalDomain: (string | number)[]; isCategorical: boolean; layout: LayoutType; type?: "number" | "category"; dataKey?: DataKey<any>; ... 17 more ...; className?: string; }; }" is not assignable to type "AxisMap".

redwoodjs/redwood

50 of 65 projects failed to build with the old tsc and were ignored

packages/router/src/__typetests__/tsconfig.json

vercel/hyper

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2322: Type "{ [x: string]: string | undefined; LANG: string; TERM: string; COLORTERM: string; TERM_PROGRAM: string; TERM_PROGRAM_VERSION: string; TZ?: string | undefined; } | { [x: string]: string; LANG: string; TERM: string; COLORTERM: string; TERM_PROGRAM: string; TERM_PROGRAM_VERSION: string; }" is not assignable to type "Record<string, string>".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object spreading produces wrong type with non-literal keys
2 participants