Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(60908): Unexpected "'Type' is declared but its value is never read." error with jsdoc @import syntax #60921

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

Conversation

a-tarasyuk
Copy link
Contributor

@a-tarasyuk a-tarasyuk commented Jan 6, 2025

Fixes #60908
Fixes #58368

@typescript-bot typescript-bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 6, 2025
@a-tarasyuk a-tarasyuk marked this pull request as ready for review January 10, 2025 20:42
@regseb
Copy link

regseb commented Jan 11, 2025

Maybe this pull request also fixes the issue #58368 (and its duplicate #58969).

@jakebailey
Copy link
Member

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 13, 2025

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

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 13, 2025

Hey @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/164532/artifacts?artifactName=tgz&fileId=878483ACBB3ADF254CED52B3B2040E424AF942FC5EA4126C9A5FE68FE33F4ADC02&fileName=/typescript-5.8.0-insiders.20250113.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/60921/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,390 62,390 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 195,638k (± 0.92%) 195,640k (± 0.95%) ~ 193,245k 196,877k p=0.521 n=6
Parse Time 1.61s (± 1.24%) 1.61s (± 2.07%) ~ 1.54s 1.63s p=1.000 n=6
Bind Time 0.87s (± 0.93%) 0.88s (± 1.12%) ~ 0.87s 0.89s p=0.498 n=6
Check Time 11.79s (± 0.56%) 11.87s (± 0.95%) ~ 11.75s 12.01s p=0.423 n=6
Emit Time 3.34s (± 3.05%) 3.31s (± 1.17%) ~ 3.27s 3.37s p=0.872 n=6
Total Time 17.62s (± 0.62%) 17.66s (± 0.75%) ~ 17.51s 17.82s p=0.748 n=6
angular-1 - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 947,969 947,969 ~ ~ ~ p=1.000 n=6
Types 410,955 410,955 ~ ~ ~ p=1.000 n=6
Memory used 1,225,839k (± 0.01%) 1,225,843k (± 0.00%) ~ 1,225,769k 1,225,886k p=0.936 n=6
Parse Time 8.04s (± 0.82%) 8.04s (± 1.02%) ~ 7.93s 8.13s p=0.747 n=6
Bind Time 2.28s (± 0.28%) 2.28s (± 1.22%) ~ 2.25s 2.32s p=0.739 n=6
Check Time 38.04s (± 0.21%) 38.23s (± 0.60%) ~ 37.98s 38.56s p=0.078 n=6
Emit Time 18.20s (± 0.97%) 18.17s (± 0.84%) ~ 17.96s 18.38s p=0.810 n=6
Total Time 66.56s (± 0.37%) 66.72s (± 0.39%) ~ 66.41s 67.14s p=0.422 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,445,991 2,445,991 ~ ~ ~ p=1.000 n=6
Types 896,571 896,571 ~ ~ ~ p=1.000 n=6
Memory used 2,309,956k (± 0.00%) 2,309,948k (± 0.01%) ~ 2,309,803k 2,310,154k p=0.689 n=6
Parse Time 10.79s (± 0.39%) 10.83s (± 0.39%) ~ 10.76s 10.87s p=0.170 n=6
Bind Time 2.51s (± 1.33%) 2.53s (± 0.82%) ~ 2.50s 2.55s p=0.121 n=6
Check Time 87.76s (± 1.05%) 88.81s (± 1.88%) ~ 87.07s 91.07s p=0.298 n=6
Emit Time 0.34s (± 3.06%) 0.35s (± 2.35%) ~ 0.34s 0.36s p=0.121 n=6
Total Time 101.39s (± 0.92%) 102.52s (± 1.59%) ~ 100.84s 104.67s p=0.149 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,377 1,228,378 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,839 266,839 ~ ~ ~ p=1.000 n=6
Memory used 2,727,704k (±14.62%) 2,630,600k (±13.74%) ~ 2,360,771k 3,091,916k p=0.378 n=6
Parse Time 6.70s (± 1.30%) 6.59s (± 1.85%) ~ 6.47s 6.79s p=0.149 n=6
Bind Time 2.16s (± 1.93%) 2.17s (± 1.41%) ~ 2.11s 2.19s p=0.806 n=6
Check Time 42.62s (± 0.37%) 42.82s (± 0.86%) ~ 42.24s 43.28s p=0.230 n=6
Emit Time 3.47s (± 1.96%) 3.50s (± 2.13%) ~ 3.42s 3.59s p=0.471 n=6
Total Time 54.94s (± 0.35%) 55.08s (± 0.78%) ~ 54.36s 55.57s p=0.230 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,377 1,228,378 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,839 266,839 ~ ~ ~ p=1.000 n=6
Memory used 3,157,184k (± 0.03%) 3,156,995k (± 0.02%) ~ 3,156,486k 3,157,887k p=0.936 n=6
Parse Time 8.69s (± 0.52%) 8.67s (± 0.82%) ~ 8.56s 8.74s p=0.748 n=6
Bind Time 2.64s (± 0.52%) 2.63s (± 1.54%) ~ 2.58s 2.67s p=0.514 n=6
Check Time 53.31s (± 0.26%) 53.37s (± 0.37%) ~ 53.07s 53.63s p=0.575 n=6
Emit Time 4.32s (± 1.93%) 4.31s (± 1.60%) ~ 4.21s 4.38s p=0.470 n=6
Total Time 68.96s (± 0.16%) 68.96s (± 0.39%) ~ 68.63s 69.29s p=0.810 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,624 262,625 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,695 106,695 ~ ~ ~ p=1.000 n=6
Memory used 440,851k (± 0.01%) 440,784k (± 0.02%) ~ 440,628k 440,897k p=0.471 n=6
Parse Time 3.56s (± 1.19%) 3.52s (± 0.66%) ~ 3.49s 3.54s p=0.107 n=6
Bind Time 1.31s (± 0.57%) 1.31s (± 0.79%) ~ 1.30s 1.33s p=0.931 n=6
Check Time 19.03s (± 0.36%) 18.94s (± 0.31%) ~ 18.87s 19.03s p=0.077 n=6
Emit Time 1.54s (± 0.71%) 1.54s (± 0.53%) ~ 1.52s 1.54s p=0.389 n=6
Total Time 25.44s (± 0.22%) 25.31s (± 0.29%) -0.13s (- 0.50%) 25.21s 25.39s p=0.013 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 70 70 ~ ~ ~ p=1.000 n=6
Symbols 226,095 226,095 ~ ~ ~ p=1.000 n=6
Types 94,488 94,488 ~ ~ ~ p=1.000 n=6
Memory used 371,651k (± 0.01%) 371,746k (± 0.04%) ~ 371,643k 371,933k p=0.575 n=6
Parse Time 2.91s (± 1.16%) 2.89s (± 1.11%) ~ 2.85s 2.93s p=0.125 n=6
Bind Time 1.60s (± 1.33%) 1.59s (± 0.51%) ~ 1.58s 1.60s p=0.677 n=6
Check Time 16.52s (± 0.50%) 16.48s (± 0.17%) ~ 16.45s 16.52s p=0.873 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 21.03s (± 0.59%) 20.96s (± 0.20%) ~ 20.91s 21.02s p=0.630 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,238,966 3,238,966 ~ ~ ~ p=1.000 n=6
Types 1,115,494 1,115,494 ~ ~ ~ p=1.000 n=6
Memory used 3,306,731k (± 0.01%) 3,306,843k (± 0.01%) ~ 3,306,321k 3,307,138k p=0.470 n=6
Parse Time 14.20s (± 0.16%) 14.18s (± 0.49%) ~ 14.11s 14.31s p=0.294 n=6
Bind Time 4.59s (± 2.63%) 4.65s (± 2.93%) ~ 4.53s 4.84s p=0.373 n=6
Check Time 88.19s (± 1.33%) 89.66s (± 2.27%) ~ 87.12s 92.27s p=0.575 n=6
Emit Time 27.92s (± 1.83%) 27.75s (± 1.96%) ~ 27.27s 28.69s p=0.422 n=6
Total Time 134.90s (± 1.22%) 136.24s (± 1.60%) ~ 133.45s 139.68s p=0.298 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 291,595 291,595 ~ ~ ~ p=1.000 n=6
Types 118,971 118,971 ~ ~ ~ p=1.000 n=6
Memory used 445,325k (± 0.02%) 445,429k (± 0.02%) ~ 445,308k 445,560k p=0.128 n=6
Parse Time 4.10s (± 0.93%) 4.10s (± 1.33%) ~ 4.03s 4.20s p=1.000 n=6
Bind Time 1.76s (± 0.46%) 1.78s (± 1.48%) ~ 1.74s 1.82s p=0.157 n=6
Check Time 18.77s (± 0.28%) 18.79s (± 0.48%) ~ 18.70s 18.91s p=0.688 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.64s (± 0.30%) 24.67s (± 0.54%) ~ 24.56s 24.90s p=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 555,050 555,050 ~ ~ ~ p=1.000 n=6
Types 186,115 186,115 ~ ~ ~ p=1.000 n=6
Memory used 493,942k (± 0.01%) 493,927k (± 0.01%) ~ 493,888k 493,972k p=0.748 n=6
Parse Time 2.76s (± 0.23%) 2.77s (± 0.40%) ~ 2.76s 2.79s p=0.081 n=6
Bind Time 0.96s (± 0.78%) 0.96s (± 0.57%) ~ 0.96s 0.97s p=0.137 n=6
Check Time 16.26s (± 0.25%) 16.25s (± 0.37%) ~ 16.19s 16.34s p=0.810 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.98s (± 0.21%) 19.99s (± 0.29%) ~ 19.92s 20.06s p=1.000 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60921/merge:

