Skip to content

Fix for Issue 56013 #56373

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 6 commits into
base: main
Choose a base branch
from
Open

Fix for Issue 56013 #56373

wants to merge 6 commits into from

Conversation

craigphicks
Copy link

@craigphicks craigphicks commented Nov 12, 2023

Fixes #56013

Test files

tests/cases/compiler/arrayFilterBooleanExternalOverload{1,2,3}.ts

Bug found

In the course of looping through overloads in function chooseOverload(...), inner signature results are cached in the global variablegetNodeLinks(node).resolvedSignature. Subsequent loop iteration candidates read from the cache instead of calculating anew, which may adversely affects the logic of choosing the overload.

Fix

Effectively a global request is issued at the beginning of each overloads loop in chooseOverload.
That is read from within checkExpression, and if that node is a CallExpression and has not yet been cleared, the node links resolvedSignature is set to resolvingSignature. It is set up to work recursively, to accommodate nested chooseOverloads.

Criticism

The use of a request flag paradigm between chooseOverload and checkExpression seems like a hack. It might be better to keep track of nodes of interest and clear/store the necessary related values from within chooseOverload.

Those might the nodes for which this clause in resolveCallExpression(...) is triggered:

        if (checkMode & CheckMode.SkipGenericFunctions && !node.typeArguments && callSignatures.some(isGenericFunctionReturningFunction)) {
            skippedGenericFunction(node, checkMode);
            return resolvingSignature;
        }

Question

