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

Directly copy only the index signature in addition to declared properties #56626

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

RyanCavanaugh
Copy link
Member

Fixes #56620

Partial revert of #55252

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 30, 2023
@RyanCavanaugh
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

Heya @RyanCavanaugh, I've started to run the diff-based user code test suite (tsserver) on this PR at 8d1b0c0. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

Heya @RyanCavanaugh, I've started to run the diff-based top-repos suite (tsserver) on this PR at 8d1b0c0. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 30, 2023

Hey @RyanCavanaugh, 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/158910/artifacts?artifactName=tgz&fileId=E73A8DD3C899CC17269F7C166FE4B510042E4BD6DF3FE194E76BCC929D1BE5D102&fileName=/typescript-5.4.0-insiders.20231130.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

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

Everything looks good!

@Andarist
Copy link
Contributor

LGTM 😉

@typescript-bot
Copy link
Collaborator

@RyanCavanaugh Here are the results of running the user test suite comparing main and refs/pull/56626/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

@typescript-bot
Copy link
Collaborator

@RyanCavanaugh
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,299k (± 0.01%) 295,348k (± 0.01%) +49k (+ 0.02%) 295,307k 295,430k p=0.020 n=6
Parse Time 2.65s (± 0.28%) 2.65s (± 0.21%) ~ 2.64s 2.65s p=0.476 n=6
Bind Time 0.82s (± 0.99%) 0.82s (± 0.00%) ~ 0.82s 0.82s p=0.405 n=6
Check Time 8.07s (± 0.45%) 8.06s (± 0.21%) ~ 8.04s 8.08s p=0.195 n=6
Emit Time 7.08s (± 0.34%) 7.08s (± 0.55%) ~ 7.05s 7.15s p=0.681 n=6
Total Time 18.63s (± 0.21%) 18.61s (± 0.15%) ~ 18.58s 18.66s p=0.517 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 195,143k (± 1.53%) 194,160k (± 1.63%) ~ 191,238k 197,118k p=0.298 n=6
Parse Time 1.36s (± 0.90%) 1.36s (± 0.77%) ~ 1.35s 1.38s p=0.183 n=6
Bind Time 0.72s (± 0.57%) 0.72s (± 0.71%) ~ 0.72s 0.73s p=0.595 n=6
Check Time 9.22s (± 0.44%) 9.21s (± 0.48%) ~ 9.15s 9.27s p=0.687 n=6
Emit Time 2.61s (± 0.45%) 2.61s (± 0.97%) ~ 2.58s 2.64s p=0.935 n=6
Total Time 13.91s (± 0.31%) 13.91s (± 0.30%) ~ 13.86s 13.96s p=1.000 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,359k (± 0.00%) 347,312k (± 0.01%) -47k (- 0.01%) 347,277k 347,346k p=0.013 n=6
Parse Time 2.46s (± 0.47%) 2.46s (± 0.33%) ~ 2.45s 2.47s p=0.498 n=6
Bind Time 0.92s (± 0.59%) 0.93s (± 0.56%) ~ 0.92s 0.93s p=0.640 n=6
Check Time 6.88s (± 0.38%) 6.85s (± 0.25%) ~ 6.83s 6.87s p=0.104 n=6
Emit Time 4.05s (± 0.41%) 4.04s (± 0.34%) ~ 4.03s 4.07s p=0.506 n=6
Total Time 14.31s (± 0.24%) 14.28s (± 0.20%) ~ 14.24s 14.32s p=0.075 n=6
TFS - node (v18.15.0, x64)
Memory used 302,639k (± 0.01%) 302,597k (± 0.00%) -42k (- 0.01%) 302,572k 302,608k p=0.005 n=6
Parse Time 1.99s (± 0.61%) 1.99s (± 0.90%) ~ 1.96s 2.01s p=0.864 n=6
Bind Time 1.01s (± 0.83%) 1.00s (± 0.41%) ~ 1.00s 1.01s p=0.527 n=6
Check Time 6.29s (± 0.31%) 6.26s (± 0.37%) ~ 6.23s 6.29s p=0.102 n=6
Emit Time 3.58s (± 0.65%) 3.59s (± 0.55%) ~ 3.55s 3.60s p=0.870 n=6
Total Time 12.87s (± 0.38%) 12.84s (± 0.33%) ~ 12.77s 12.89s p=0.226 n=6
material-ui - node (v18.15.0, x64)
Memory used 506,817k (± 0.00%) 506,821k (± 0.01%) ~ 506,794k 506,856k p=1.000 n=6
Parse Time 2.57s (± 0.48%) 2.58s (± 0.58%) ~ 2.57s 2.61s p=0.357 n=6
Bind Time 0.99s (± 0.64%) 0.99s (± 1.18%) ~ 0.98s 1.01s p=1.000 n=6
Check Time 16.87s (± 0.41%) 16.88s (± 0.60%) ~ 16.73s 16.99s 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 20.43s (± 0.35%) 20.45s (± 0.51%) ~ 20.31s 20.58s p=0.810 n=6
xstate - node (v18.15.0, x64)
Memory used 512,654k (± 0.02%) 512,691k (± 0.01%) ~ 512,589k 512,755k p=0.471 n=6
Parse Time 3.28s (± 0.25%) 3.28s (± 0.00%) ~ 3.28s 3.28s p=0.290 n=6
Bind Time 1.54s (± 0.49%) 1.54s (± 0.34%) ~ 1.53s 1.54s p=0.241 n=6
Check Time 2.81s (± 0.77%) 2.79s (± 0.32%) ~ 2.78s 2.80s p=0.061 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 7.71s (± 0.44%) 7.69s (± 0.11%) ~ 7.68s 7.70s p=0.294 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,349ms (± 0.65%) 2,344ms (± 0.50%) ~ 2,331ms 2,359ms p=0.574 n=6
Req 2 - geterr 5,417ms (± 1.30%) 5,465ms (± 1.30%) ~ 5,365ms 5,531ms p=0.230 n=6
Req 3 - references 324ms (± 1.69%) 326ms (± 1.22%) ~ 323ms 332ms p=0.288 n=6
Req 4 - navto 278ms (± 1.21%) 276ms (± 1.25%) ~ 273ms 280ms p=0.295 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 84ms (± 5.38%) 88ms (± 7.85%) ~ 79ms 97ms p=0.676 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,486ms (± 1.15%) 2,460ms (± 0.92%) ~ 2,423ms 2,482ms p=0.230 n=6
Req 2 - geterr 4,112ms (± 1.76%) 4,117ms (± 1.96%) ~ 4,052ms 4,225ms p=0.936 n=6
Req 3 - references 342ms (± 1.69%) 343ms (± 1.40%) ~ 334ms 347ms p=0.683 n=6
Req 4 - navto 285ms (± 0.36%) 284ms (± 0.26%) ~ 283ms 285ms p=0.155 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 86ms (± 6.77%) 87ms (± 5.86%) ~ 77ms 90ms p=1.000 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,612ms (± 0.32%) 2,602ms (± 0.74%) ~ 2,576ms 2,619ms p=0.423 n=6
Req 2 - geterr 1,712ms (± 1.71%) 1,682ms (± 2.82%) ~ 1,628ms 1,737ms p=0.298 n=6
Req 3 - references 112ms (± 9.75%) 116ms (± 9.46%) ~ 102ms 124ms p=0.410 n=6
Req 4 - navto 365ms (± 0.28%) 366ms (± 1.45%) ~ 362ms 376ms p=0.743 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 313ms (± 1.96%) 308ms (± 2.71%) ~ 298ms 318ms p=0.295 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.20%) 152.67ms (± 0.18%) -0.09ms (- 0.06%) 151.65ms 155.27ms p=0.015 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.18ms (± 0.14%) 228.13ms (± 0.17%) -0.06ms (- 0.02%) 226.80ms 237.35ms p=0.009 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.71ms (± 0.18%) 229.54ms (± 0.19%) -0.17ms (- 0.07%) 227.75ms 235.91ms p=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.17ms (± 0.17%) 229.35ms (± 0.20%) +0.17ms (+ 0.08%) 227.85ms 238.16ms 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 @RyanCavanaugh, the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