Everything looks good!

@jakebailey
Copy link
Member

Looking at the playground, I believe this does fix #58368, yes.

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Jan 17, 2025
Comment on lines 1112 to 1114
if (isJSDocImportTag(node)) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

Why is the import tag special here?

Also, this early return will leave inAssignmentPattern in a bad state, so I think it's better to skip the steps below that are broken with import tags if needed, or maybe there's something else wrong otherwise.

Copy link
Contributor Author

@a-tarasyuk a-tarasyuk Jan 17, 2025

Choose a reason for hiding this comment

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

@jakebailey thanks for the feedback. These changes are open for discussion :). This applies to the case when we have

/** @import { Foo } from 'foo' */
function foo() {}

The function acts as a container that holds locals (bind importClause), including the symbol Foo. Since this symbol is unused (and doesn't have an exportSymbol like the typedef does), the checker triggers an error.

if (.... local.exportSymbol) {
    return;
}

Perhaps the container for the import tag should be treated like a SourceFile...

ContainerFlags.IsContainer | ContainerFlags.IsControlFlowContainer | ContainerFlags.HasLocals;

Anyway, I’d be grateful for any ideas or suggestions regarding this case. thanks

Copy link
Member

Choose a reason for hiding this comment

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

Mainly, I'm trying to understand why import tags have to be special cased, but other JSDoc "declarations" don't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jakebailey JsDocImportTag reuses importClause, however, it doesn't bind it immediately, opting for a delayed binding instead

case SyntaxKind.JSDocImportTag:
bindJSDocImportTag(node as JSDocImportTag);
break;

function bindJSDocImportTag(node: JSDocImportTag) {
// don't bind the importClause yet; that's delayed until bindJSDocImports
bind(node.tagName);
bind(node.moduleSpecifier);
bind(node.attributes);
if (typeof node.comment !== "string") {
bindEach(node.comment);
}
}

When the binder executes bindChildren and bindEachChild, it iterates through all child nodes, including importClause, and binds them

case SyntaxKind.ImportClause:
return bindImportClause(node as ImportClause);

case SyntaxKind.ExportSpecifier:
return declareSymbolAndAddToSymbolTable(node as Declaration, SymbolFlags.Alias, SymbolFlags.AliasExcludes);

this creates incorrect locals for the parent container. Other tags, such as @typedef and @callback, don't rely on such nodes.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, I see; this honestly makes me wonder why the code doesn't just fall through into the code below, which seems to have a lot more special cases that feel like they'd matter in the same way...

Copy link
Member

Choose a reason for hiding this comment

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

As in, be written:

// ...
if (checkUnreachable(node)) {
    if (canHaveFlowNode(node) && node.flowNode) {
        node.flowNode = undefined;
    }
} else if (node.kind >= SyntaxKind.FirstStatement && node.kind <= SyntaxKind.LastStatement && (!options.allowUnreachableCode || node.kind === SyntaxKind.ReturnStatement)) {
    (node as HasFlowNode).flowNode = currentFlow;
}
switch (node.kind) {
// ...

Copy link
Member

Choose a reason for hiding this comment

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

I mean it falls over, so that can't be right either

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think unreachable flow cannot be handled properly without

bindEachChild(node);
bindJSDoc(node);

I'm exploring other options to skip processing child nodes for JSDoc imports...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think unreachable flow can remain as is. Alternatively, an additional flag could be added to symbols bound from the JSDoc import (ImportSpecifier) to exclude them from the unused locals check. @sandersn @jakebailey what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Two architecture questions:

  • Why is importClause binding delayed? Could it be not delayed, so that the normal unreachable bind/bindChildren calls work?
  • Why does checkUnreachable return/why doesn't Jake's idea work? That would be the least confusing fix, I think.

Otherwise .. the current code is the smallest fix, but it makes the code even more confusing to read.

@sandersn
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 14, 2025

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

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

Comment on lines +3951 to +3952
case SyntaxKind.JSDocImportTag:
return ContainerFlags.IsContainer | ContainerFlags.IsControlFlowContainer | ContainerFlags.HasLocals;
Copy link
Member

Choose a reason for hiding this comment

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

Oh wow, this seems good

@typescript-bot
Copy link
Collaborator

@sandersn Here are the results of running the user tests with tsc comparing main and refs/pull/60921/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @sandersn, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,390 62,390 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 192,919k (± 0.01%) 194,151k (± 0.99%) ~ 192,898k 196,708k p=0.470 n=6
Parse Time 1.31s 1.31s (± 0.39%) ~ 1.31s 1.32s p=0.174 n=6
Bind Time 0.73s (± 0.56%) 0.73s ~ ~ ~ p=0.405 n=6
Check Time 9.76s (± 0.43%) 9.76s (± 0.26%) ~ 9.74s 9.81s p=1.000 n=6
Emit Time 2.73s (± 0.65%) 2.74s (± 0.44%) ~ 2.72s 2.75s p=0.560 n=6
Total Time 14.52s (± 0.23%) 14.54s (± 0.21%) ~ 14.50s 14.59s p=0.687 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,670 ~ ~ ~ p=1.000 n=6
Types 410,947 410,947 ~ ~ ~ p=1.000 n=6
Memory used 1,224,326k (± 0.00%) 1,224,276k (± 0.00%) ~ 1,224,231k 1,224,319k p=0.109 n=6
Parse Time 6.62s (± 0.88%) 6.67s (± 0.30%) ~ 6.65s 6.70s p=0.086 n=6
Bind Time 1.89s (± 0.78%) 1.88s (± 0.67%) ~ 1.87s 1.90s p=0.321 n=6
Check Time 31.98s (± 0.29%) 31.93s (± 0.36%) ~ 31.82s 32.12s p=0.470 n=6
Emit Time 15.26s (± 0.36%) 15.29s (± 0.69%) ~ 15.11s 15.41s p=0.630 n=6
Total Time 55.75s (± 0.27%) 55.77s (± 0.20%) ~ 55.62s 55.96s p=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,363,439 2,363,439 ~ ~ ~ p=1.000 n=6
Types 846,685 846,685 ~ ~ ~ p=1.000 n=6
Memory used 2,133,320k (± 0.01%) 2,133,396k (± 0.01%) ~ 2,133,239k 2,133,537k p=0.378 n=6
Parse Time 7.21s (± 0.15%) 7.21s (± 0.37%) ~ 7.17s 7.24s p=0.870 n=6
Bind Time 2.50s (± 0.53%) 2.49s (± 0.62%) ~ 2.47s 2.51s p=0.222 n=6
Check Time 73.79s (± 0.62%) 73.68s (± 0.37%) ~ 73.37s 74.08s p=0.689 n=6
Emit Time 0.16s 0.15s (± 3.53%) ~ 0.15s 0.16s p=0.071 n=6
Total Time 83.66s (± 0.54%) 83.55s (± 0.32%) ~ 83.22s 83.91s p=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,713 1,226,713 ~ ~ ~ p=1.000 n=6
Types 266,991 266,991 ~ ~ ~ p=1.000 n=6
Memory used 2,967,234k (±10.03%) 3,088,516k (± 0.02%) ~ 3,087,735k 3,089,215k p=1.000 n=6
Parse Time 6.73s (± 1.04%) 6.73s (± 0.95%) ~ 6.64s 6.81s p=0.873 n=6
Bind Time 2.17s (± 2.09%) 2.15s (± 1.89%) ~ 2.10s 2.22s p=0.521 n=6
Check Time 42.92s (± 0.28%) 42.96s (± 0.13%) ~ 42.90s 43.03s p=0.173 n=6
Emit Time 3.52s (± 2.80%) 3.49s (± 2.60%) ~ 3.32s 3.56s p=0.521 n=6
Total Time 55.34s (± 0.19%) 55.32s (± 0.19%) ~ 55.21s 55.50s p=0.748 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,713 1,226,713 ~ ~ ~ p=1.000 n=6
Types 266,991 266,991 ~ ~ ~ p=1.000 n=6
Memory used 2,791,081k (±14.23%) 2,911,802k (±12.86%) ~ 2,427,093k 3,154,249k p=0.936 n=6
Parse Time 6.88s (± 1.53%) 6.91s (± 1.76%) ~ 6.73s 7.03s p=0.575 n=6
Bind Time 2.14s (± 1.94%) 2.17s (± 2.45%) ~ 2.13s 2.27s p=0.327 n=6
Check Time 42.66s (± 0.33%) 42.65s (± 0.40%) ~ 42.48s 42.88s p=1.000 n=6
Emit Time 3.50s (± 2.19%) 3.52s (± 1.68%) ~ 3.44s 3.61s p=0.936 n=6
Total Time 55.17s (± 0.50%) 55.25s (± 0.50%) ~ 54.83s 55.57s p=0.689 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,674 262,674 ~ ~ ~ p=1.000 n=6
Types 106,849 106,849 ~ ~ ~ p=1.000 n=6
Memory used 440,338k (± 0.01%) 440,336k (± 0.02%) ~ 440,193k 440,438k p=1.000 n=6
Parse Time 2.89s (± 0.80%) 2.89s (± 0.47%) ~ 2.88s 2.91s p=0.803 n=6
Bind Time 1.11s (± 0.37%) 1.11s ~ ~ ~ p=0.405 n=6
Check Time 15.81s (± 0.20%) 15.76s (± 0.48%) ~ 15.65s 15.86s p=0.335 n=6
Emit Time 1.30s (± 1.27%) 1.30s (± 1.73%) ~ 1.27s 1.32s p=1.000 n=6
Total Time 21.10s (± 0.22%) 21.06s (± 0.38%) ~ 20.95s 21.18s p=0.377 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,981 225,981 ~ ~ ~ p=1.000 n=6
Types 94,356 94,356 ~ ~ ~ p=1.000 n=6
Memory used 371,222k (± 0.01%) 371,262k (± 0.03%) ~ 371,176k 371,471k p=0.810 n=6
Parse Time 2.90s (± 1.67%) 2.88s (± 0.83%) ~ 2.86s 2.92s p=0.333 n=6
Bind Time 1.58s (± 0.86%) 1.58s (± 1.06%) ~ 1.56s 1.60s p=0.676 n=6
Check Time 16.49s (± 0.27%) 16.51s (± 0.44%) ~ 16.43s 16.64s p=0.745 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.96s (± 0.30%) 20.97s (± 0.49%) ~ 20.87s 21.16s p=0.809 n=6
vscode - node (v18.15.0, x64)
Errors 8 8 ~ ~ ~ p=1.000 n=6
Symbols 3,303,990 3,303,990 ~ ~ ~ p=1.000 n=6
Types 1,118,747 1,118,747 ~ ~ ~ p=1.000 n=6
Memory used 3,364,753k (± 0.01%) 3,364,728k (± 0.01%) ~ 3,364,546k 3,365,076k p=0.810 n=6
Parse Time 14.57s (± 0.66%) 14.63s (± 0.66%) ~ 14.50s 14.74s p=0.261 n=6
Bind Time 4.66s (± 0.84%) 4.72s (± 2.71%) ~ 4.62s 4.88s p=0.746 n=6
Check Time 93.22s (± 2.98%) 91.03s (± 2.45%) ~ 88.85s 94.08s p=0.173 n=6
Emit Time 27.11s (±10.11%) 28.42s (± 7.30%) ~ 24.34s 30.35s p=1.000 n=6
Total Time 139.55s (± 1.39%) 138.80s (± 1.34%) ~ 137.02s 141.84s p=0.230 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 308,237 308,237 ~ ~ ~ p=1.000 n=6
Types 134,948 134,948 ~ ~ ~ p=1.000 n=6
Memory used 463,367k (± 0.03%) 463,279k (± 0.02%) ~ 463,165k 463,408k p=0.173 n=6
Parse Time 4.11s (± 0.37%) 4.11s (± 0.85%) ~ 4.06s 4.15s p=0.805 n=6
Bind Time 1.81s (± 1.19%) 1.78s (± 1.48%) ~ 1.75s 1.82s p=0.147 n=6
Check Time 20.46s (± 0.17%) 20.46s (± 0.43%) ~ 20.31s 20.55s p=0.872 n=6
Emit Time 0.00s (±244.70%) 0.00s (±244.70%) ~ 0.00s 0.01s p=1.000 n=6
Total Time 26.39s (± 0.10%) 26.34s (± 0.31%) ~ 26.26s 26.46s p=0.420 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 558,554 558,554 ~ ~ ~ p=1.000 n=6
Types 188,194 188,194 ~ ~ ~ p=1.000 n=6
Memory used 492,289k (± 0.04%) 492,253k (± 0.02%) ~ 492,035k 492,374k p=0.423 n=6
Parse Time 3.35s (± 0.44%) 3.35s (± 0.15%) ~ 3.35s 3.36s p=1.000 n=6
Bind Time 1.20s (± 0.63%) 1.20s (± 1.33%) ~ 1.17s 1.21s p=0.485 n=6
Check Time 19.77s (± 0.34%) 19.80s (± 0.34%) ~ 19.72s 19.90s p=0.688 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.33s (± 0.26%) 24.36s (± 0.33%) ~ 24.26s 24.47s p=0.518 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@sandersn Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60921/merge:

Everything looks good!

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 For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Not started
5 participants