Skip to content

Fix(50751): Undefined entity with immediate and prototype expression causing crash #52646

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

navya9singh
Copy link
Member

Fixes #50751

@navya9singh navya9singh requested a review from sandersn February 7, 2023 01:10
@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 7, 2023
jakebailey
jakebailey previously approved these changes Feb 7, 2023
Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

@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

@@ -3340,6 +3341,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
}
});
}
if (isPrototypeProperty && namespaceSymbol && namespaceSymbol.valueDeclaration) {
if (isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) containerIsClass = false;
Copy link
Member

Choose a reason for hiding this comment

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

Nit, but:

Suggested change
if (isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) containerIsClass = false;
if (isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) {
containerIsClass = false;
}

In general my impression is that we avoid one-liner things like this unless they are just return or break or something

Copy link
Member

@DanielRosenwasser DanielRosenwasser Feb 8, 2023

Choose a reason for hiding this comment

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

Also consider just smushing the two ifs together.

@jakebailey jakebailey dismissed their stale review February 7, 2023 18:59

I clicked the wrong button

@jakebailey
Copy link
Member

Well, I guess the bot doesn't read the "main" review comment.

@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
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

Heya @jakebailey, I've started to run the extended test suite on this PR at 01e9982. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 7, 2023

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

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

1 similar comment
@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

Heya @jakebailey, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..52646
Metric main 52646 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 359,797k (± 0.02%) 359,823k (± 0.02%) ~ 359,760k 359,926k p=0.230 n=6
Parse Time 3.93s (± 0.90%) 3.93s (± 0.80%) ~ 3.89s 3.98s p=1.000 n=6
Bind Time 1.17s (± 0.64%) 1.18s (± 0.64%) ~ 1.17s 1.19s p=0.195 n=6
Check Time 8.71s (± 0.72%) 8.69s (± 0.26%) ~ 8.67s 8.72s p=0.747 n=6
Emit Time 7.61s (± 0.87%) 7.59s (± 0.71%) ~ 7.53s 7.68s p=0.518 n=6
Total Time 21.42s (± 0.68%) 21.38s (± 0.12%) ~ 21.35s 21.42s p=0.378 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 193,220k (± 1.19%) 193,219k (± 1.20%) ~ 192,197k 197,941k p=1.000 n=6
Parse Time 1.63s (± 1.32%) 1.64s (± 1.46%) ~ 1.59s 1.65s p=0.932 n=6
Bind Time 0.80s (± 0.65%) 0.79s (± 0.65%) ~ 0.79s 0.80s p=0.311 n=6
Check Time 9.75s (± 0.52%) 9.71s (± 0.11%) ~ 9.70s 9.72s p=0.357 n=6
Emit Time 2.80s (± 1.01%) 2.79s (± 0.74%) ~ 2.75s 2.81s p=0.468 n=6
Total Time 14.98s (± 0.46%) 14.93s (± 0.23%) ~ 14.88s 14.97s p=0.261 n=6
Monaco - node (v18.10.0, x64)
Memory used 343,965k (± 0.01%) 343,961k (± 0.01%) ~ 343,919k 343,999k p=1.000 n=6
Parse Time 2.94s (± 0.84%) 2.91s (± 0.91%) ~ 2.86s 2.93s p=0.124 n=6
Bind Time 1.04s (± 1.32%) 1.03s (± 0.87%) ~ 1.02s 1.04s p=0.452 n=6
Check Time 7.07s (± 0.47%) 7.01s (± 0.47%) -0.06s (- 0.85%) 6.98s 7.07s p=0.024 n=6
Emit Time 4.33s (± 1.22%) 4.31s (± 0.60%) ~ 4.28s 4.35s p=0.520 n=6
Total Time 15.37s (± 0.45%) 15.26s (± 0.40%) -0.11s (- 0.69%) 15.18s 15.35s p=0.029 n=6
TFS - node (v18.10.0, x64)
Memory used 300,377k (± 0.01%) 300,364k (± 0.01%) ~ 300,336k 300,388k p=0.423 n=6
Parse Time 2.27s (± 1.71%) 2.28s (± 0.51%) ~ 2.27s 2.30s p=0.517 n=6
Bind Time 1.17s (± 0.44%) 1.17s (± 0.64%) ~ 1.16s 1.18s p=0.241 n=6
Check Time 6.54s (± 0.65%) 6.53s (± 0.43%) ~ 6.50s 6.56s p=0.567 n=6
Emit Time 3.93s (± 1.01%) 3.90s (± 0.86%) ~ 3.87s 3.95s p=0.255 n=6
Total Time 13.92s (± 0.51%) 13.89s (± 0.28%) ~ 13.82s 13.93s p=0.806 n=6
material-ui - node (v18.10.0, x64)
Memory used 476,782k (± 0.01%) 476,760k (± 0.01%) ~ 476,705k 476,792k p=0.298 n=6
Parse Time 3.53s (± 0.46%) 3.52s (± 0.43%) ~ 3.49s 3.53s p=0.462 n=6
Bind Time 0.97s (± 0.53%) 0.97s (± 0.84%) ~ 0.96s 0.98s p=0.929 n=6
Check Time 17.12s (± 0.55%) 17.22s (± 0.64%) ~ 17.11s 17.43s p=0.128 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.61s (± 0.38%) 21.71s (± 0.55%) ~ 21.60s 21.94s p=0.296 n=6
xstate - node (v18.10.0, x64)
Memory used 549,092k (± 0.03%) 549,038k (± 0.01%) ~ 548,934k 549,143k p=0.471 n=6
Parse Time 4.58s (± 0.67%) 4.57s (± 0.39%) ~ 4.54s 4.59s p=0.373 n=6
Bind Time 1.71s (± 1.26%) 1.70s (± 1.21%) ~ 1.69s 1.73s p=0.276 n=6
Check Time 2.81s (± 0.54%) 2.82s (± 0.96%) ~ 2.78s 2.86s p=0.517 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 4.99%) ~ 0.08s 0.09s p=0.405 n=6
Total Time 9.20s (± 0.25%) 9.18s (± 0.09%) ~ 9.16s 9.18s p=0.087 n=6
Angular - node (v16.17.1, x64)
Memory used 359,144k (± 0.01%) 359,169k (± 0.01%) ~ 359,131k 359,192k p=0.093 n=6
Parse Time 4.17s (± 0.45%) 4.16s (± 0.28%) ~ 4.15s 4.18s p=0.451 n=6
Bind Time 1.24s (± 0.41%) 1.23s (± 0.61%) -0.01s (- 0.94%) 1.22s 1.24s p=0.020 n=6
Check Time 9.49s (± 0.19%) 9.47s (± 0.39%) ~ 9.42s 9.52s p=0.420 n=6
Emit Time 8.06s (± 0.35%) 8.06s (± 0.46%) ~ 8.00s 8.10s p=1.000 n=6
Total Time 22.96s (± 0.23%) 22.92s (± 0.24%) ~ 22.84s 22.99s p=0.229 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,814k (± 0.04%) 193,846k (± 0.08%) ~ 193,565k 193,954k p=0.471 n=6
Parse Time 1.80s (± 0.93%) 1.80s (± 0.58%) ~ 1.79s 1.82s p=0.405 n=6
Bind Time 0.84s (± 0.00%) 0.84s (± 0.48%) ~ 0.84s 0.85s p=0.405 n=6
Check Time 10.42s (± 0.35%) 10.44s (± 0.41%) ~ 10.36s 10.48s p=0.470 n=6
Emit Time 3.10s (± 4.70%) 3.11s (± 4.50%) ~ 3.03s 3.39s p=0.808 n=6
Total Time 16.17s (± 1.07%) 16.19s (± 0.86%) ~ 16.07s 16.46s p=0.748 n=6
Monaco - node (v16.17.1, x64)
Memory used 343,232k (± 0.01%) 343,240k (± 0.01%) ~ 343,206k 343,292k p=0.689 n=6
Parse Time 3.14s (± 1.50%) 3.12s (± 1.35%) ~ 3.08s 3.19s p=0.373 n=6
Bind Time 1.11s (± 1.51%) 1.11s (± 0.57%) ~ 1.10s 1.12s p=0.720 n=6
Check Time 7.73s (± 0.25%) 7.72s (± 0.33%) ~ 7.70s 7.77s p=0.114 n=6
Emit Time 4.54s (± 0.46%) 4.50s (± 0.49%) -0.03s (- 0.74%) 4.47s 4.53s p=0.041 n=6
Total Time 16.51s (± 0.50%) 16.44s (± 0.43%) ~ 16.39s 16.58s p=0.065 n=6
TFS - node (v16.17.1, x64)
Memory used 299,706k (± 0.01%) 299,712k (± 0.01%) ~ 299,698k 299,736k p=0.810 n=6
Parse Time 2.46s (± 0.99%) 2.47s (± 1.09%) ~ 2.44s 2.51s p=0.677 n=6
Bind Time 1.26s (± 0.82%) 1.26s (± 1.27%) ~ 1.25s 1.29s p=0.735 n=6
Check Time 7.21s (± 0.39%) 7.22s (± 0.35%) ~ 7.19s 7.26s p=1.000 n=6
Emit Time 4.22s (± 0.21%) 4.23s (± 0.68%) ~ 4.20s 4.28s p=0.934 n=6
Total Time 15.15s (± 0.23%) 15.17s (± 0.14%) ~ 15.15s 15.21s p=0.145 n=6
material-ui - node (v16.17.1, x64)
Memory used 476,012k (± 0.01%) 476,024k (± 0.00%) ~ 475,987k 476,045k p=0.689 n=6
Parse Time 3.68s (± 0.14%) 3.67s (± 0.22%) -0.01s (- 0.27%) 3.66s 3.68s p=0.050 n=6
Bind Time 1.02s (± 0.40%) 1.02s (± 0.50%) ~ 1.02s 1.03s p=0.114 n=6
Check Time 18.21s (± 0.67%) 18.24s (± 0.21%) ~ 18.20s 18.31s p=0.378 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.91s (± 0.54%) 22.93s (± 0.19%) ~ 22.88s 23.00s p=0.520 n=6
xstate - node (v16.17.1, x64)
Memory used 546,665k (± 0.01%) 546,626k (± 0.02%) ~ 546,541k 546,776k p=0.378 n=6
Parse Time 4.77s (± 0.22%) 4.78s (± 0.37%) ~ 4.76s 4.80s p=0.167 n=6
Bind Time 1.84s (± 0.28%) 1.84s (± 0.30%) ~ 1.84s 1.85s p=0.640 n=6
Check Time 3.06s (± 0.65%) 3.07s (± 0.69%) ~ 3.04s 3.10s p=0.466 n=6
Emit Time 0.09s (± 4.45%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=0.405 n=6
Total Time 9.76s (± 0.29%) 9.79s (± 0.29%) ~ 9.76s 9.84s p=0.260 n=6
Angular - node (v14.15.1, x64)
Memory used 352,818k (± 0.01%) 352,795k (± 0.00%) ~ 352,772k 352,811k p=0.229 n=6
Parse Time 4.23s (± 0.35%) 4.21s (± 0.29%) ~ 4.20s 4.23s p=0.102 n=6
Bind Time 1.28s (± 0.80%) 1.28s (± 0.32%) ~ 1.28s 1.29s p=0.924 n=6
Check Time 9.74s (± 0.71%) 9.75s (± 0.56%) ~ 9.69s 9.81s p=0.808 n=6
Emit Time 8.37s (± 0.54%) 8.37s (± 0.70%) ~ 8.29s 8.42s p=0.936 n=6
Total Time 23.61s (± 0.42%) 23.61s (± 0.39%) ~ 23.47s 23.75s p=1.000 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 188,784k (± 0.05%) 188,748k (± 0.01%) ~ 188,720k 188,773k p=0.810 n=6
Parse Time 1.83s (± 0.41%) 1.83s (± 0.82%) ~ 1.81s 1.84s p=0.737 n=6
Bind Time 0.87s (± 0.97%) 0.87s (± 0.94%) ~ 0.86s 0.88s p=0.718 n=6
Check Time 10.50s (± 0.59%) 10.50s (± 0.36%) ~ 10.44s 10.55s p=0.747 n=6
Emit Time 3.39s (± 3.89%) 3.47s (± 0.88%) ~ 3.42s 3.50s p=0.196 n=6
Total Time 16.59s (± 1.03%) 16.66s (± 0.36%) ~ 16.59s 16.72s p=0.810 n=6
Monaco - node (v14.15.1, x64)
Memory used 337,993k (± 0.00%) 337,996k (± 0.00%) ~ 337,977k 338,013k p=0.747 n=6
Parse Time 3.20s (± 0.67%) 3.21s (± 1.08%) ~ 3.17s 3.26s p=0.571 n=6
Bind Time 1.11s (± 0.46%) 1.12s (± 0.88%) ~ 1.11s 1.13s p=0.417 n=6
Check Time 8.11s (± 0.56%) 8.07s (± 0.37%) ~ 8.03s 8.10s p=0.127 n=6
Emit Time 4.80s (± 0.83%) 4.81s (± 1.61%) ~ 4.73s 4.95s p=0.747 n=6
Total Time 17.23s (± 0.34%) 17.20s (± 0.57%) ~ 17.14s 17.40s p=0.199 n=6
TFS - node (v14.15.1, x64)
Memory used 294,575k (± 0.01%) 294,578k (± 0.00%) ~ 294,553k 294,591k p=0.575 n=6
Parse Time 2.74s (± 0.68%) 2.73s (± 0.46%) ~ 2.71s 2.74s p=0.191 n=6
Bind Time 1.11s (± 0.95%) 1.12s (± 1.08%) ~ 1.11s 1.14s p=0.122 n=6
Check Time 7.51s (± 0.47%) 7.54s (± 0.52%) ~ 7.49s 7.59s p=0.517 n=6
Emit Time 4.63s (± 1.03%) 4.62s (± 0.42%) ~ 4.59s 4.64s p=0.936 n=6
Total Time 15.99s (± 0.44%) 16.01s (± 0.26%) ~ 15.96s 16.06s p=0.573 n=6
material-ui - node (v14.15.1, x64)
Memory used 471,622k (± 0.00%) 471,601k (± 0.00%) ~ 471,584k 471,631k p=0.107 n=6
Parse Time 3.88s (± 0.72%) 3.86s (± 0.41%) ~ 3.85s 3.89s p=0.357 n=6
Bind Time 1.05s (± 0.00%) 1.05s (± 0.60%) ~ 1.04s 1.06s p=1.000 n=6
Check Time 19.14s (± 0.77%) 19.05s (± 0.51%) ~ 18.94s 19.22s 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 24.07s (± 0.57%) 23.96s (± 0.44%) ~ 23.83s 24.13s p=0.173 n=6
xstate - node (v14.15.1, x64)
Memory used 534,749k (± 0.00%) 534,737k (± 0.01%) ~ 534,692k 534,782k p=0.630 n=6
Parse Time 5.12s (± 0.82%) 5.14s (± 0.73%) ~ 5.09s 5.19s p=0.520 n=6
Bind Time 1.71s (± 0.60%) 1.71s (± 0.48%) ~ 1.70s 1.72s p=0.932 n=6
Check Time 3.13s (± 0.48%) 3.13s (± 0.31%) ~ 3.12s 3.14s p=1.000 n=6
Emit Time 0.10s (± 4.01%) 0.10s (± 0.00%) ~ 0.10s 0.10s p=0.405 n=6
Total Time 10.06s (± 0.36%) 10.08s (± 0.47%) ~ 10.01s 10.14s p=0.574 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 52646 6
Baseline main 6

TSServer

Comparison Report - main..52646
Metric main 52646 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,496ms (± 1.28%) 2,499ms (± 1.95%) ~ 2,461ms 2,597ms p=1.000 n=6
Req 2 - geterr 5,511ms (± 0.57%) 5,518ms (± 0.70%) ~ 5,453ms 5,553ms p=0.575 n=6
Req 3 - references 370ms (± 1.13%) 369ms (± 1.42%) ~ 364ms 379ms p=0.462 n=6
Req 4 - navto 284ms (± 0.99%) 285ms (± 0.53%) ~ 282ms 286ms p=0.625 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 73ms (± 1.03%) 73ms (± 1.15%) ~ 71ms 73ms p=0.209 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,739ms (± 0.79%) 2,770ms (± 0.48%) +31ms (+ 1.13%) 2,752ms 2,793ms p=0.024 n=6
Req 2 - geterr 4,059ms (± 0.64%) 4,036ms (± 0.38%) ~ 4,015ms 4,054ms p=0.092 n=6
Req 3 - references 368ms (± 0.72%) 369ms (± 0.63%) ~ 365ms 371ms p=0.511 n=6
Req 4 - navto 293ms (± 0.88%) 291ms (± 0.60%) ~ 290ms 294ms p=0.413 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 66ms (± 0.79%) 66ms (± 1.14%) ~ 65ms 67ms p=0.241 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,490ms (± 0.82%) 3,479ms (± 0.60%) ~ 3,464ms 3,520ms p=0.230 n=6
Req 2 - geterr 1,648ms (± 0.66%) 1,651ms (± 0.76%) ~ 1,634ms 1,668ms p=0.468 n=6
Req 3 - references 104ms (± 1.05%) 105ms (± 1.44%) ~ 103ms 107ms p=0.457 n=6
Req 4 - navto 355ms (± 0.53%) 356ms (± 0.61%) ~ 353ms 359ms p=0.517 n=6
Req 5 - completionInfo count 3,175 (± 0.00%) 3,175 (± 0.00%) ~ 3,175 3,175 p=1.000 n=6
Req 5 - completionInfo 450ms (± 0.90%) 450ms (± 0.97%) ~ 443ms 456ms p=0.872 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,770ms (± 0.58%) 2,757ms (± 1.07%) ~ 2,700ms 2,781ms p=0.575 n=6
Req 2 - geterr 5,930ms (± 0.53%) 5,915ms (± 0.45%) ~ 5,879ms 5,946ms p=0.630 n=6
Req 3 - references 377ms (± 0.76%) 376ms (± 1.12%) ~ 371ms 382ms p=0.519 n=6
Req 4 - navto 277ms (± 0.91%) 279ms (± 0.85%) ~ 276ms 282ms p=0.141 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 79ms (± 2.70%) 81ms (± 4.23%) ~ 77ms 85ms p=0.292 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,924ms (± 0.37%) 2,924ms (± 0.46%) ~ 2,906ms 2,944ms p=1.000 n=6
Req 2 - geterr 4,412ms (± 0.53%) 4,424ms (± 0.56%) ~ 4,385ms 4,461ms p=0.575 n=6
Req 3 - references 382ms (± 1.07%) 380ms (± 1.19%) ~ 376ms 387ms p=0.572 n=6
Req 4 - navto 287ms (± 0.56%) 286ms (± 1.03%) ~ 282ms 290ms p=0.805 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 71ms (± 0.57%) 71ms (± 0.57%) ~ 71ms 72ms p=1.000 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,626ms (± 0.35%) 3,626ms (± 0.28%) ~ 3,615ms 3,642ms p=1.000 n=6
Req 2 - geterr 1,825ms (± 1.51%) 1,822ms (± 1.06%) ~ 1,793ms 1,840ms p=1.000 n=6
Req 3 - references 113ms (± 1.42%) 113ms (± 1.89%) ~ 109ms 115ms p=0.549 n=6
Req 4 - navto 344ms (± 1.02%) 344ms (± 1.08%) ~ 340ms 348ms p=0.466 n=6
Req 5 - completionInfo count 3,175 (± 0.00%) 3,175 (± 0.00%) ~ 3,175 3,175 p=1.000 n=6
Req 5 - completionInfo 457ms (± 0.99%) 456ms (± 1.40%) ~ 450ms 465ms p=0.630 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,884ms (± 0.28%) 2,886ms (± 0.15%) ~ 2,880ms 2,892ms p=0.688 n=6
Req 2 - geterr 6,277ms (± 0.73%) 6,247ms (± 0.49%) ~ 6,211ms 6,287ms p=0.378 n=6
Req 3 - references 391ms (± 0.53%) 389ms (± 0.49%) ~ 386ms 391ms p=0.251 n=6
Req 4 - navto 280ms (± 1.31%) 282ms (± 1.82%) ~ 277ms 289ms p=0.935 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 99ms (± 1.69%) 98ms (± 5.14%) ~ 88ms 101ms p=0.683 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,038ms (± 0.96%) 3,056ms (± 0.81%) ~ 3,026ms 3,086ms p=0.378 n=6
Req 2 - geterr 4,695ms (± 0.40%) 4,660ms (± 1.74%) ~ 4,499ms 4,715ms p=0.575 n=6
Req 3 - references 404ms (± 0.43%) 414ms (± 5.22%) ~ 403ms 458ms p=0.567 n=6
Req 4 - navto 293ms (± 1.30%) 293ms (± 1.58%) ~ 286ms 300ms p=0.744 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 82ms (± 3.84%) 86ms (± 6.53%) ~ 79ms 94ms p=0.411 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,955ms (± 0.60%) 3,947ms (± 0.99%) ~ 3,901ms 3,986ms p=0.575 n=6
Req 2 - geterr 1,776ms (± 1.68%) 1,839ms (± 1.25%) +63ms (+ 3.54%) 1,795ms 1,864ms p=0.008 n=6
Req 3 - references 133ms (± 1.99%) 127ms (± 1.68%) 🟩-7ms (- 4.88%) 123ms 129ms p=0.005 n=6
Req 4 - navto 375ms (± 0.95%) 373ms (± 1.17%) ~ 364ms 375ms p=0.250 n=6
Req 5 - completionInfo count 3,175 (± 0.00%) 3,175 (± 0.00%) ~ 3,175 3,175 p=1.000 n=6
Req 5 - completionInfo 470ms (± 2.40%) 468ms (± 1.87%) ~ 456ms 479ms p=0.687 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 52646 6
Baseline main 6

Startup

Comparison Report - main..52646
Metric main 52646 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.53ms (± 0.21%) 142.30ms (± 0.22%) -0.23ms (- 0.16%) 141.44ms 147.83ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 227.47ms (± 0.18%) 227.76ms (± 0.37%) ~ 225.52ms 234.06ms p=0.346 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 228.98ms (± 0.13%) 228.69ms (± 0.21%) -0.29ms (- 0.13%) 227.27ms 233.84ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 209.74ms (± 0.15%) 209.11ms (± 0.19%) -0.63ms (- 0.30%) 208.15ms 216.27ms 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 52646 6
Baseline main 6

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

apache/echarts

⚠️ Note that built also had errors ⚠️
Req #21819 - completionInfo
    at getTextOfPropertyName (/typescript-main/built/local/tsserver.js:15718:16)
    at Object.getMemberOverrideModifierStatus (/typescript-main/built/local/tsserver.js:81896:51)
    at /typescript-main/built/local/tsserver.js:148391:43
    at Object.addNewNodeForMemberSymbol (/typescript-main/built/local/tsserver.js:145949:7)
    at getEntryForMemberCompletion (/typescript-main/built/local/tsserver.js:148372:22)
    at createCompletionEntry (/typescript-main/built/local/tsserver.js:148269:64)
    at getCompletionEntriesFromSymbols (/typescript-main/built/local/tsserver.js:148808:19)
    at completionInfoFromData (/typescript-main/built/local/tsserver.js:147936:23)
    at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:147758:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:134880:35)
    at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:178378:54)
    at completionInfo (/typescript-main/built/local/tsserver.js:176789:43)
    at /typescript-main/built/local/tsserver.js:179142:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179134:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179142:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179184:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180728:14)