Are there any other values stored in NodeLinks, or SymbolLinks, or elsewhere, that should be reset between overload candidates?

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Nov 12, 2023
@craigphicks craigphicks marked this pull request as draft November 12, 2023 21:30
@craigphicks craigphicks force-pushed the PR-56013 branch 5 times, most recently from 64d3db2 to 499573b Compare November 14, 2023 02:55
@craigphicks craigphicks marked this pull request as ready for review November 14, 2023 03:24
@craigphicks craigphicks changed the title Pr 56013 Fix for Issue 56013 Nov 14, 2023
return undefined;
chooseOverloadRecursionLevel++; // #56013
chooseOverloadFlushNodesSignaturesReq[chooseOverloadRecursionLevel] = undefined;
const result = (() => {
Copy link
Author

@craigphicks craigphicks Nov 14, 2023

Choose a reason for hiding this comment

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

The main body of choose overload is wrapped in an Immediately Invoked Function Expression to implement the chooseOverloadFlushNodesSignaturesReq stack without error. Calling the IIFE resulted in indentation which messes up the diff. Actually there is only a single line changed inside the IIFE.

continue;
}
for (let candidateIndex = 0; candidateIndex < candidates.length; candidateIndex++) {
if (candidateIndex > 0) chooseOverloadFlushNodesSignaturesReq[chooseOverloadRecursionLevel] = new Set(); // #56013
Copy link
Author

Choose a reason for hiding this comment

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

At the top of every loop after the first the request is set.

let setOfNode: Set<Node> | undefined;
if (chooseOverloadRecursionLevel >= 0 && (setOfNode = chooseOverloadFlushNodesSignaturesReq[chooseOverloadRecursionLevel])) {
if (!setOfNode.has(node)) {
getNodeLinks(node).resolvedSignature = undefined;
Copy link
Author

@craigphicks craigphicks Nov 14, 2023

Choose a reason for hiding this comment

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

The request is read and getNodeLinks(node).resolvedSignature is cleared by setting it to the global constant resolvingSignature, but only once per overload loop.

original source and new tests/results
@@ -72,7 +72,7 @@ declare const maybe: boolean;
>'bar' : "bar"
>undefined : undefined
>filter : { <S extends string | undefined>(predicate: (value: string | undefined, index: number, array: (string | undefined)[]) => value is S, thisArg?: any): S[]; (predicate: (value: string | undefined, index: number, array: (string | undefined)[]) => unknown, thisArg?: any): (string | undefined)[]; (predicate: BooleanConstructor & { prototype: unique symbol; }): string[]; }
>id() : (t: unknown) => boolean
>id() : (t: string | undefined) => boolean
Copy link
Author

@craigphicks craigphicks Nov 14, 2023

Choose a reason for hiding this comment

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

The original problem behavior specified in #56013 is fixed. Before/after view.

@@ -49,37 +49,37 @@ const t11 = (0 as any as F2<1,1>)(id(),id());
>id : ID

Copy link
Author

@craigphicks craigphicks Nov 14, 2023

Choose a reason for hiding this comment

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

The change in behavior is easiest to see in this test file. The evaluation of id() got stuck in earlier overloads, resulting in incorrect overload choice behavior..

id() is used in multiple positions to shows that multiple nodes are being cleared for the same iteration.

Before/after comparison can be viewed with this url.

@craigphicks craigphicks marked this pull request as draft November 14, 2023 15:43
@craigphicks craigphicks marked this pull request as ready for review November 14, 2023 17:26
>(0 as any as F2<2,2>) : F2<2, 2>
>0 as any as F2<2,2> : F2<2, 2>
>0 as any : any
>0 : 0
>id() : (i: 1) => 1
>id() : (i: 2) => 2
Copy link
Author

Choose a reason for hiding this comment

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

@weswigham
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@weswigham
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,204k (± 0.01%) 295,231k (± 0.01%) ~ 295,192k 295,282k p=0.378 n=6
Parse Time 2.64s (± 0.20%) 2.64s (± 0.44%) ~ 2.62s 2.65s p=0.542 n=6
Bind Time 0.82s (± 0.63%) 0.82s (± 0.50%) ~ 0.82s 0.83s p=0.595 n=6
Check Time 8.04s (± 0.17%) 8.12s (± 0.34%) +0.08s (+ 0.95%) 8.08s 8.16s p=0.005 n=6
Emit Time 7.07s (± 0.43%) 7.07s (± 0.43%) ~ 7.03s 7.11s p=0.936 n=6
Total Time 18.57s (± 0.17%) 18.64s (± 0.31%) +0.07s (+ 0.36%) 18.57s 18.73s p=0.029 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 194,023k (± 1.48%) 193,153k (± 1.47%) ~ 190,761k 196,613k p=0.689 n=6
Parse Time 1.36s (± 1.14%) 1.35s (± 1.90%) ~ 1.30s 1.37s p=0.607 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.20s (± 0.33%) 9.18s (± 0.53%) ~ 9.13s 9.24s p=0.687 n=6
Emit Time 2.63s (± 0.40%) 2.66s (± 0.67%) +0.04s (+ 1.33%) 2.64s 2.69s p=0.006 n=6
Total Time 13.90s (± 0.31%) 13.91s (± 0.34%) ~ 13.86s 13.97s p=0.872 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,358k (± 0.00%) 347,422k (± 0.00%) +64k (+ 0.02%) 347,408k 347,438k p=0.005 n=6
Parse Time 2.46s (± 0.36%) 2.46s (± 0.56%) ~ 2.43s 2.47s p=0.673 n=6
Bind Time 0.93s (± 0.56%) 0.93s (± 0.56%) ~ 0.92s 0.93s p=1.000 n=6
Check Time 6.91s (± 0.73%) 6.94s (± 0.39%) ~ 6.91s 6.97s p=0.326 n=6
Emit Time 4.05s (± 0.60%) 4.04s (± 0.37%) ~ 4.02s 4.06s p=0.806 n=6
Total Time 14.34s (± 0.35%) 14.37s (± 0.28%) ~ 14.30s 14.42s p=0.374 n=6
TFS - node (v18.15.0, x64)
Memory used 302,626k (± 0.00%) 302,614k (± 0.00%) ~ 302,600k 302,626k p=0.261 n=6
Parse Time 2.01s (± 0.81%) 2.00s (± 0.58%) ~ 1.99s 2.02s p=0.402 n=6
Bind Time 1.00s (± 1.36%) 1.00s (± 1.22%) ~ 0.99s 1.02s p=0.798 n=6
Check Time 6.26s (± 0.44%) 6.34s (± 0.58%) +0.08s (+ 1.25%) 6.28s 6.38s p=0.013 n=6
Emit Time 3.58s (± 0.52%) 3.58s (± 0.39%) ~ 3.56s 3.60s p=0.622 n=6
Total Time 12.86s (± 0.30%) 12.92s (± 0.31%) +0.07s (+ 0.53%) 12.85s 12.96s p=0.030 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,564k (± 0.01%) 470,987k (± 0.01%) +423k (+ 0.09%) 470,915k 471,022k p=0.005 n=6
Parse Time 2.57s (± 0.64%) 2.58s (± 0.58%) ~ 2.56s 2.60s p=0.325 n=6
Bind Time 0.99s (± 1.04%) 1.00s (± 1.37%) ~ 0.98s 1.01s p=0.541 n=6
Check Time 16.73s (± 0.58%) 16.87s (± 0.39%) +0.14s (+ 0.85%) 16.77s 16.97s p=0.031 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.29s (± 0.44%) 20.45s (± 0.32%) +0.15s (+ 0.75%) 20.34s 20.54s p=0.013 n=6
xstate - node (v18.15.0, x64)
Memory used 512,033k (± 0.01%) 512,038k (± 0.01%) ~ 511,963k 512,120k p=1.000 n=6
Parse Time 3.27s (± 0.45%) 3.28s (± 0.32%) ~ 3.26s 3.29s p=0.805 n=6
Bind Time 1.55s (± 0.33%) 1.54s (± 0.26%) ~ 1.54s 1.55s p=0.112 n=6
Check Time 2.80s (± 1.05%) 2.83s (± 0.43%) ~ 2.81s 2.84s p=0.376 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 7.70s (± 0.51%) 7.72s (± 0.26%) ~ 7.70s 7.76s p=0.229 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,362ms (± 0.67%) 2,358ms (± 1.01%) ~ 2,325ms 2,384ms p=0.689 n=6
Req 2 - geterr 5,366ms (± 1.59%) 5,418ms (± 1.40%) ~ 5,358ms 5,531ms p=0.128 n=6
Req 3 - references 328ms (± 1.38%) 326ms (± 0.89%) ~ 324ms 331ms p=0.568 n=6
Req 4 - navto 277ms (± 1.22%) 278ms (± 1.47%) ~ 273ms 283ms p=0.676 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 (± 4.82%) 84ms (± 5.43%) ~ 80ms 90ms p=0.934 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,474ms (± 1.19%) 2,479ms (± 1.48%) ~ 2,410ms 2,516ms p=0.936 n=6
Req 2 - geterr 4,108ms (± 1.80%) 4,123ms (± 2.10%) ~ 4,042ms 4,213ms p=0.378 n=6
Req 3 - references 338ms (± 1.73%) 337ms (± 1.41%) ~ 333ms 346ms p=0.744 n=6
Req 4 - navto 284ms (± 0.59%) 281ms (± 0.75%) -3ms (- 1.06%) 279ms 284ms p=0.036 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 (± 7.59%) 86ms (± 8.25%) ~ 76ms 93ms p=0.293 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,591ms (± 0.73%) 2,595ms (± 0.47%) ~ 2,579ms 2,614ms p=0.378 n=6
Req 2 - geterr 1,680ms (± 1.98%) 1,646ms (± 1.96%) ~ 1,604ms 1,694ms p=0.128 n=6
Req 3 - references 110ms (± 7.49%) 114ms (± 9.72%) ~ 102ms 125ms p=0.376 n=6
Req 4 - navto 366ms (± 0.51%) 367ms (± 0.81%) ~ 363ms 370ms p=0.466 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 312ms (± 1.16%) 308ms (± 1.47%) ~ 303ms 316ms p=0.128 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.23%) 152.59ms (± 0.20%) -0.18ms (- 0.12%) 151.46ms 155.85ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.03ms (± 0.15%) 227.81ms (± 0.16%) -0.22ms (- 0.10%) 226.67ms 232.84ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.77ms (± 0.18%) 229.86ms (± 0.17%) +0.08ms (+ 0.04%) 228.36ms 233.20ms p=0.018 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.29ms (± 0.18%) 229.41ms (± 0.18%) +0.11ms (+ 0.05%) 227.76ms 233.33ms p=0.008 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

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

While the extended suites run to make sure this doesn't break anything in a non-obvious way (it might, people tend to depend on odd corners of overload resolution), I'd like to request all the #56013 refs in the comments get removed - issue refs in comments are for TODOs, not completed work (otherwise every line in the repo would have multiple issue refs). You can always check the blame to track down the "why is it like this" context later.

* - or a calculated signature.
* Therefore resetting must set to `resolvingSignature` - it means "not yet calculated".
*/
getNodeLinks(node).resolvedSignature = resolvingSignature;
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised the perf of this is OK, but it's likely because this solution is incomplete - this only partially purges the cached nodes; the cached parameter symbol types on the parameter symbol links are still there! So while you'll get new signatures here, any parameters that get witnessed by multiple overload passes will still have their types locked down. Which isn't any worse than today, to be fair! It's a known issue with the signature resolution logic. IME, adding a full hierarchical cache to fully handle it and make speculative overload resolution totally unwindable was pretty bad for perf, but this approach, being partial, looks like it's OK. And if it still manages to fix a few usecases, that sounds pretty OK to me.

Copy link
Member

Choose a reason for hiding this comment

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

Like, this feels odd, because it seems naive - it's basically resetting the resolved signature of every call expression we visit while looking at nested overload resolutions - in theory, only some calls should need to get reset - those which actually depend on the overload resolution in progress (which'd require a bit more tracing). I'd have figured over-invalidation like this'd manifest as terrible perf, but no - perf looks OK, broadly speaking, not more than a single percent diff.

@weswigham
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 27, 2023

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

Update: The results are in!

* - or a calculated signature.
* Therefore resetting must set to `resolvingSignature` - it means "not yet calculated".
*/
getNodeLinks(node).resolvedSignature = resolvingSignature;
Copy link
Member

Choose a reason for hiding this comment

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

Like, this feels odd, because it seems naive - it's basically resetting the resolved signature of every call expression we visit while looking at nested overload resolutions - in theory, only some calls should need to get reset - those which actually depend on the overload resolution in progress (which'd require a bit more tracing). I'd have figured over-invalidation like this'd manifest as terrible perf, but no - perf looks OK, broadly speaking, not more than a single percent diff.

return undefined;
chooseOverloadRecursionLevel++; // #56013
chooseOverloadFlushNodesSignaturesReq[chooseOverloadRecursionLevel] = undefined;
const result = (() => {
Copy link
Member

@weswigham weswigham Nov 27, 2023

Choose a reason for hiding this comment

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

Just a style thing - extract the IIFE into a named function in the scope, such as chooseOverloadWorker instead; makes debugging easier later for it to be named (and is what we do elsewhere when we want to use patterns like this).

@typescript-bot
Copy link
Collaborator

@weswigham
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,204k (± 0.01%) 295,217k (± 0.00%) ~ 295,203k 295,241k p=0.229 n=6
Parse Time 2.64s (± 0.41%) 2.65s (± 0.21%) ~ 2.64s 2.65s p=0.476 n=6
Bind Time 0.82s (± 0.00%) 0.82s (± 0.92%) ~ 0.81s 0.83s p=0.598 n=6
Check Time 8.05s (± 0.16%) 8.12s (± 0.18%) +0.07s (+ 0.87%) 8.10s 8.14s p=0.005 n=6
Emit Time 7.09s (± 0.25%) 7.07s (± 0.20%) ~ 7.05s 7.09s p=0.076 n=6
Total Time 18.60s (± 0.16%) 18.66s (± 0.12%) +0.05s (+ 0.29%) 18.62s 18.69s p=0.013 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 195,426k (± 0.87%) 193,729k (± 1.66%) ~ 190,780k 196,713k p=0.810 n=6
Parse Time 1.36s (± 0.40%) 1.35s (± 0.00%) ~ 1.35s 1.35s p=0.071 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.17s (± 0.52%) 9.17s (± 0.30%) ~ 9.13s 9.21s p=0.936 n=6
Emit Time 2.62s (± 0.57%) 2.68s (± 0.74%) +0.05s (+ 1.97%) 2.64s 2.70s p=0.008 n=6
Total Time 13.87s (± 0.29%) 13.91s (± 0.30%) ~ 13.86s 13.98s p=0.107 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,360k (± 0.01%) 347,424k (± 0.00%) +64k (+ 0.02%) 347,405k 347,447k p=0.005 n=6
Parse Time 2.46s (± 0.21%) 2.45s (± 0.17%) -0.01s (- 0.47%) 2.45s 2.46s p=0.007 n=6
Bind Time 0.93s (± 0.56%) 0.92s (± 0.44%) ~ 0.92s 0.93s p=0.112 n=6
Check Time 6.91s (± 0.60%) 6.97s (± 0.28%) +0.06s (+ 0.82%) 6.94s 7.00s p=0.043 n=6
Emit Time 4.06s (± 0.43%) 4.04s (± 0.20%) ~ 4.03s 4.05s p=0.134 n=6
Total Time 14.35s (± 0.33%) 14.39s (± 0.16%) ~ 14.37s 14.43s p=0.197 n=6
TFS - node (v18.15.0, x64)
Memory used 302,631k (± 0.00%) 302,603k (± 0.01%) -28k (- 0.01%) 302,576k 302,632k p=0.020 n=6
Parse Time 1.99s (± 0.74%) 2.00s (± 1.20%) ~ 1.97s 2.04s p=0.512 n=6
Bind Time 1.00s (± 0.41%) 1.01s (± 1.62%) ~ 0.99s 1.03s p=0.491 n=6
Check Time 6.26s (± 0.13%) 6.32s (± 0.28%) +0.06s (+ 0.90%) 6.29s 6.34s p=0.005 n=6
Emit Time 3.58s (± 0.47%) 3.58s (± 0.56%) ~ 3.55s 3.61s p=0.934 n=6
Total Time 12.83s (± 0.15%) 12.90s (± 0.32%) +0.07s (+ 0.57%) 12.86s 12.96s p=0.008 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,640k (± 0.02%) 471,049k (± 0.02%) +408k (+ 0.09%) 470,929k 471,191k p=0.005 n=6
Parse Time 2.57s (± 0.38%) 2.58s (± 0.51%) ~ 2.57s 2.60s p=0.295 n=6
Bind Time 0.99s (± 0.99%) 0.99s (± 1.04%) ~ 0.98s 1.00s p=0.784 n=6
Check Time 16.75s (± 0.40%) 16.90s (± 0.21%) +0.15s (+ 0.92%) 16.85s 16.96s p=0.005 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.31s (± 0.31%) 20.47s (± 0.23%) +0.17s (+ 0.82%) 20.42s 20.56s p=0.005 n=6
xstate - node (v18.15.0, x64)
Memory used 511,976k (± 0.01%) 512,001k (± 0.01%) ~ 511,960k 512,045k p=0.471 n=6
Parse Time 3.27s (± 0.23%) 3.28s (± 0.26%) ~ 3.26s 3.28s p=0.172 n=6
Bind Time 1.54s (± 0.78%) 1.54s (± 0.35%) ~ 1.54s 1.55s p=0.865 n=6
Check Time 2.82s (± 1.11%) 2.81s (± 0.71%) ~ 2.80s 2.85s p=0.290 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 4.99%) ~ 0.08s 0.09s p=0.405 n=6
Total Time 7.71s (± 0.39%) 7.71s (± 0.34%) ~ 7.68s 7.75s p=0.686 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,367ms (± 0.74%) 2,359ms (± 0.83%) ~ 2,329ms 2,377ms p=0.336 n=6
Req 2 - geterr 5,363ms (± 1.30%) 5,442ms (± 1.49%) ~ 5,352ms 5,524ms p=0.128 n=6
Req 3 - references 328ms (± 1.11%) 327ms (± 0.69%) ~ 323ms 330ms p=0.517 n=6
Req 4 - navto 278ms (± 1.23%) 277ms (± 1.15%) ~ 273ms 280ms p=0.623 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 83ms (± 7.01%) 85ms (± 6.23%) ~ 80ms 90ms p=0.498 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,490ms (± 0.51%) 2,489ms (± 1.09%) ~ 2,466ms 2,529ms p=0.375 n=6
Req 2 - geterr 4,108ms (± 1.95%) 4,153ms (± 2.05%) ~ 4,039ms 4,217ms p=0.127 n=6
Req 3 - references 338ms (± 1.58%) 336ms (± 1.16%) ~ 334ms 344ms p=0.805 n=6
Req 4 - navto 282ms (± 0.48%) 281ms (± 0.62%) ~ 278ms 283ms p=0.121 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 (± 7.23%) 83ms (± 8.44%) ~ 77ms 92ms p=0.809 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,598ms (± 0.29%) 2,593ms (± 0.28%) ~ 2,583ms 2,604ms p=0.334 n=6
Req 2 - geterr 1,676ms (± 1.61%) 1,682ms (± 1.82%) ~ 1,622ms 1,704ms p=0.378 n=6
Req 3 - references 110ms (±11.22%) 118ms (± 6.05%) ~ 104ms 123ms p=0.470 n=6
Req 4 - navto 365ms (± 0.47%) 365ms (± 0.70%) ~ 363ms 370ms p=1.000 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 (± 1.81%) 310ms (± 1.17%) ~ 304ms 315ms p=0.572 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 153.10ms (± 0.21%) 152.84ms (± 0.19%) -0.26ms (- 0.17%) 151.72ms 155.19ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.33ms (± 0.16%) 228.17ms (± 0.16%) -0.15ms (- 0.07%) 226.88ms 233.40ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.62ms (± 0.19%) 229.61ms (± 0.18%) ~ 227.70ms 236.43ms p=0.985 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.08ms (± 0.18%) 229.25ms (± 0.18%) +0.17ms (+ 0.08%) 227.72ms 234.48ms 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 @weswigham, the results of running the DT tests are ready.
There were interesting changes:

Branch only errors:

Package: semantic-ui-search
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-search/semantic-ui-search-tests.ts:53:13
ERROR: 53:13  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type 'string | JQuery<HTMLElement> | (string & JQuery<HTMLElement>) | (JQuery<HTMLElement> & string) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-dropdown
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-dropdown/semantic-ui-dropdown-tests.ts:86:13
ERROR: 86:13  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type 'string | JQuery<HTMLElement> | (string & JQuery<HTMLElement>) | (JQuery<HTMLElement> & string) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-visibility
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-visibility/semantic-ui-visibility-tests.ts:40:9
ERROR: 40:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-api
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-api/semantic-ui-api-tests.ts:37:9
ERROR: 37:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-popup
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-popup/semantic-ui-popup-tests.ts:42:9
ERROR: 42:9   expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
                Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                  Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
                      Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
ERROR: 46:9   expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
                Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                  Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
                      Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
ERROR: 47:9   expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
                Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                  Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
                      Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
ERROR: 48:9   expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
                Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                  Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
                      Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
ERROR: 67:9   expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
                Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                  Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
                      Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
ERROR: 106:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
                Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                  Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
                    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
                      Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-tab
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-tab/semantic-ui-tab-tests.ts:46:13
ERROR: 46:13  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type 'string | JQuery<HTMLElement> | (string & JQuery<HTMLElement>) | (JQuery<HTMLElement> & string) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
ERROR: 148:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type 'string | JQuery<HTMLElement> | (string & JQuery<HTMLElement>) | (JQuery<HTMLElement> & string) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.
            Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
              Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-nag
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-nag/semantic-ui-nag-tests.ts:37:9
ERROR: 37:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | false | JQuery<HTMLElement>) & (string | false | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-sticky
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-sticky/semantic-ui-sticky-tests.ts:28:24
ERROR: 28:24  expect  TypeScript@local compile error: 
No overload matches this call.
  Overload 2 of 6, '(behavior: "destroy"): JQuery<HTMLElement>', gave the following error.
    Argument of type '{ pushing: boolean; setSize: boolean; jitter: number; observeChanges: boolean; context: JQuery<string | HTMLElement>; scrollContext: JQuery<string | HTMLElement>; ... 9 more ...; error: { ...; }; }' is not assignable to parameter of type '"destroy"'.
ERROR: 38:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String
ERROR: 41:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String
ERROR: 44:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String
ERROR: 47:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String
ERROR: 50:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String
ERROR: 53:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-modal
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-modal/semantic-ui-modal-tests.ts:47:9
ERROR: 47:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: semantic-ui-sidebar
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/semantic-ui-sidebar/semantic-ui-sidebar-tests.ts:40:9
ERROR: 40:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
    Type 'JQuery<string | HTMLElement>' is not assignable to type '((string | JQuery<HTMLElement>) & (string | JQuery<HTMLElement> | undefined)) | undefined'.
      Type 'JQuery<string | HTMLElement>' is not assignable to type 'JQuery<HTMLElement>'.
        Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.
          Type 'string' is not assignable to type 'HTMLElement'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@weswigham
Copy link
Member

Looks like this introduces some errors in semantic-ui on DT that are pretty pervasive. Those'll need some explanations (as expected breaking changes, with some details on how to mitigate it and accompanying changes to DT)/fixes (if it's just a bug in the PR) for this to pass muster.

@craigphicks
Copy link
Author

Looks like this introduces some errors in semantic-ui on DT that are pretty pervasive. Those'll need some explanations (as expected breaking changes, with some details on how to mitigate it and accompanying changes to DT)/fixes (if it's just a bug in the PR) for this to pass muster.