calcom/cal.com Raw error text: RepoResults7/calcom.cal.com.rawError.txt in the artifact folder

Last few requests

{"seq":780,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/apps/web/abTest/middlewareFactory.ts","projectRootPath":"@PROJECT_ROOT@"}]}}
{"seq":781,"type":"request","command":"organizeImports","arguments":{"scope":{"type":"file","args":{"file":"@PROJECT_ROOT@/apps/web/abTest/middlewareFactory.ts"}},"skipDestructiveCodeActions":false}}
{"seq":782,"type":"request","command":"getOutliningSpans","arguments":{"file":"@PROJECT_ROOT@/apps/web/abTest/middlewareFactory.ts"}}
{"seq":783,"type":"request","command":"navto","arguments":{"searchValue":"a","maxResultCount":256}}

Repro steps

  1. git clone https://github.com/calcom/cal.com --recurse-submodules
  2. In dir cal.com, run git reset --hard b840b3b1bbf7b8be3d51c82060f733dbb26632d0
  3. In dir cal.com, run yarn install --no-immutable --mode=skip-build
  4. Back in the initial folder, download RepoResults7/calcom.cal.com.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./cal.com ./calcom.cal.com.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@RyanCavanaugh
Copy link
Member Author

Added tests from new reports

@RyanCavanaugh
Copy link
Member Author

CI hit a network error 🙄

Copy link
Member

@gabritto gabritto left a comment

Choose a reason for hiding this comment

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

This certainly fixes the issue and doesn't cause a regression on #55251.

I find it a bit unsatisfying that we don't copy all symbols like the comment points out though, and instead have to specifically copy index symbols.
I have half an idea that we could be copying all the symbols and modify addInheritedMembers to account for the type (parameter) problem by merging symbols.

@RyanCavanaugh RyanCavanaugh merged commit 8456dcc into microsoft:main Dec 7, 2023
@RyanCavanaugh
Copy link
Member Author

@typescript-bot cherry-pick this to release-5.3

@typescript-bot
Copy link
Collaborator

Heya @RyanCavanaugh, I've started to cherry-pick this into release-5.3 for you. Here's the link to my best guess at the log.

@typescript-bot
Copy link
Collaborator

Hey @RyanCavanaugh, I've created #56709 for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Backlog Bug PRs that fix a backlog bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Property disappears when matching type parameter name in subclass
5 participants