Req #21819 - completionInfo
    at getTextOfPropertyName (/typescript-52646/built/local/tsserver.js:15718:16)
    at Object.getMemberOverrideModifierStatus (/typescript-52646/built/local/tsserver.js:81900:51)
    at /typescript-52646/built/local/tsserver.js:148395:43
    at Object.addNewNodeForMemberSymbol (/typescript-52646/built/local/tsserver.js:145953:7)
    at getEntryForMemberCompletion (/typescript-52646/built/local/tsserver.js:148376:22)
    at createCompletionEntry (/typescript-52646/built/local/tsserver.js:148273:64)
    at getCompletionEntriesFromSymbols (/typescript-52646/built/local/tsserver.js:148812:19)
    at completionInfoFromData (/typescript-52646/built/local/tsserver.js:147940:23)
    at Object.getCompletionsAtPosition (/typescript-52646/built/local/tsserver.js:147762:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-52646/built/local/tsserver.js:134884:35)
    at IOSession.getCompletions (/typescript-52646/built/local/tsserver.js:178382:54)
    at completionInfo (/typescript-52646/built/local/tsserver.js:176793:43)
    at /typescript-52646/built/local/tsserver.js:179146:69
    at IOSession.executeWithRequestId (/typescript-52646/built/local/tsserver.js:179138:14)
    at IOSession.executeCommand (/typescript-52646/built/local/tsserver.js:179146:29)
    at IOSession.onMessage (/typescript-52646/built/local/tsserver.js:179188:51)
    at Interface.<anonymous> (/typescript-52646/built/local/tsserver.js:180732:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults1/apache.echarts.rawError.txt in the artifact folder

Last few requests

{"seq":21816,"type":"request","command":"getOutliningSpans","arguments":{"file":"@PROJECT_ROOT@/src/chart/themeRiver/ThemeRiverSeries.ts"}}
{"seq":21817,"type":"request","command":"updateOpen","arguments":{"changedFiles":[{"fileName":"@PROJECT_ROOT@/src/chart/themeRiver/ThemeRiverSeries.ts","textChanges":[{"newText":" //comment","start":{"line":1,"offset":3},"end":{"line":1,"offset":3}}]}],"closedFiles":[],"openFiles":[]}}
{"seq":21818,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/chart/themeRiver/ThemeRiverSeries.ts","line":6,"offset":26,"includeExternalModuleExports":false,"triggerKind":2,"triggerCharacter":" "}}
{"seq":21819,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/chart/themeRiver/ThemeRiverSeries.ts","line":89,"offset":30,"includeExternalModuleExports":false,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/apache/echarts --recurse-submodules
  2. In dir echarts, run git reset --hard 8120aaba4b523e8dee1aca0f8089d36c5096f0e5
  3. Back in the initial folder, download RepoResults1/apache.echarts.replay.txt from the artifact folder
  4. npm install --no-save @typescript/server-replay
  5. npx tsreplay ./echarts ./apache.echarts.replay.txt path/to/tsserver.js
  6. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

babel/babel

⚠️ Note that built also had errors ⚠️
Req #1027 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-main/built/local/tsserver.js:140793:13)
    at /typescript-main/built/local/tsserver.js:146513:38
    at importSymbols (/typescript-main/built/local/tsserver.js:146513:11)
    at Object.addNewNodeForMemberSymbol (/typescript-main/built/local/tsserver.js:145946:11)
    at getEntryForMemberCompletion (/typescript-main/built/local/tsserver.js:148372:22)
    at createCompletionEntry (/typescript-main/built/local/tsserver.js:148269:64)
    at getCompletionEntriesFromSymbols (/typescript-main/built/local/tsserver.js:148808:19)
    at completionInfoFromData (/typescript-main/built/local/tsserver.js:147936:23)
    at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:147758:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:134880:35)
    at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:178378:54)
    at completionInfo (/typescript-main/built/local/tsserver.js:176789:43)
    at /typescript-main/built/local/tsserver.js:179142:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179134:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179142:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179184:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180728:14)