I guess the only way to address these is to clone the repo and run the tests and debug - there doesn't seem anything in the test files that can easily be cut and pasted to create local tests.

There are a number of errors in semantic-ui-sticky-tests.ts that look this this:

ERROR: 38:13  expect  TypeScript@local expected type to be:
  JQuery<HTMLElement>
got:
  String

which definitely looks wrong.

The rest, a large number from a number of different files, seem to be of the form

ERROR: 37:9  expect  TypeScript@local compile error: 
No overload matches this call.
  The last overload gave the following error.
     .....

If that means that an unnecessary error has been cleaned up, then this might be a worthwhile change after all.
But if it means that a truly wanted error is now missed, then it is bad. We'll see ...

@craigphicks
Copy link
Author

craigphicks commented Nov 28, 2023

While the extended suites run to make sure this doesn't break anything in a non-obvious way (it might, people tend to depend on odd corners of overload resolution), I'd like to request all the #56013 refs in the comments get removed - issue refs in comments are for TODOs, not completed work (otherwise every line in the repo would have multiple issue refs). You can always check the blame to track down the "why is it like this" context later.

Done. And "IIFE" changed to a proper function. Semantic-UI errors not yet ...

@craigphicks
Copy link
Author

@weswigham

Looks like this introduces some errors in semantic-ui on DT that are pretty pervasive. Those'll need some explanations (as expected breaking changes, with some details on how to mitigate it and accompanying changes to DT)/fixes (if it's just a bug in the PR) for this to pass muster.

It seems at least some of the semantic-ui error reports are pre-existing, by which I mean they can recreated with 5.3.2 and below, with modified test code. I believe the opening this bug fix, which fixes improper caching that prevents recalculation of some generic call expressions, correctly allowed new evaluations that were previously improperly blocked - thus revealing the latent bug causing (at least some of) the semantic-ui reports.

I've separately posted the discovered bug on #56702, if you are interested.

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

Successfully merging this pull request may close these issues.

Adding an overload to .filter breaks specific inference with nested functions
3 participants