Skip to content

Fixed a regression with reporting unused parameters in potential predicates - #58514

Merged
Jake Bailey (jakebailey) merged 4 commits into
microsoft:mainfrom
Andarist:unused-locals-in-predicate
Jun 12, 2024
Merged

Fixed a regression with reporting unused parameters in potential predicates#58514
Jake Bailey (jakebailey) merged 4 commits into
microsoft:mainfrom
Andarist:unused-locals-in-predicate

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

fixes#58493

@jakebailey

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented May 13, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

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

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,24850,248~~~p=1.000 n=6
Memory used194,058k (± 1.03%)193,425k (± 0.99%)~192,164k195,959kp=0.173 n=6
Parse Time1.30s (± 0.69%)1.30s (± 1.57%)~1.27s1.32sp=1.000 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.55s (± 0.34%)9.54s (± 0.38%)~9.48s9.58sp=0.627 n=6
Emit Time2.65s (± 0.44%)2.64s (± 1.01%)~2.59s2.66sp=0.236 n=6
Total Time14.22s (± 0.22%)14.19s (± 0.36%)~14.13s14.26sp=0.377 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,110944,110~~~p=1.000 n=6
Types407,140407,140~~~p=1.000 n=6
Memory used1,222,106k (± 0.00%)1,222,086k (± 0.01%)~1,222,021k1,222,196kp=0.471 n=6
Parse Time6.77s (± 0.59%)6.78s (± 0.62%)~6.73s6.84sp=1.000 n=6
Bind Time1.87s (± 0.44%)1.88s (± 0.52%)~1.87s1.89sp=0.498 n=6
Check Time31.15s (± 0.27%)31.26s (± 0.21%)+0.11s (+ 0.34%)31.14s31.32sp=0.045 n=6
Emit Time14.72s (± 0.53%)14.80s (± 0.10%)~14.78s14.82sp=0.064 n=6
Total Time54.51s (± 0.30%)54.72s (± 0.13%)+0.20s (+ 0.38%)54.59s54.80sp=0.013 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,961,3491,961,349~~~p=1.000 n=6
Types696,910696,910~~~p=1.000 n=6
Memory used1,778,083k (± 0.00%)1,778,093k (± 0.00%)~1,778,052k1,778,114kp=0.575 n=6
Parse Time6.77s (± 0.18%)6.78s (± 0.29%)~6.76s6.81sp=0.797 n=6
Bind Time2.30s (± 0.65%)2.30s (± 0.53%)~2.29s2.32sp=1.000 n=6
Check Time56.95s (± 0.37%)57.10s (± 0.31%)~56.85s57.34sp=0.261 n=6
Emit Time0.14s0.14s~~~p=1.000 n=6
Total Time66.17s (± 0.32%)66.32s (± 0.27%)~66.07s66.56sp=0.261 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,221,1201,221,121+1 (+ 0.00%)~~p=0.001 n=6
Types259,503259,503~~~p=1.000 n=6
Memory used2,336,352k (± 0.03%)2,337,014k (± 0.04%)~2,336,098k2,338,264kp=0.173 n=6
Parse Time5.04s (± 1.54%)5.05s (± 0.38%)~5.03s5.08sp=0.471 n=6
Bind Time1.88s (± 0.64%)1.87s (± 0.99%)~1.85s1.89sp=0.934 n=6
Check Time33.78s (± 0.73%)33.81s (± 0.21%)~33.73s33.91sp=0.748 n=6
Emit Time2.68s (± 3.44%)2.63s (± 1.61%)~2.57s2.69sp=0.128 n=6
Total Time43.41s (± 0.41%)43.38s (± 0.26%)~43.25s43.56sp=0.936 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,221,1201,221,121+1 (+ 0.00%)~~p=0.001 n=6
Types259,503259,503~~~p=1.000 n=6
Memory used2,412,625k (± 0.02%)2,413,238k (± 0.03%)~2,412,040k2,414,007kp=0.093 n=6
Parse Time6.28s (± 1.24%)6.20s (± 1.64%)~6.01s6.29sp=0.173 n=6
Bind Time2.04s (± 0.67%)2.06s (± 0.81%)+0.02s (+ 1.15%)2.04s2.08sp=0.043 n=6
Check Time40.20s (± 0.29%)40.31s (± 0.42%)~40.08s40.49sp=0.336 n=6
Emit Time3.18s (± 2.27%)3.11s (± 2.90%)~3.00s3.26sp=0.173 n=6
Total Time51.71s (± 0.26%)51.68s (± 0.45%)~51.31s51.91sp=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,716256,717+1 (+ 0.00%)~~p=0.001 n=6
Types104,580104,580~~~p=1.000 n=6
Memory used425,973k (± 0.02%)425,883k (± 0.01%)~425,813k425,966kp=0.093 n=6
Parse Time4.17s (± 0.58%)4.16s (± 0.42%)~4.13s4.18sp=0.168 n=6
Bind Time1.62s (± 0.50%)1.63s (± 0.85%)~1.61s1.65sp=0.270 n=6
Check Time22.15s (± 0.49%)22.11s (± 0.15%)~22.06s22.15sp=1.000 n=6
Emit Time1.70s (± 1.05%)1.73s (± 1.08%)~1.71s1.75sp=0.056 n=6
Total Time29.64s (± 0.36%)29.61s (± 0.17%)~29.54s29.67sp=0.936 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,575224,575~~~p=1.000 n=6
Types93,78593,785~~~p=1.000 n=6
Memory used369,887k (± 0.02%)369,847k (± 0.04%)~369,711k370,106kp=0.230 n=6
Parse Time2.85s (± 0.67%)2.84s (± 0.82%)~2.81s2.88sp=0.624 n=6
Bind Time1.58s (± 1.01%)1.58s (± 0.80%)~1.56s1.59sp=0.869 n=6
Check Time15.64s (± 0.44%)15.64s (± 0.24%)~15.60s15.70sp=1.000 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.07s (± 0.41%)20.06s (± 0.24%)~19.99s20.14sp=1.000 n=6
vscode - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,822,4152,822,415~~~p=1.000 n=6
Types957,541957,541~~~p=1.000 n=6
Memory used2,994,941k (± 0.00%)2,995,024k (± 0.00%)~2,994,981k2,995,122kp=0.128 n=6
Parse Time13.82s (± 0.19%)13.82s (± 0.13%)~13.79s13.84sp=0.508 n=6
Bind Time4.14s (± 0.33%)4.14s (± 0.12%)~4.14s4.15sp=0.928 n=6
Check Time73.44s (± 0.46%)73.44s (± 0.43%)~73.06s74.02sp=0.936 n=6
Emit Time23.61s (± 0.45%)23.47s (± 0.48%)~23.26s23.57sp=0.078 n=6
Total Time115.02s (± 0.35%)114.88s (± 0.30%)~114.53s115.47sp=0.471 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,866265,866~~~p=1.000 n=6
Types108,401108,401~~~p=1.000 n=6
Memory used410,516k (± 0.01%)410,514k (± 0.01%)~410,452k410,570kp=0.748 n=6
Parse Time3.84s (± 1.39%)3.83s (± 0.86%)~3.79s3.87sp=1.000 n=6
Bind Time1.66s (± 0.59%)1.66s (± 1.04%)~1.64s1.68sp=0.805 n=6
Check Time16.98s (± 0.32%)16.96s (± 0.32%)~16.89s17.02sp=0.810 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.49s (± 0.38%)22.45s (± 0.36%)~22.34s22.56sp=0.748 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,639524,639~~~p=1.000 n=6
Types178,906178,906~~~p=1.000 n=6
Memory used462,675k (± 0.02%)462,662k (± 0.01%)~462,595k462,744kp=0.689 n=6
Parse Time3.89s (± 0.46%)3.88s (± 0.36%)~3.86s3.90sp=0.370 n=6
Bind Time1.44s (± 1.04%)1.44s (± 1.57%)~1.42s1.48sp=0.285 n=6
Check Time22.53s (± 0.33%)22.57s (± 0.54%)~22.36s22.72sp=0.377 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.87s (± 0.26%)27.89s (± 0.38%)~27.74s28.06sp=0.810 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests comparing main and refs/pull/58514/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos comparing main and refs/pull/58514/merge:

Everything looks good!

@sandersnNathan Shively-Sanders (sandersn) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dan Vanderkam (@danvk) guessed that the source of the problem was a speculative getTypeOfSymbol. But this PR fixes resolution for all parameters. If it applies to all parameters, why wasn't this observed before Dan's change?

  1. Need tests of used/unused binding patterns. These probably exist already, but please double-check.
  2. If this implementation is correct, I think it would be easier to read in isSelfReferenceLocation, as long as that doesn't make performance worse (from adding a second parameter).

Edit: having looked at checkIfExpressionRefinesAnyParameter, Dan's specific guess doesn't make sense to me. My (fuzzier) guess is that we haven't tried to resolve a parameter name from itself before and never observed that it mistakenly caused the parameter to be marked as used. But I'm not sure what in the new code is causing that.

Comment threadsrc/compiler/utilities.ts Outdated
break;
case SyntaxKind.Parameter:
case SyntaxKind.Parameter: {
const param = location as ParameterDeclaration;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

style question: is there a reason for all the casts in this code? Maybe it's better to drop this alias and use location as ParameterDeclaration) everywhere.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

No specific reason, I just prefer to have a single cast than multiple ones that are the same for the same variable. I can change this if you prefer the other style.

Comment threadsrc/compiler/utilities.ts Outdated
case SyntaxKind.Parameter: {
const param = location as ParameterDeclaration;
if (lastLocation === param.name) {
lastSelfReferenceLocation = param;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd almost prefer a new parameter and entry in isSelfReferenceLocation like

functionisSelfReferenceLocation(node: Node,lastLocation: Node): node is SelfReferenceLocation{switch(node.kind){caseSyntaxKind.Parameter: returnlastLocation===(nodeasParameterDeclaration).name// ...

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I just pushed out the suggested change

Comment threadsrc/compiler/utilities.ts Outdated
case SyntaxKind.Parameter:
case SyntaxKind.Parameter: {
const param = location as ParameterDeclaration;
if (lastLocation === param.name) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what does this do when param.name is a BindingPattern? Do we have tests to make sure that they still correctly get marked unused (and used when used)?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

yeah, there are tests for that already and the changes to checkIfExpressionRefinesAnyParameter that introduced this bug don't affect binding patterns

@Andarist

Copy link
Copy Markdown
ContributorAuthor

My (fuzzier) guess is that we haven't tried to resolve a parameter name from itself before and never observed that it mistakenly caused the parameter to be marked as used.

This is correct.

But I'm not sure what in the new code is causing that.

It's checkIfExpressionRefinesParameter through the getFlowTypeOfReference. It leads to narrowTypeByCallExpression and thus to isMatchingReference and getResolvedSymbol that calls resolveName. It's this newly introduced "fake" control flow that changed this. By fake, I mean it's not created by the binder.

Comment threadsrc/compiler/utilities.ts Outdated
Comment threadsrc/compiler/utilities.ts Outdated
@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) test it
TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 10, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 10, 2024

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/162149/artifacts?artifactName=tgz&fileId=86D11D5A48715012B573506CBDBDE84042DDBF22442164A7053BEC2F662E26FF02&fileName=/typescript-5.6.0-insiders.20240610.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.6.0-pr-58514-9".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests with tsc comparing main and refs/pull/58514/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

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

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15362,153~~~p=1.000 n=6
Types50,24250,242~~~p=1.000 n=6
Memory used192,964k (± 0.78%)193,521k (± 0.93%)~192,323k195,877kp=0.471 n=6
Parse Time1.95s (± 1.12%)1.95s (± 0.46%)~1.94s1.96sp=0.557 n=6
Bind Time1.07s (± 1.24%)1.07s (± 0.97%)~1.05s1.08sp=0.804 n=6
Check Time14.04s (± 0.38%)14.02s (± 0.37%)~13.96s14.08sp=0.377 n=6
Emit Time4.05s (± 1.21%)4.02s (± 1.04%)~3.96s4.07sp=0.226 n=6
Total Time21.11s (± 0.48%)21.05s (± 0.27%)~20.96s21.14sp=0.628 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,109944,109~~~p=1.000 n=6
Types407,049407,049~~~p=1.000 n=6
Memory used1,222,168k (± 0.00%)1,222,184k (± 0.01%)~1,222,074k1,222,260kp=0.575 n=6
Parse Time8.11s (± 0.55%)8.11s (± 0.37%)~8.08s8.16sp=0.747 n=6
Bind Time2.24s (± 0.82%)2.23s (± 0.59%)~2.21s2.25sp=0.372 n=6
Check Time36.65s (± 0.39%)36.49s (± 0.26%)~36.33s36.61sp=0.054 n=6
Emit Time18.11s (± 0.71%)18.07s (± 0.35%)~17.99s18.14sp=0.810 n=6
Total Time65.11s (± 0.25%)64.90s (± 0.21%)~64.66s65.06sp=0.093 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols2,061,5752,061,575~~~p=1.000 n=6
Types905,189905,189~~~p=1.000 n=6
Memory used2,072,041k (± 0.01%)2,072,012k (± 0.01%)~2,071,830k2,072,127kp=0.873 n=6
Parse Time10.00s (± 0.57%)9.98s (± 0.23%)~9.94s10.01sp=0.257 n=6
Bind Time3.38s (± 1.22%)3.39s (± 0.85%)~3.35s3.42sp=0.686 n=6
Check Time100.70s (± 1.29%)100.75s (± 1.15%)~98.43s101.62sp=0.936 n=6
Emit Time0.20s (± 3.73%)0.20s (± 2.54%)~0.20s0.21sp=0.784 n=6
Total Time114.27s (± 1.09%)114.31s (± 0.99%)~112.08s115.22sp=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,230,4241,230,425+1 (+ 0.00%)~~p=0.001 n=6
Types261,178261,178~~~p=1.000 n=6
Memory used2,351,286k (± 0.05%)2,351,511k (± 0.03%)~2,350,104k2,352,279kp=0.936 n=6
Parse Time4.97s (± 0.74%)4.99s (± 1.19%)~4.92s5.10sp=0.575 n=6
Bind Time1.90s (± 0.27%)1.89s (± 0.52%)-0.02s (- 0.79%)1.88s1.90sp=0.020 n=6
Check Time34.14s (± 0.43%)34.06s (± 0.20%)~34.00s34.19sp=0.297 n=6
Emit Time2.67s (± 2.32%)2.63s (± 1.66%)~2.58s2.68sp=0.470 n=6
Total Time43.70s (± 0.34%)43.60s (± 0.25%)~43.50s43.80sp=0.128 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,230,4241,230,425+1 (+ 0.00%)~~p=0.001 n=6
Types261,178261,178~~~p=1.000 n=6
Memory used2,504,148k (± 3.31%)2,479,398k (± 3.16%)~2,428,391k2,581,177kp=0.936 n=6
Parse Time6.24s (± 0.88%)6.23s (± 0.87%)~6.15s6.30sp=0.688 n=6
Bind Time2.02s (± 0.41%)2.01s (± 0.99%)~1.98s2.04sp=0.625 n=6
Check Time40.62s (± 0.25%)40.64s (± 0.40%)~40.47s40.92sp=0.936 n=6
Emit Time3.10s (± 1.97%)3.09s (± 2.55%)~3.01s3.22sp=0.518 n=6
Total Time51.99s (± 0.29%)51.98s (± 0.44%)~51.70s52.27sp=1.000 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols259,181259,182+1 (+ 0.00%)~~p=0.001 n=6
Types105,173105,173~~~p=1.000 n=6
Memory used428,879k (± 0.02%)428,883k (± 0.01%)~428,831k428,950kp=0.471 n=6
Parse Time4.08s (± 0.48%)4.07s (± 0.48%)~4.05s4.10sp=0.806 n=6
Bind Time1.63s (± 1.38%)1.65s (± 0.49%)~1.64s1.66sp=0.142 n=6
Check Time22.42s (± 0.28%)22.36s (± 0.24%)~22.30s22.42sp=0.108 n=6
Emit Time1.73s (± 1.29%)1.73s (± 1.84%)~1.70s1.79sp=1.000 n=6
Total Time29.87s (± 0.28%)29.81s (± 0.29%)~29.72s29.95sp=0.297 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,565224,565~~~p=1.000 n=6
Types93,73493,734~~~p=1.000 n=6
Memory used369,725k (± 0.02%)369,729k (± 0.02%)~369,692k369,839kp=1.000 n=6
Parse Time2.80s (± 0.84%)2.80s (± 0.76%)~2.77s2.82sp=1.000 n=6
Bind Time1.59s (± 1.05%)1.57s (± 0.53%)~1.57s1.59sp=0.122 n=6
Check Time15.69s (± 0.19%)15.65s (± 0.14%)-0.04s (- 0.29%)15.62s15.68sp=0.023 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.07s (± 0.22%)20.02s (± 0.12%)-0.05s (- 0.27%)19.98s20.05sp=0.045 n=6
vscode - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,852,8512,852,851~~~p=1.000 n=6
Types967,821967,821~~~p=1.000 n=6
Memory used3,024,837k (± 0.00%)3,024,806k (± 0.00%)~3,024,738k3,024,900kp=0.298 n=6
Parse Time13.87s (± 0.42%)13.85s (± 0.17%)~13.82s13.88sp=0.421 n=6
Bind Time4.21s (± 1.93%)4.21s (± 2.20%)~4.13s4.39sp=0.871 n=6
Check Time75.70s (± 2.49%)74.34s (± 1.47%)~73.42s76.38sp=0.173 n=6
Emit Time22.01s (± 7.99%)23.16s (± 4.44%)~21.26s24.02sp=0.230 n=6
Total Time115.78s (± 0.21%)115.57s (± 0.35%)~115.00s116.19sp=0.298 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols266,613266,613~~~p=1.000 n=6
Types108,648108,648~~~p=1.000 n=6
Memory used411,753k (± 0.02%)411,812k (± 0.02%)~411,678k411,926kp=0.378 n=6
Parse Time4.76s (± 0.91%)4.76s (± 0.61%)~4.73s4.80sp=0.871 n=6
Bind Time2.06s (± 1.18%)2.06s (± 1.17%)~2.02s2.09sp=0.462 n=6
Check Time21.11s (± 0.30%)21.13s (± 0.53%)~20.97s21.24sp=0.688 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.93s (± 0.37%)27.95s (± 0.42%)~27.80s28.08sp=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols526,436526,436~~~p=1.000 n=6
Types179,425179,425~~~p=1.000 n=6
Memory used464,301k (± 0.02%)464,180k (± 0.07%)~463,540k464,434kp=0.810 n=6
Parse Time2.64s (± 0.62%)2.63s (± 0.24%)~2.62s2.64sp=0.615 n=6
Bind Time0.99s (± 0.76%)0.99s (± 0.52%)~0.99s1.00sp=0.241 n=6
Check Time15.27s (± 0.46%)15.23s (± 0.34%)~15.17s15.30sp=0.336 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time18.89s (± 0.38%)18.85s (± 0.27%)~18.80s18.92sp=0.423 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/58514/merge:

Everything looks good!

@jakebailey
Jake Bailey (jakebailey) merged commit 359646b into microsoft:mainJun 12, 2024
@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-5.5

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
cherry-pick this to release-5.5✅ Started✅ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I've created #58841 for you.

@Andarist
Mateusz Burzyński (Andarist) deleted the unused-locals-in-predicate branch June 12, 2024 21:14
Nathan Shively-Sanders (sandersn) pushed a commit that referenced this pull request Jun 14, 2024
…e-5.5 (#58841)
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Milestone BugPRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression in detecting unused parameters in 5.5.0-beta

4 participants

@Andarist@jakebailey@typescript-bot@sandersn