Req #1027 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-52646/built/local/tsserver.js:140797:13)
    at /typescript-52646/built/local/tsserver.js:146517:38
    at importSymbols (/typescript-52646/built/local/tsserver.js:146517:11)
    at Object.addNewNodeForMemberSymbol (/typescript-52646/built/local/tsserver.js:145950:11)
    at getEntryForMemberCompletion (/typescript-52646/built/local/tsserver.js:148376:22)
    at createCompletionEntry (/typescript-52646/built/local/tsserver.js:148273:64)
    at getCompletionEntriesFromSymbols (/typescript-52646/built/local/tsserver.js:148812:19)
    at completionInfoFromData (/typescript-52646/built/local/tsserver.js:147940:23)
    at Object.getCompletionsAtPosition (/typescript-52646/built/local/tsserver.js:147762:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-52646/built/local/tsserver.js:134884:35)
    at IOSession.getCompletions (/typescript-52646/built/local/tsserver.js:178382:54)
    at completionInfo (/typescript-52646/built/local/tsserver.js:176793:43)
    at /typescript-52646/built/local/tsserver.js:179146:69
    at IOSession.executeWithRequestId (/typescript-52646/built/local/tsserver.js:179138:14)
    at IOSession.executeCommand (/typescript-52646/built/local/tsserver.js:179146:29)
    at IOSession.onMessage (/typescript-52646/built/local/tsserver.js:179188:51)
    at Interface.<anonymous> (/typescript-52646/built/local/tsserver.js:180732:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults1/babel.babel.rawError.txt in the artifact folder

Last few requests

{"seq":1024,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/babel-parser/src/plugins/typescript/index.ts","line":2979,"offset":49,"includeExternalModuleExports":false,"triggerKind":1}}
{"seq":1025,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/packages/babel-parser/src/plugins/typescript/index.ts","line":2979,"offset":49,"entryNames":["arguments"]}}
{"seq":1026,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/packages/babel-parser/src/plugins/typescript/index.ts","line":3032,"offset":30}}
{"seq":1027,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/babel-parser/src/plugins/typescript/index.ts","line":3043,"offset":1,"includeExternalModuleExports":false,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/babel/babel --recurse-submodules
  2. In dir babel, run git reset --hard 0c97749e0fe8ad845b902e0b23a24b308b0bf05d
  3. Back in the initial folder, download RepoResults1/babel.babel.replay.txt from the artifact folder
  4. npm install --no-save @typescript/server-replay
  5. npx tsreplay ./babel ./babel.babel.replay.txt path/to/tsserver.js
  6. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

codex-team/editor.js

⚠️ Note that built also had errors ⚠️
Req #3435 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-main/built/local/tsserver.js:140793:13)
    at /typescript-main/built/local/tsserver.js:146513:38
    at importSymbols (/typescript-main/built/local/tsserver.js:146513:11)
    at Object.addNewNodeForMemberSymbol (/typescript-main/built/local/tsserver.js:145946:11)
    at getEntryForMemberCompletion (/typescript-main/built/local/tsserver.js:148372:22)
    at createCompletionEntry (/typescript-main/built/local/tsserver.js:148269:64)
    at getCompletionEntriesFromSymbols (/typescript-main/built/local/tsserver.js:148808:19)
    at completionInfoFromData (/typescript-main/built/local/tsserver.js:147936:23)
    at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:147758:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:134880:35)
    at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:178378:54)
    at completionInfo (/typescript-main/built/local/tsserver.js:176789:43)
    at /typescript-main/built/local/tsserver.js:179142:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179134:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179142:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179184:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180728:14)
Req #3435 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-52646/built/local/tsserver.js:140797:13)
    at /typescript-52646/built/local/tsserver.js:146517:38
    at importSymbols (/typescript-52646/built/local/tsserver.js:146517:11)
    at Object.addNewNodeForMemberSymbol (/typescript-52646/built/local/tsserver.js:145950:11)
    at getEntryForMemberCompletion (/typescript-52646/built/local/tsserver.js:148376:22)
    at createCompletionEntry (/typescript-52646/built/local/tsserver.js:148273:64)
    at getCompletionEntriesFromSymbols (/typescript-52646/built/local/tsserver.js:148812:19)
    at completionInfoFromData (/typescript-52646/built/local/tsserver.js:147940:23)
    at Object.getCompletionsAtPosition (/typescript-52646/built/local/tsserver.js:147762:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-52646/built/local/tsserver.js:134884:35)
    at IOSession.getCompletions (/typescript-52646/built/local/tsserver.js:178382:54)
    at completionInfo (/typescript-52646/built/local/tsserver.js:176793:43)
    at /typescript-52646/built/local/tsserver.js:179146:69
    at IOSession.executeWithRequestId (/typescript-52646/built/local/tsserver.js:179138:14)
    at IOSession.executeCommand (/typescript-52646/built/local/tsserver.js:179146:29)
    at IOSession.onMessage (/typescript-52646/built/local/tsserver.js:179188:51)
    at Interface.<anonymous> (/typescript-52646/built/local/tsserver.js:180732:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/codex-team.editor.js.rawError.txt in the artifact folder

Last few requests

{"seq":3432,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/components/modules/api/ui.ts","line":13,"offset":19,"includeExternalModuleExports":false,"triggerKind":1}}
{"seq":3433,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/components/modules/api/ui.ts","line":13,"offset":19,"entryNames":["config"]}}
{"seq":3434,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/src/components/modules/api/ui.ts","line":25,"offset":8}}
{"seq":3435,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/components/modules/api/ui.ts","line":35,"offset":4,"includeExternalModuleExports":false,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/codex-team/editor.js --recurse-submodules
  2. In dir editor.js, run git reset --hard 551e3f10b92cf5f5bb4fbd95ac504a815526dc18
  3. Back in the initial folder, download RepoResults4/codex-team.editor.js.replay.txt from the artifact folder
  4. npm install --no-save @typescript/server-replay
  5. npx tsreplay ./editor.js ./codex-team.editor.js.replay.txt path/to/tsserver.js
  6. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

neoclide/coc.nvim

⚠️ Note that built also had errors ⚠️
Req #5414 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-main/built/local/tsserver.js:140793:13)
    at /typescript-main/built/local/tsserver.js:146513:38
    at importSymbols (/typescript-main/built/local/tsserver.js:146513:11)
    at createSignatureDeclarationFromSignature (/typescript-main/built/local/tsserver.js:146147:9)
    at outputMethod (/typescript-main/built/local/tsserver.js:146035:20)
    at Object.addNewNodeForMemberSymbol (/typescript-main/built/local/tsserver.js:146017:9)
    at getEntryForMemberCompletion (/typescript-main/built/local/tsserver.js:148372:22)
    at createCompletionEntry (/typescript-main/built/local/tsserver.js:148269:64)
    at getCompletionEntriesFromSymbols (/typescript-main/built/local/tsserver.js:148808:19)
    at completionInfoFromData (/typescript-main/built/local/tsserver.js:147936:23)
    at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:147758:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:134880:35)
    at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:178378:54)
    at completionInfo (/typescript-main/built/local/tsserver.js:176789:43)
    at /typescript-main/built/local/tsserver.js:179142:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179134:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179142:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179184:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180728:14)
Req #5414 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-52646/built/local/tsserver.js:140797:13)
    at /typescript-52646/built/local/tsserver.js:146517:38
    at importSymbols (/typescript-52646/built/local/tsserver.js:146517:11)
    at createSignatureDeclarationFromSignature (/typescript-52646/built/local/tsserver.js:146151:9)
    at outputMethod (/typescript-52646/built/local/tsserver.js:146039:20)
    at Object.addNewNodeForMemberSymbol (/typescript-52646/built/local/tsserver.js:146021:9)
    at getEntryForMemberCompletion (/typescript-52646/built/local/tsserver.js:148376:22)
    at createCompletionEntry (/typescript-52646/built/local/tsserver.js:148273:64)
    at getCompletionEntriesFromSymbols (/typescript-52646/built/local/tsserver.js:148812:19)
    at completionInfoFromData (/typescript-52646/built/local/tsserver.js:147940:23)
    at Object.getCompletionsAtPosition (/typescript-52646/built/local/tsserver.js:147762:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-52646/built/local/tsserver.js:134884:35)
    at IOSession.getCompletions (/typescript-52646/built/local/tsserver.js:178382:54)
    at completionInfo (/typescript-52646/built/local/tsserver.js:176793:43)
    at /typescript-52646/built/local/tsserver.js:179146:69
    at IOSession.executeWithRequestId (/typescript-52646/built/local/tsserver.js:179138:14)
    at IOSession.executeCommand (/typescript-52646/built/local/tsserver.js:179146:29)
    at IOSession.onMessage (/typescript-52646/built/local/tsserver.js:179188:51)
    at Interface.<anonymous> (/typescript-52646/built/local/tsserver.js:180732:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults3/neoclide.coc.nvim.rawError.txt in the artifact folder

Last few requests

{"seq":5411,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":["@PROJECT_ROOT@/src/list/source/diagnostics.ts"],"openFiles":[]}}
{"seq":5412,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/src/list/source/location.ts","projectRootPath":"@PROJECT_ROOT@"}]}}
{"seq":5413,"type":"request","command":"getOutliningSpans","arguments":{"file":"@PROJECT_ROOT@/src/list/source/location.ts"}}
{"seq":5414,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/list/source/location.ts","line":16,"offset":1,"includeExternalModuleExports":false,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/neoclide/coc.nvim --recurse-submodules
  2. In dir coc.nvim, run git reset --hard 8c0d3ef9781cc60a998b2d496e98989f2da9f997
  3. In dir coc.nvim, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults3/neoclide.coc.nvim.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./coc.nvim ./neoclide.coc.nvim.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

nocodb/nocodb

⚠️ Note that built also had errors ⚠️
Req #7822 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-main/built/local/tsserver.js:140793:13)
    at /typescript-main/built/local/tsserver.js:146513:38
    at importSymbols (/typescript-main/built/local/tsserver.js:146513:11)
    at Object.addNewNodeForMemberSymbol (/typescript-main/built/local/tsserver.js:145946:11)
    at getEntryForMemberCompletion (/typescript-main/built/local/tsserver.js:148372:22)
    at createCompletionEntry (/typescript-main/built/local/tsserver.js:148269:64)
    at getCompletionEntriesFromSymbols (/typescript-main/built/local/tsserver.js:148808:19)
    at completionInfoFromData (/typescript-main/built/local/tsserver.js:147936:23)
    at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:147758:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:134880:35)
    at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:178378:54)
    at completionInfo (/typescript-main/built/local/tsserver.js:176789:43)
    at /typescript-main/built/local/tsserver.js:179142:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179134:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179142:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179184:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180728:14)
Req #7822 - completionInfo
    at Object.addImportFromExportedSymbol (/typescript-52646/built/local/tsserver.js:140797:13)
    at /typescript-52646/built/local/tsserver.js:146517:38
    at importSymbols (/typescript-52646/built/local/tsserver.js:146517:11)
    at Object.addNewNodeForMemberSymbol (/typescript-52646/built/local/tsserver.js:145950:11)
    at getEntryForMemberCompletion (/typescript-52646/built/local/tsserver.js:148376:22)
    at createCompletionEntry (/typescript-52646/built/local/tsserver.js:148273:64)
    at getCompletionEntriesFromSymbols (/typescript-52646/built/local/tsserver.js:148812:19)
    at completionInfoFromData (/typescript-52646/built/local/tsserver.js:147940:23)
    at Object.getCompletionsAtPosition (/typescript-52646/built/local/tsserver.js:147762:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-52646/built/local/tsserver.js:134884:35)
    at IOSession.getCompletions (/typescript-52646/built/local/tsserver.js:178382:54)
    at completionInfo (/typescript-52646/built/local/tsserver.js:176793:43)
    at /typescript-52646/built/local/tsserver.js:179146:69
    at IOSession.executeWithRequestId (/typescript-52646/built/local/tsserver.js:179138:14)
    at IOSession.executeCommand (/typescript-52646/built/local/tsserver.js:179146:29)
    at IOSession.onMessage (/typescript-52646/built/local/tsserver.js:179188:51)
    at Interface.<anonymous> (/typescript-52646/built/local/tsserver.js:180732:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults2/nocodb.nocodb.rawError.txt in the artifact folder

Last few requests

{"seq":7819,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/packages/nocodb/src/lib/db/sql-client/lib/snowflake/SnowflakeClient.ts","line":1021,"offset":6}}
{"seq":7820,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/nocodb/src/lib/db/sql-client/lib/snowflake/SnowflakeClient.ts","line":1021,"offset":6,"includeExternalModuleExports":false,"triggerKind":1}}
{"seq":7821,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/packages/nocodb/src/lib/db/sql-client/lib/snowflake/SnowflakeClient.ts","line":1021,"offset":6,"entryNames":["@abstract"]}}
{"seq":7822,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/nocodb/src/lib/db/sql-client/lib/snowflake/SnowflakeClient.ts","line":1039,"offset":1,"includeExternalModuleExports":false,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/nocodb/nocodb --recurse-submodules
  2. In dir nocodb, run git reset --hard c8da01c1e2f242422cfbfdecb8d2bbec28fdfc04
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir nocodb, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir nocodb/scripts/pkg-executable, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    3. In dir nocodb/tests/playwright, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
  4. Back in the initial folder, download RepoResults2/nocodb.nocodb.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./nocodb ./nocodb.nocodb.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

typeorm/typeorm

⚠️ Note that built also had errors ⚠️
Req #2747 - completionInfo
    at consumeTokenAndAdvanceScanner (/typescript-main/built/local/tsserver.js:165944:13)
    at processChildNode (/typescript-main/built/local/tsserver.js:165853:9)
    at /typescript-main/built/local/tsserver.js:165792:9
    at visitNode2 (/typescript-main/built/local/tsserver.js:29284:18)
    at forEachChildInMappedType (/typescript-main/built/local/tsserver.js:29427:133)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at /typescript-main/built/local/tsserver.js:165792:9
    at visitNode2 (/typescript-main/built/local/tsserver.js:29284:18)
    at forEachChildInArrayType (/typescript-main/built/local/tsserver.js:29402:12)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at /typescript-main/built/local/tsserver.js:165792:9
    at visitNode2 (/typescript-main/built/local/tsserver.js:29284:18)
    at forEachChildInConditionalType (/typescript-main/built/local/tsserver.js:29410:90)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at /typescript-main/built/local/tsserver.js:165792:9
    at visitNode2 (/typescript-main/built/local/tsserver.js:29284:18)
    at forEachChildInParenthesizedTypeOrTypeOperator (/typescript-main/built/local/tsserver.js:29748:10)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at processChildNodes (/typescript-main/built/local/tsserver.js:165911:32)
    at /typescript-main/built/local/tsserver.js:165805:9
    at visitNodes (/typescript-main/built/local/tsserver.js:29289:14)
    at forEachChildInUnionOrIntersectionType (/typescript-main/built/local/tsserver.js:29745:10)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at /typescript-main/built/local/tsserver.js:165792:9
    at visitNode2 (/typescript-main/built/local/tsserver.js:29284:18)
    at forEachChildInMappedType (/typescript-main/built/local/tsserver.js:29427:175)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at processChildNodes (/typescript-main/built/local/tsserver.js:165911:32)
    at /typescript-main/built/local/tsserver.js:165805:9
    at visitNodes (/typescript-main/built/local/tsserver.js:29289:14)
    at forEachChildInUnionOrIntersectionType (/typescript-main/built/local/tsserver.js:29745:10)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at /typescript-main/built/local/tsserver.js:165792:9
    at visitNode2 (/typescript-main/built/local/tsserver.js:29284:18)
    at forEachChildInParameter (/typescript-main/built/local/tsserver.js:29334:177)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at processChildNode (/typescript-main/built/local/tsserver.js:165868:7)
    at processChildNodes (/typescript-main/built/local/tsserver.js:165911:32)
    at /typescript-main/built/local/tsserver.js:165805:9
    at visitNodes (/typescript-main/built/local/tsserver.js:29289:14)
    at forEachChildInMethodDeclaration (/typescript-main/built/local/tsserver.js:29363:273)
    at forEachChild (/typescript-main/built/local/tsserver.js:29798:35)
    at processNode (/typescript-main/built/local/tsserver.js:165789:5)
    at formatSpanWorker (/typescript-main/built/local/tsserver.js:165597:5)
    at /typescript-main/built/local/tsserver.js:165537:105
    at getFormattingScanner (/typescript-main/built/local/tsserver.js:164353:15)
    at Object.formatNodeGivenIndentation (/typescript-main/built/local/tsserver.js:165537:10)
    at /typescript-main/built/local/tsserver.js:148640:36
    at flatMap (/typescript-main/built/local/tsserver.js:2556:17)
    at Object.printAndFormatSnippetList (/typescript-main/built/local/tsserver.js:148638:21)
    at getEntryForMemberCompletion (/typescript-main/built/local/tsserver.js:148408:28)
    at createCompletionEntry (/typescript-main/built/local/tsserver.js:148269:64)
    at getCompletionEntriesFromSymbols (/typescript-main/built/local/tsserver.js:148808:19)
    at completionInfoFromData (/typescript-main/built/local/tsserver.js:147936:23)
    at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:147758:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:134880:35)
    at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:178378:54)
    at completionInfo (/typescript-main/built/local/tsserver.js:176789:43)
    at /typescript-main/built/local/tsserver.js:179142:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179134:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179142:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179184:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180728:14)
Req #2747 - completionInfo
    at consumeTokenAndAdvanceScanner (/typescript-52646/built/local/tsserver.js:165948:13)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165857:9)
    at /typescript-52646/built/local/tsserver.js:165796:9
    at visitNode2 (/typescript-52646/built/local/tsserver.js:29284:18)
    at forEachChildInMappedType (/typescript-52646/built/local/tsserver.js:29427:133)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at /typescript-52646/built/local/tsserver.js:165796:9
    at visitNode2 (/typescript-52646/built/local/tsserver.js:29284:18)
    at forEachChildInArrayType (/typescript-52646/built/local/tsserver.js:29402:12)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at /typescript-52646/built/local/tsserver.js:165796:9
    at visitNode2 (/typescript-52646/built/local/tsserver.js:29284:18)
    at forEachChildInConditionalType (/typescript-52646/built/local/tsserver.js:29410:90)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at /typescript-52646/built/local/tsserver.js:165796:9
    at visitNode2 (/typescript-52646/built/local/tsserver.js:29284:18)
    at forEachChildInParenthesizedTypeOrTypeOperator (/typescript-52646/built/local/tsserver.js:29748:10)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at processChildNodes (/typescript-52646/built/local/tsserver.js:165915:32)
    at /typescript-52646/built/local/tsserver.js:165809:9
    at visitNodes (/typescript-52646/built/local/tsserver.js:29289:14)
    at forEachChildInUnionOrIntersectionType (/typescript-52646/built/local/tsserver.js:29745:10)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at /typescript-52646/built/local/tsserver.js:165796:9
    at visitNode2 (/typescript-52646/built/local/tsserver.js:29284:18)
    at forEachChildInMappedType (/typescript-52646/built/local/tsserver.js:29427:175)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at processChildNodes (/typescript-52646/built/local/tsserver.js:165915:32)
    at /typescript-52646/built/local/tsserver.js:165809:9
    at visitNodes (/typescript-52646/built/local/tsserver.js:29289:14)
    at forEachChildInUnionOrIntersectionType (/typescript-52646/built/local/tsserver.js:29745:10)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at /typescript-52646/built/local/tsserver.js:165796:9
    at visitNode2 (/typescript-52646/built/local/tsserver.js:29284:18)
    at forEachChildInParameter (/typescript-52646/built/local/tsserver.js:29334:177)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at processChildNode (/typescript-52646/built/local/tsserver.js:165872:7)
    at processChildNodes (/typescript-52646/built/local/tsserver.js:165915:32)
    at /typescript-52646/built/local/tsserver.js:165809:9
    at visitNodes (/typescript-52646/built/local/tsserver.js:29289:14)
    at forEachChildInMethodDeclaration (/typescript-52646/built/local/tsserver.js:29363:273)
    at forEachChild (/typescript-52646/built/local/tsserver.js:29798:35)
    at processNode (/typescript-52646/built/local/tsserver.js:165793:5)
    at formatSpanWorker (/typescript-52646/built/local/tsserver.js:165601:5)
    at /typescript-52646/built/local/tsserver.js:165541:105
    at getFormattingScanner (/typescript-52646/built/local/tsserver.js:164357:15)
    at Object.formatNodeGivenIndentation (/typescript-52646/built/local/tsserver.js:165541:10)
    at /typescript-52646/built/local/tsserver.js:148644:36
    at flatMap (/typescript-52646/built/local/tsserver.js:2556:17)
    at Object.printAndFormatSnippetList (/typescript-52646/built/local/tsserver.js:148642:21)
    at getEntryForMemberCompletion (/typescript-52646/built/local/tsserver.js:148412:28)
    at createCompletionEntry (/typescript-52646/built/local/tsserver.js:148273:64)
    at getCompletionEntriesFromSymbols (/typescript-52646/built/local/tsserver.js:148812:19)
    at completionInfoFromData (/typescript-52646/built/local/tsserver.js:147940:23)
    at Object.getCompletionsAtPosition (/typescript-52646/built/local/tsserver.js:147762:24)
    at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-52646/built/local/tsserver.js:134884:35)
    at IOSession.getCompletions (/typescript-52646/built/local/tsserver.js:178382:54)
    at completionInfo (/typescript-52646/built/local/tsserver.js:176793:43)
    at /typescript-52646/built/local/tsserver.js:179146:69
    at IOSession.executeWithRequestId (/typescript-52646/built/local/tsserver.js:179138:14)
    at IOSession.executeCommand (/typescript-52646/built/local/tsserver.js:179146:29)
    at IOSession.onMessage (/typescript-52646/built/local/tsserver.js:179188:51)
    at Interface.<anonymous> (/typescript-52646/built/local/tsserver.js:180732:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults2/typeorm.typeorm.rawError.txt in the artifact folder

Last few requests

{"seq":2744,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/query-builder/SelectQueryBuilder.ts","line":428,"offset":7,"entryNames":["@abstract"]}}
{"seq":2745,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/query-builder/SelectQueryBuilder.ts","line":453,"offset":41,"includeExternalModuleExports":false,"triggerKind":2,"triggerCharacter":" "}}
{"seq":2746,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/query-builder/SelectQueryBuilder.ts","line":477,"offset":32,"includeExternalModuleExports":false,"triggerKind":2,"triggerCharacter":"<"}}
{"seq":2747,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/query-builder/SelectQueryBuilder.ts","line":495,"offset":1,"includeExternalModuleExports":false,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/typeorm/typeorm --recurse-submodules
  2. In dir typeorm, run git reset --hard 099fcd9b104bc930faea08f97ee3d5610118e0c4
  3. In dir typeorm, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
  4. Back in the initial folder, download RepoResults2/typeorm.typeorm.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./typeorm ./typeorm.typeorm.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@@ -3340,6 +3341,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
}
});
}
if (isPrototypeProperty && namespaceSymbol && namespaceSymbol.valueDeclaration && isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) {
containerIsClass = false;
}
if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) {
Copy link
Member

Choose a reason for hiding this comment

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

I think you can combine the checks from the above as well and just do an early return in the "bad" case.

Copy link
Member Author

@navya9singh navya9singh Feb 21, 2023

Choose a reason for hiding this comment

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

I'm not sure I understand this. Do you mean I should add it as an else if with return namespaceSymbol; ?

Copy link
Member

Choose a reason for hiding this comment

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

Something like that - you're setting containerIsClass to false, which makes you indirectly skip the next check; maybe that's fine, but you also have to repeat the same checks for namespaceSymbol. So I would write something like

if (namespaceSymbol?.valueDeclaration) {
    // We may have needed to make an assumption that the container symbol is a class
    // due to an assignment like `Foo.prototype.method = ...`. However,
    // if we never found a valueDeclaration that's suited as an old-style class,
    // we should bail out here.
    if (isPrototypeProperty && isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) {
        return namespaceSymbol;
    }

    if (containerIsClass) {
        addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, SymbolFlags.Class);
    }
}

You can even simplify further, but I think this is fine.

Copy link
Member

Choose a reason for hiding this comment

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

On that note - maybe for the bail-out case it would be better to say

If the valueDeclaration is not a class or constructor function

instead of

If the valueDeclaration is an assignment function

That way we can't end up with more accidental cases like this. But it's up to you.

@@ -3340,6 +3341,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
}
});
}
if (isPrototypeProperty && namespaceSymbol && namespaceSymbol.valueDeclaration && isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this check needs an explanation of how we could've gotten into this state and what this does to fix it - 2-3 sentences should do.

Copy link
Member

Choose a reason for hiding this comment

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

something like "A prototype property assignment to something that looks class-like shouldn't actually count if the class-likeness came from an assignment declaration. The checker requires an actual class/constructor function to attach the prototype property to."

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Suggestion for wording of the comment @DanielRosenwasser requested.

@@ -3340,6 +3341,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
}
});
}
if (isPrototypeProperty && namespaceSymbol && namespaceSymbol.valueDeclaration && isAssignmentDeclaration(namespaceSymbol.valueDeclaration)) {
Copy link
Member

Choose a reason for hiding this comment

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

something like "A prototype property assignment to something that looks class-like shouldn't actually count if the class-likeness came from an assignment declaration. The checker requires an actual class/constructor function to attach the prototype property to."

Comment on lines +3345 to +3346
//A prototype property assignment to something that looks class-like shouldn't actually count if the class-likeness came from an assignment declaration.
//The checker requires an actual class/constructor function to attach the prototype property to.
Copy link
Member

Choose a reason for hiding this comment

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

Just saw that you also left a comment - if you want to stick to this comment, try to shorten the line and add a space after each //

Suggested change
//A prototype property assignment to something that looks class-like shouldn't actually count if the class-likeness came from an assignment declaration.
//The checker requires an actual class/constructor function to attach the prototype property to.
// A prototype property assignment to something that looks class-like
// shouldn't actually count if the class-likeness came from an assignment declaration.
// The checker requires an actual class/constructor function to attach the prototype property to.

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
Status: Waiting on author
Development

Successfully merging this pull request may close these issues.

Undefined entity with immediate and prototype assignments causes language service errors
5 participants