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

error on variables that are used but never initialized #55887

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

Conversation

Zzzen
Copy link
Contributor

@Zzzen Zzzen commented Sep 27, 2023

Fixes #23305

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Sep 27, 2023
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #23305. If you can get it accepted, this PR will have a better chance of being reviewed.

@@ -2147,7 +2147,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
var deferredGlobalClassAccessorDecoratorResultType: GenericType | undefined;
var deferredGlobalClassFieldDecoratorContextType: GenericType | undefined;

var allPotentiallyUnusedIdentifiers = new Map<Path, PotentiallyUnusedIdentifier[]>(); // key is file name
var allPotentiallyUnusedOrUninitializedIdentifiers = new Map<Path, PotentiallyUnusedIdentifier[]>(); // key is file name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will allLocalIdentifiers be a better variable name?

@Zzzen Zzzen marked this pull request as draft September 27, 2023 07:36
@Zzzen Zzzen marked this pull request as ready for review September 27, 2023 07:57
@fatcerberus
Copy link

error on variables that are used but never uninitialized

I assume you meant “initialized” here.

@Zzzen Zzzen changed the title error on variables that are used but never uninitialized error on variables that are used but never initialized Sep 27, 2023
@@ -5765,6 +5765,7 @@ export interface Symbol {
/** @internal */ exportSymbol?: Symbol; // Exported symbol associated with this symbol
/** @internal */ constEnumOnlyModule: boolean | undefined; // True if module contains only const enums or other modules with only const enums
/** @internal */ isReferenced?: SymbolFlags; // True if the symbol is referenced elsewhere. Keeps track of the meaning of a reference in case a symbol is both a type parameter and parameter.
/** @internal */ isInitialized?: boolean; // True if the symbol is ever initialized.
Copy link
Member

Choose a reason for hiding this comment

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

If this is set in the checker, it probably shouldn't be directly set on the Symbol (and should be set on SymbolLinks instead). Maybe someone else has some thoughts.

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, can you just use isAssigned (defined below) which is set in the binder? You'll need to change some existing code to proactively check for whether the symbol also corresponds to a parameter.

Copy link
Member

Choose a reason for hiding this comment

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

Based on perf, this is making the Symbol allocated in the next size class up, which is undesirable. So probably on links.

Copy link
Member

Choose a reason for hiding this comment

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

Can't we just reuse isAssigned?

Copy link
Member

Choose a reason for hiding this comment

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

Probably!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. It's totally fine to reuse isAssigned.

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this
@typescript-bot test this
@typescript-bot test top300
@typescript-bot user test this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 27, 2023

Hey @DanielRosenwasser, 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/157977/artifacts?artifactName=tgz&fileId=042CD02ADCF3ACCA8F8A1966AF9CB028ABA7B1793581431400BBC70BDA43B29F02&fileName=/typescript-5.3.0-insiders.20230927.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

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Unknown failure"
  • 2 instances of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

pyright

/mnt/ts_downloads/pyright/build.sh

  • [NEW] error TS2454: Variable 'key' is used before being assigned.
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(906,17)
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(935,13)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(906,17)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(935,13)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(906,17)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(935,13)
  • [NEW] error TS2454: Variable 'entry1' is used before being assigned.
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(907,17)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(907,17)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(907,17)
  • [NEW] error TS2454: Variable 'entry2' is used before being assigned.
    • /mnt/ts_downloads/pyright/pyright: ../pyright-internal/src/analyzer/types.ts(936,13)
    • /mnt/ts_downloads/pyright/pyright-internal: src/analyzer/types.ts(936,13)
    • /mnt/ts_downloads/pyright/vscode-pyright: ../pyright-internal/src/analyzer/types.ts(936,13)

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
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 294,981k (± 0.01%) 296,154k (± 0.01%) +1,173k (+ 0.40%) 296,108k 296,188k p=0.005 n=6
Parse Time 2.63s (± 0.50%) 2.63s (± 0.65%) ~ 2.61s 2.65s p=0.928 n=6
Bind Time 0.83s (± 0.98%) 0.83s (± 1.00%) ~ 0.83s 0.85s p=0.673 n=6
Check Time 8.06s (± 0.21%) 8.07s (± 0.45%) ~ 8.01s 8.11s p=0.686 n=6
Emit Time 7.05s (± 0.24%) 7.05s (± 0.34%) ~ 7.02s 7.08s p=0.808 n=6
Total Time 18.57s (± 0.11%) 18.58s (± 0.25%) ~ 18.54s 18.67s p=0.870 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 191,104k (± 0.55%) 194,458k (± 1.47%) +3,354k (+ 1.75%) 191,078k 196,973k p=0.013 n=6
Parse Time 1.35s (± 0.94%) 1.34s (± 0.78%) ~ 1.33s 1.36s p=0.615 n=6
Bind Time 0.73s (± 0.00%) 0.73s (± 0.56%) ~ 0.73s 0.74s p=0.405 n=6
Check Time 9.20s (± 0.81%) 9.16s (± 0.22%) ~ 9.13s 9.19s p=0.373 n=6
Emit Time 2.63s (± 0.44%) 2.63s (± 0.85%) ~ 2.59s 2.65s p=0.451 n=6
Total Time 13.91s (± 0.50%) 13.87s (± 0.20%) ~ 13.83s 13.91s p=0.106 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,230k (± 0.00%) 348,860k (± 0.00%) +1,630k (+ 0.47%) 348,840k 348,880k p=0.005 n=6
Parse Time 2.46s (± 0.63%) 2.46s (± 0.67%) ~ 2.43s 2.48s p=0.410 n=6
Bind Time 0.94s (± 0.00%) 0.94s (± 0.00%) ~ 0.94s 0.94s p=1.000 n=6
Check Time 6.86s (± 0.53%) 6.89s (± 0.40%) ~ 6.84s 6.91s p=0.169 n=6
Emit Time 4.02s (± 0.34%) 4.03s (± 0.62%) ~ 4.00s 4.07s p=0.463 n=6
Total Time 14.27s (± 0.22%) 14.31s (± 0.31%) ~ 14.24s 14.38s p=0.198 n=6
TFS - node (v18.15.0, x64)
Memory used 302,517k (± 0.01%) 303,750k (± 0.01%) +1,233k (+ 0.41%) 303,715k 303,784k p=0.005 n=6
Parse Time 1.99s (± 1.21%) 2.00s (± 0.92%) ~ 1.97s 2.02s p=0.405 n=6
Bind Time 1.00s (± 0.98%) 1.01s (± 1.02%) ~ 0.99s 1.02s p=0.356 n=6
Check Time 6.25s (± 0.43%) 6.28s (± 0.44%) ~ 6.24s 6.32s p=0.091 n=6
Emit Time 3.52s (± 0.67%) 3.52s (± 0.39%) ~ 3.50s 3.53s p=0.934 n=6
Total Time 12.76s (± 0.21%) 12.80s (± 0.30%) ~ 12.74s 12.85s p=0.054 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,486k (± 0.00%) 474,320k (± 0.01%) +3,833k (+ 0.81%) 474,247k 474,402k p=0.005 n=6
Parse Time 2.57s (± 0.29%) 2.57s (± 0.16%) ~ 2.56s 2.57s p=0.389 n=6
Bind Time 0.99s (± 0.52%) 0.99s (± 0.76%) ~ 0.98s 1.00s p=0.784 n=6
Check Time 16.61s (± 0.45%) 16.67s (± 0.39%) ~ 16.58s 16.75s p=0.171 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.18s (± 0.35%) 20.23s (± 0.33%) ~ 20.14s 20.32s p=0.128 n=6
xstate - node (v18.15.0, x64)
Memory used 512,630k (± 0.01%) 515,328k (± 0.01%) +2,698k (+ 0.53%) 515,274k 515,412k p=0.005 n=6
Parse Time 3.27s (± 0.32%) 3.27s (± 0.36%) ~ 3.25s 3.28s p=0.619 n=6
Bind Time 1.55s (± 0.53%) 1.55s (± 0.58%) ~ 1.54s 1.56s p=0.550 n=6
Check Time 2.85s (± 0.60%) 2.87s (± 0.87%) ~ 2.84s 2.91s p=0.167 n=6
Emit Time 0.08s (± 7.90%) 0.08s (± 5.21%) ~ 0.07s 0.08s p=0.673 n=6
Total Time 7.74s (± 0.26%) 7.76s (± 0.24%) +0.02s (+ 0.32%) 7.75s 7.80s p=0.020 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,358ms (± 1.11%) 2,359ms (± 1.08%) ~ 2,325ms 2,396ms p=0.936 n=6
Req 2 - geterr 5,345ms (± 1.47%) 5,411ms (± 1.75%) ~ 5,278ms 5,526ms p=0.230 n=6
Req 3 - references 326ms (± 0.36%) 327ms (± 0.73%) ~ 326ms 332ms p=0.492 n=6
Req 4 - navto 278ms (± 0.95%) 275ms (± 1.18%) ~ 272ms 279ms p=0.088 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 (± 8.11%) 87ms (± 6.92%) ~ 75ms 91ms p=0.106 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,485ms (± 0.89%) 2,480ms (± 0.72%) ~ 2,467ms 2,512ms p=0.748 n=6
Req 2 - geterr 4,126ms (± 1.94%) 4,140ms (± 2.11%) ~ 4,054ms 4,232ms p=0.471 n=6
Req 3 - references 336ms (± 1.08%) 339ms (± 1.62%) ~ 333ms 344ms p=0.566 n=6
Req 4 - navto 284ms (± 0.29%) 284ms (± 0.41%) ~ 283ms 286ms p=1.000 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 78ms (± 5.67%) 82ms (± 7.39%) ~ 76ms 87ms p=0.465 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,600ms (± 0.38%) 2,591ms (± 0.30%) ~ 2,582ms 2,602ms p=0.128 n=6
Req 2 - geterr 1,679ms (± 3.38%) 1,713ms (± 2.64%) ~ 1,641ms 1,758ms p=0.230 n=6
Req 3 - references 106ms (± 0.93%) 122ms (± 8.11%) 🔻+16ms (+14.60%) 109ms 130ms p=0.004 n=6
Req 4 - navto 359ms (± 0.38%) 360ms (± 0.73%) ~ 358ms 365ms p=1.000 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 302ms (± 0.88%) 306ms (± 2.15%) ~ 296ms 314ms p=0.222 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.09ms (± 0.18%) 151.99ms (± 0.16%) -0.09ms (- 0.06%) 151.08ms 155.83ms p=0.001 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 227.68ms (± 0.16%) 227.57ms (± 0.15%) -0.10ms (- 0.05%) 226.16ms 232.36ms p=0.007 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.46ms (± 0.19%) 229.40ms (± 0.16%) ~ 227.94ms 232.78ms p=0.371 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 229.00ms (± 0.18%) 229.05ms (± 0.16%) +0.05ms (+ 0.02%) 227.44ms 231.72ms p=0.046 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

@jakebailey
Copy link
Member

Hm, perf result indicates that adding this prop has moved Symbol into a new size class, given the memory increase.

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

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

Last few requests

{"seq":728,"type":"request","command":"navto","arguments":{"searchValue":"a","maxResultCount":256}}
{"seq":729,"type":"request","command":"navto","arguments":{"searchValue":"a1R","maxResultCount":256}}
{"seq":730,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":["@PROJECT_ROOT@/apps/api/test/lib/bookings/_post.test.ts"],"openFiles":[]}}
{"seq":731,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/apps/web/components/AppListCard.tsx","projectRootPath":"@PROJECT_ROOT@"}]}}

Repro steps

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

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

apollographql/apollo-client

1 of 10 projects failed to build with the old tsc and were ignored

tsconfig.json

immich-app/immich

4 of 6 projects failed to build with the old tsc and were ignored

server/tsconfig.json

microsoft/playwright

4 of 14 projects failed to build with the old tsc and were ignored

utils/generate_types/test/tsconfig.json

microsoft/vscode

5 of 54 projects failed to build with the old tsc and were ignored

extensions/ipynb/tsconfig.json

src/tsconfig.monaco.json

src/tsconfig.tsec.json

pubkey/rxdb

8 of 10 projects failed to build with the old tsc and were ignored

config/tsconfig.types.json

tsconfig.json

snabbdom/snabbdom

test/tsconfig.json

tsconfig.json

tldraw/tldraw

1 of 5 projects failed to build with the old tsc and were ignored

apps/examples/tsconfig.json

apps/vscode/editor/tsconfig.json

apps/vscode/extension/tsconfig.json

Tonejs/Tone.js

1 of 2 projects failed to build with the old tsc and were ignored

scripts/tsconfig.build.json

video-dev/hls.js

tsconfig.json

vuejs/core

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.build.json

tsconfig.json

vuetifyjs/vuetify

4 of 7 projects failed to build with the old tsc and were ignored

packages/vuetify/tsconfig.checks.json

packages/vuetify/tsconfig.dist.json

packages/vuetify/tsconfig.json

@DanielRosenwasser
Copy link
Member

I spent a bit looking at the breaks and decided to take a break.

There was one example of a TODO which is questionable - I didn't quite understand that.

https://github.com/immich-app/immich/blob/0a22e64799435a6ddf668733fab82da542e495f9/server/src/immich/api-v1/asset/asset.service.spec.ts#L89

For the most part, in the top 300 TypeScript projects on GitHub, the only real false negatives are variables that get assigned in a for/in or for/of loop. That seems like a bug and I'd like to rerun the tests once that's fixed.

https://github.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/class.ts#L8-L18

https://github.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/eventlisteners.ts#L56-L67

https://github.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/style.ts#L29-L40

https://github.com/snabbdom/snabbdom/blob/420fa78abe98440d24e2c5af2f683e040409e0a6/src/modules/style.ts#L70-L74

https://github.com/microsoft/playwright/blob/c8143748e6af90df485dd46410915033b1001b73/utils/generate_types/test/test.ts#L164-L173

https://github.com/microsoft/vscode/blob/c965b118a67c0f22895d2af899736d0e0aa82ffd/extensions/ipynb/src/helper.ts#L44-L58

https://github.com/vuejs/core/blob/b8fc18c0b23be9a77b05dc41ed452a87a0becf82/packages/compiler-core/src/parse.ts#L122-L123

https://github.com/vuejs/core/blob/b8fc18c0b23be9a77b05dc41ed452a87a0becf82/packages/template-explorer/src/index.ts#L122-L123

https://github.com/vuetifyjs/vuetify/blob/3832f737c030d2f8a12b004473879f28689dc75e/packages/vuetify/src/components/VGrid/VCol.ts#L120-L121

https://github.com/vuetifyjs/vuetify/blob/3832f737c030d2f8a12b004473879f28689dc75e/packages/vuetify/src/components/VGrid/VRow.ts#L126-L127

@fatcerberus
Copy link

Just to be clear: "False negative" in this context means "this should be an error but isn't", correct?

I'm a little confused by the for..in examples - why would you write let foo; for (foo in whatever) ... instead of just for (let foo in whatever) ..., unless you're intending to use the variable outside the loop.

@@ -13,7 +13,7 @@
// for (<|var { [|property1|]: p1 } of elems|>) {
// }
// var p2;
// for (<|{ [|{| isWriteAccess: true |}property1|] : p2 } of elems|>) {
// for (<|{ [|property1|] : p2 } of elems|>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could anyone please explain the meaning of "isWriteAccess" in this context? Additionally, I'm curious to know if this qualifies as a regression.

Copy link
Member

Choose a reason for hiding this comment

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

in find-all-references, we can indicate that certain references are writes so that editors can filter reads and writes out, or display them differently. Technically this is correct as property1 s not being written to - p2 is.

Copy link
Member

Choose a reason for hiding this comment

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

Though I wonder if p2 has isWriteAccess on it.

@Zzzen
Copy link
Contributor Author

Zzzen commented Sep 28, 2023

For the most part, #55887 (comment), the only real false negatives are variables that get assigned in a for/in or for/of loop. That seems like a bug and I'd like to rerun the tests once that's fixed.

It has been fixed. I'm also curious why they were written in this manner.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Sep 28, 2023

Just to be clear: "False negative" in this context means "this should be an error but isn't", correct?

Sorry, I meant false positives. I gotta stop trying to sound smarter than I am.

What I mean to say is we shouldn't error on the for/ofs.

@DanielRosenwasser
Copy link
Member

I'm a little bit concerned that we aren't guarding previous accesses of isAssigned in some way - but it looks like the binder didn't need to be changed at all. Were accesses of isAssigned already guarded by something like symbol.flags & SymbolFlags.Parameter?

@typescript-bot pack this
@typescript-bot test top300
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 28, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 28, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 28, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 28, 2023

Hey @DanielRosenwasser, 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/157991/artifacts?artifactName=tgz&fileId=541F04B5639FB9F5B63BB8BBBC51FAD6D3A152813FD6E121BF51F5837351B28902&fileName=/typescript-5.3.0-insiders.20230928.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

@DanielRosenwasser
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 294,987k (± 0.02%) 295,008k (± 0.01%) ~ 294,967k 295,036k p=0.378 n=6
Parse Time 2.63s (± 0.75%) 2.65s (± 0.58%) ~ 2.64s 2.68s p=0.113 n=6
Bind Time 0.83s (± 0.49%) 0.84s (± 1.30%) ~ 0.83s 0.85s p=0.178 n=6
Check Time 8.07s (± 0.48%) 8.06s (± 0.23%) ~ 8.04s 8.08s p=0.572 n=6
Emit Time 7.05s (± 0.23%) 7.03s (± 0.17%) -0.03s (- 0.35%) 7.01s 7.04s p=0.028 n=6
Total Time 18.59s (± 0.21%) 18.58s (± 0.15%) ~ 18.55s 18.62s p=0.332 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 190,670k (± 0.02%) 190,696k (± 0.02%) ~ 190,658k 190,732k p=0.334 n=6
Parse Time 1.35s (± 1.91%) 1.34s (± 1.30%) ~ 1.31s 1.36s p=0.413 n=6
Bind Time 0.73s (± 0.00%) 0.73s (± 0.00%) ~ 0.73s 0.73s p=1.000 n=6
Check Time 9.14s (± 0.46%) 9.24s (± 0.88%) +0.10s (+ 1.06%) 9.17s 9.35s p=0.043 n=6
Emit Time 2.63s (± 0.52%) 2.64s (± 0.28%) +0.02s (+ 0.63%) 2.63s 2.65s p=0.045 n=6
Total Time 13.85s (± 0.41%) 13.95s (± 0.64%) ~ 13.88s 14.08s p=0.053 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,233k (± 0.01%) 347,241k (± 0.01%) ~ 347,221k 347,296k p=0.630 n=6
Parse Time 2.46s (± 0.51%) 2.46s (± 0.36%) ~ 2.45s 2.47s p=0.933 n=6
Bind Time 0.94s (± 0.00%) 0.94s (± 0.00%) ~ 0.94s 0.94s p=1.000 n=6
Check Time 6.86s (± 0.64%) 6.87s (± 0.42%) ~ 6.84s 6.91s p=0.465 n=6
Emit Time 4.02s (± 0.46%) 4.02s (± 0.40%) ~ 3.99s 4.03s p=0.625 n=6
Total Time 14.27s (± 0.28%) 14.29s (± 0.19%) ~ 14.26s 14.34s p=0.629 n=6
TFS - node (v18.15.0, x64)
Memory used 302,528k (± 0.01%) 302,546k (± 0.02%) ~ 302,505k 302,609k p=0.575 n=6
Parse Time 2.00s (± 0.52%) 2.00s (± 0.68%) ~ 1.99s 2.02s p=0.933 n=6
Bind Time 1.00s (± 0.83%) 1.00s (± 0.98%) ~ 0.99s 1.02s p=0.445 n=6
Check Time 6.25s (± 0.33%) 6.27s (± 0.33%) ~ 6.24s 6.29s p=0.418 n=6
Emit Time 3.52s (± 0.23%) 3.51s (± 0.34%) ~ 3.50s 3.53s p=0.677 n=6
Total Time 12.78s (± 0.09%) 12.78s (± 0.17%) ~ 12.75s 12.81s p=0.869 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,499k (± 0.00%) 470,495k (± 0.00%) ~ 470,476k 470,532k p=0.688 n=6
Parse Time 2.57s (± 0.75%) 2.58s (± 0.41%) ~ 2.57s 2.60s p=0.123 n=6
Bind Time 1.00s (± 1.04%) 0.99s (± 0.52%) ~ 0.99s 1.00s p=0.437 n=6
Check Time 16.61s (± 0.38%) 16.68s (± 0.42%) ~ 16.56s 16.73s 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 20.17s (± 0.26%) 20.25s (± 0.29%) ~ 20.16s 20.30s p=0.075 n=6
xstate - node (v18.15.0, x64)
Memory used 512,601k (± 0.01%) 512,554k (± 0.01%) ~ 512,485k 512,683k p=0.093 n=6
Parse Time 3.27s (± 0.39%) 3.26s (± 0.23%) ~ 3.25s 3.27s p=0.214 n=6
Bind Time 1.55s (± 0.26%) 1.55s (± 0.41%) ~ 1.54s 1.56s p=0.673 n=6
Check Time 2.84s (± 0.90%) 2.85s (± 1.19%) ~ 2.83s 2.92s p=0.293 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=0.405 n=6
Total Time 7.74s (± 0.39%) 7.75s (± 0.42%) ~ 7.71s 7.80s p=0.809 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,374ms (± 0.93%) 2,362ms (± 1.04%) ~ 2,320ms 2,386ms p=0.471 n=6
Req 2 - geterr 5,327ms (± 1.27%) 5,397ms (± 1.64%) ~ 5,325ms 5,522ms p=0.128 n=6
Req 3 - references 327ms (± 0.74%) 327ms (± 1.35%) ~ 322ms 335ms p=0.368 n=6
Req 4 - navto 278ms (± 1.20%) 277ms (± 1.07%) ~ 273ms 280ms p=0.331 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 82ms (± 7.84%) 81ms (± 8.89%) ~ 75ms 90ms p=0.870 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,488ms (± 0.89%) 2,488ms (± 0.73%) ~ 2,460ms 2,503ms p=1.000 n=6
Req 2 - geterr 4,158ms (± 1.86%) 4,125ms (± 1.87%) ~ 4,062ms 4,230ms p=1.000 n=6
Req 3 - references 335ms (± 1.21%) 339ms (± 1.48%) ~ 333ms 344ms p=0.122 n=6
Req 4 - navto 284ms (± 0.19%) 284ms (± 0.19%) ~ 283ms 284ms p=1.000 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 78ms (± 5.90%) 82ms (± 7.16%) ~ 76ms 87ms p=0.116 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,600ms (± 0.41%) 2,596ms (± 0.40%) ~ 2,585ms 2,613ms p=0.630 n=6
Req 2 - geterr 1,695ms (± 2.35%) 1,701ms (± 1.73%) ~ 1,655ms 1,728ms p=1.000 n=6
Req 3 - references 116ms (± 9.93%) 116ms (± 9.05%) ~ 109ms 131ms p=0.418 n=6
Req 4 - navto 360ms (± 0.54%) 360ms (± 0.51%) ~ 358ms 363ms p=1.000 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 308ms (± 2.32%) 307ms (± 2.04%) ~ 299ms 318ms p=0.625 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.12ms (± 0.18%) 152.02ms (± 0.16%) -0.10ms (- 0.07%) 151.01ms 154.52ms p=0.001 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.07ms (± 0.16%) 228.07ms (± 0.17%) ~ 226.77ms 232.96ms p=0.534 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.22ms (± 0.17%) 229.41ms (± 0.16%) +0.19ms (+ 0.08%) 227.61ms 233.40ms p=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 228.79ms (± 0.17%) 228.78ms (± 0.17%) ~ 227.42ms 235.41ms p=0.791 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

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

Something interesting changed - please have a look.

Details

apollographql/apollo-client

1 of 10 projects failed to build with the old tsc and were ignored

tsconfig.json

immich-app/immich

4 of 6 projects failed to build with the old tsc and were ignored

server/tsconfig.json

pubkey/rxdb

8 of 10 projects failed to build with the old tsc and were ignored

config/tsconfig.types.json

tsconfig.json

tldraw/tldraw

1 of 5 projects failed to build with the old tsc and were ignored

apps/examples/tsconfig.json

apps/vscode/editor/tsconfig.json

apps/vscode/extension/tsconfig.json

@Zzzen
Copy link
Contributor Author

Zzzen commented Sep 29, 2023

I'm a little bit concerned that we aren't guarding previous accesses of isAssigned in some way - but it looks like the binder didn't need to be changed at all. Were accesses of isAssigned already guarded by something like symbol.flags & SymbolFlags.Parameter?

After conducting some research, it appears that the isAssigned flag is not referenced in the binder. Moreover, all the reads have been appropriately guarded, as demonstrated in the examples below:

parent.kind === SyntaxKind.Parameter && isSymbolAssigned(symbol)

isParameter && !isSymbolAssigned(localOrExportSymbol)

isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol)

@DanielRosenwasser
Copy link
Member

@typescript-bot test top800
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 5, 2024

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

Command Status Results
test top800 ✅ Started 👀 Results
perf test this ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
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
Angular - node (v18.15.0, x64)
Memory used 295,697k (± 0.01%) 295,778k (± 0.01%) +81k (+ 0.03%) 295,729k 295,853k p=0.005 n=6
Parse Time 3.93s (± 0.52%) 3.92s (± 0.71%) ~ 3.88s 3.95s p=0.681 n=6
Bind Time 1.20s (± 0.43%) 1.22s (± 1.41%) ~ 1.20s 1.25s p=0.051 n=6
Check Time 11.93s (± 0.27%) 11.97s (± 0.22%) ~ 11.93s 12.01s p=0.124 n=6
Emit Time 10.47s (± 0.36%) 10.53s (± 0.22%) +0.06s (+ 0.59%) 10.50s 10.56s p=0.016 n=6
Total Time 27.54s (± 0.18%) 27.64s (± 0.12%) +0.10s (+ 0.36%) 27.60s 27.68s p=0.005 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,263k (± 0.79%) 193,614k (± 1.03%) +1,350k (+ 0.70%) 191,727k 195,484k p=0.031 n=6
Parse Time 2.02s (± 0.67%) 2.01s (± 1.31%) ~ 1.97s 2.04s p=0.621 n=6
Bind Time 1.06s (± 0.71%) 1.06s (± 1.14%) ~ 1.05s 1.08s p=0.503 n=6
Check Time 13.83s (± 0.31%) 13.94s (± 0.54%) +0.12s (+ 0.84%) 13.84s 14.04s p=0.020 n=6
Emit Time 3.84s (± 0.90%) 3.92s (± 0.48%) +0.08s (+ 2.08%) 3.90s 3.94s p=0.005 n=6
Total Time 20.75s (± 0.17%) 20.94s (± 0.29%) +0.19s (+ 0.92%) 20.85s 21.01s p=0.005 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,699k (± 0.01%) 347,855k (± 0.00%) +156k (+ 0.04%) 347,838k 347,873k p=0.005 n=6
Parse Time 2.98s (± 1.01%) 3.00s (± 0.49%) ~ 2.98s 3.02s p=0.256 n=6
Bind Time 1.07s (± 0.51%) 1.07s (± 0.38%) ~ 1.07s 1.08s p=0.054 n=6
Check Time 8.21s (± 0.52%) 8.31s (± 0.45%) +0.11s (+ 1.32%) 8.28s 8.37s p=0.005 n=6
Emit Time 4.86s (± 0.38%) 4.85s (± 0.52%) ~ 4.82s 4.88s p=0.685 n=6
Total Time 17.11s (± 0.29%) 17.23s (± 0.26%) +0.13s (+ 0.74%) 17.17s 17.29s p=0.005 n=6
TFS - node (v18.15.0, x64)
Memory used 302,543k (± 0.01%) 302,829k (± 0.00%) +286k (+ 0.09%) 302,817k 302,839k p=0.005 n=6
Parse Time 2.96s (± 0.88%) 2.97s (± 0.49%) ~ 2.95s 2.99s p=0.250 n=6
Bind Time 1.44s (± 0.72%) 1.43s (± 0.57%) ~ 1.42s 1.44s p=0.796 n=6
Check Time 9.15s (± 0.25%) 9.20s (± 0.41%) +0.05s (+ 0.53%) 9.15s 9.25s p=0.036 n=6
Emit Time 5.30s (± 0.53%) 5.30s (± 0.49%) ~ 5.27s 5.33s p=1.000 n=6
Total Time 18.84s (± 0.06%) 18.90s (± 0.23%) +0.06s (+ 0.32%) 18.83s 18.96s p=0.043 n=6
material-ui - node (v18.15.0, x64)
Memory used 510,591k (± 0.02%) 510,596k (± 0.01%) ~ 510,552k 510,628k p=0.471 n=6
Parse Time 3.94s (± 0.37%) 3.95s (± 0.27%) ~ 3.93s 3.96s p=0.413 n=6
Bind Time 1.46s (± 0.80%) 1.46s (± 0.83%) ~ 1.45s 1.48s p=0.388 n=6
Check Time 25.29s (± 0.25%) 25.50s (± 0.46%) +0.21s (+ 0.84%) 25.33s 25.64s p=0.013 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 30.69s (± 0.23%) 30.91s (± 0.39%) +0.22s (+ 0.72%) 30.73s 31.06s p=0.013 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,743,878k (± 0.00%) 1,743,950k (± 0.00%) +72k (+ 0.00%) 1,743,902k 1,744,012k p=0.005 n=6
Parse Time 9.63s (± 0.33%) 9.66s (± 0.99%) ~ 9.56s 9.84s p=0.936 n=6
Bind Time 3.41s (± 0.63%) 3.42s (± 0.35%) ~ 3.41s 3.44s p=0.195 n=6
Check Time 81.34s (± 0.48%) 81.83s (± 0.49%) ~ 81.31s 82.46s p=0.066 n=6
Emit Time 0.19s (± 2.13%) 0.19s (± 2.67%) ~ 0.19s 0.20s p=0.595 n=6
Total Time 94.58s (± 0.44%) 95.10s (± 0.46%) ~ 94.58s 95.71s p=0.128 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,299,627k (± 0.03%) 2,298,677k (± 0.02%) -950k (- 0.04%) 2,297,837k 2,299,315k p=0.020 n=6
Parse Time 4.96s (± 1.44%) 5.00s (± 0.74%) ~ 4.93s 5.03s p=0.688 n=6
Bind Time 1.88s (± 1.04%) 1.89s (± 0.40%) ~ 1.88s 1.90s p=1.000 n=6
Check Time 33.59s (± 0.45%) 33.72s (± 0.39%) ~ 33.51s 33.87s p=0.173 n=6
Emit Time 2.56s (± 1.85%) 2.60s (± 1.87%) ~ 2.56s 2.69s p=0.199 n=6
Total Time 43.02s (± 0.44%) 43.22s (± 0.38%) ~ 43.02s 43.47s p=0.093 n=6
self-build-src-public-api - node (v18.15.0, x64)
Memory used 2,373,756k (± 0.04%) 2,372,642k (± 0.05%) ~ 2,370,650k 2,373,792k p=0.066 n=6
Parse Time 7.66s (± 1.67%) 7.65s (± 1.22%) ~ 7.55s 7.76s p=0.936 n=6
Bind Time 2.45s (± 0.61%) 2.45s (± 0.84%) ~ 2.41s 2.47s p=1.000 n=6
Check Time 49.11s (± 0.31%) 49.81s (± 0.56%) +0.71s (+ 1.44%) 49.55s 50.25s p=0.005 n=6
Emit Time 3.91s (± 2.73%) 3.99s (± 3.47%) ~ 3.88s 4.24s p=0.066 n=6
Total Time 63.14s (± 0.31%) 63.92s (± 0.56%) +0.78s (+ 1.23%) 63.48s 64.48s p=0.005 n=6
self-compiler - node (v18.15.0, x64)
Memory used 418,115k (± 0.01%) 418,287k (± 0.01%) +172k (+ 0.04%) 418,241k 418,364k p=0.005 n=6
Parse Time 4.12s (± 1.97%) 4.14s (± 0.47%) ~ 4.12s 4.17s p=0.684 n=6
Bind Time 1.62s (± 5.36%) 1.58s (± 1.31%) ~ 1.56s 1.62s p=0.935 n=6
Check Time 21.96s (± 0.35%) 22.24s (± 0.35%) +0.28s (+ 1.28%) 22.11s 22.32s p=0.005 n=6
Emit Time 1.71s (± 1.35%) 1.73s (± 1.86%) ~ 1.67s 1.76s p=0.170 n=6
Total Time 29.41s (± 0.27%) 29.70s (± 0.32%) +0.29s (+ 0.97%) 29.59s 29.85s p=0.005 n=6
vscode - node (v18.15.0, x64)
Memory used 2,905,124k (± 0.00%) 2,905,725k (± 0.00%) +601k (+ 0.02%) 2,905,670k 2,905,765k p=0.005 n=6
Parse Time 12.96s (± 0.18%) 12.94s (± 0.24%) ~ 12.90s 12.97s p=0.192 n=6
Bind Time 4.06s (± 0.40%) 4.05s (± 0.66%) ~ 4.02s 4.10s p=1.000 n=6
Check Time 71.37s (± 0.31%) 72.09s (± 0.25%) +0.72s (+ 1.01%) 71.87s 72.39s p=0.005 n=6
Emit Time 19.42s (± 0.43%) 19.56s (± 0.95%) ~ 19.41s 19.93s p=0.077 n=6
Total Time 107.80s (± 0.24%) 108.64s (± 0.24%) +0.84s (+ 0.78%) 108.43s 109.08s p=0.005 n=6
webpack - node (v18.15.0, x64)
Memory used 408,581k (± 0.01%) 408,819k (± 0.01%) +239k (+ 0.06%) 408,746k 408,911k p=0.005 n=6
Parse Time 3.23s (± 0.42%) 3.24s (± 0.47%) ~ 3.22s 3.26s p=0.190 n=6
Bind Time 1.38s (± 1.00%) 1.38s (± 1.16%) ~ 1.36s 1.40s p=0.739 n=6
Check Time 14.17s (± 0.28%) 14.39s (± 0.18%) +0.22s (+ 1.54%) 14.35s 14.42s 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 18.79s (± 0.17%) 19.02s (± 0.18%) +0.23s (+ 1.25%) 18.96s 19.06s p=0.005 n=6
xstate - node (v18.15.0, x64)
Memory used 514,353k (± 0.01%) 514,398k (± 0.00%) ~ 514,369k 514,429k p=0.128 n=6
Parse Time 3.28s (± 0.23%) 3.29s (± 0.23%) ~ 3.28s 3.30s p=0.062 n=6
Bind Time 1.56s (± 0.33%) 1.57s (± 0.48%) ~ 1.56s 1.58s p=0.247 n=6
Check Time 2.88s (± 1.13%) 2.88s (± 0.48%) ~ 2.87s 2.90s p=0.935 n=6
Emit Time 0.08s (± 5.21%) 0.08s (± 5.21%) ~ 0.07s 0.08s p=1.000 n=6
Total Time 7.81s (± 0.39%) 7.83s (± 0.19%) ~ 7.81s 7.85s p=0.191 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)
  • 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)
  • vscode - node (v18.15.0, x64)
  • webpack - 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,356ms (± 0.83%) 2,348ms (± 0.71%) ~ 2,333ms 2,377ms p=0.471 n=6
Req 2 - geterr 5,029ms (± 0.43%) 5,085ms (± 0.77%) +56ms (+ 1.11%) 5,056ms 5,161ms p=0.013 n=6
Req 3 - references 284ms (± 0.36%) 285ms (± 0.26%) +2ms (+ 0.53%) 284ms 286ms p=0.034 n=6
Req 4 - navto 230ms (± 0.00%) 230ms (± 0.27%) ~ 229ms 231ms p=1.000 n=6
Req 5 - completionInfo count 1,357 (± 0.00%) 1,357 (± 0.00%) ~ 1,357 1,357 p=1.000 n=6
Req 5 - completionInfo 82ms (± 0.00%) 82ms (± 0.00%) ~ 82ms 82ms p=1.000 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 3,658ms (± 1.12%) 3,679ms (± 1.17%) ~ 3,615ms 3,728ms p=0.630 n=6
Req 2 - geterr 5,519ms (± 0.26%) 5,583ms (± 0.24%) +64ms (+ 1.16%) 5,565ms 5,599ms p=0.005 n=6
Req 3 - references 457ms (± 1.62%) 453ms (± 1.91%) ~ 443ms 463ms p=0.574 n=6
Req 4 - navto 338ms (± 0.76%) 338ms (± 0.72%) ~ 334ms 340ms p=0.459 n=6
Req 5 - completionInfo count 1,519 (± 0.00%) 1,519 (± 0.00%) ~ 1,519 1,519 p=1.000 n=6
Req 5 - completionInfo 124ms (± 0.94%) 124ms (± 2.32%) ~ 118ms 126ms p=0.561 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 3,804ms (± 0.63%) 3,815ms (± 0.49%) ~ 3,798ms 3,850ms p=0.378 n=6
Req 2 - geterr 2,158ms (± 1.34%) 2,227ms (± 0.60%) +69ms (+ 3.21%) 2,210ms 2,243ms p=0.005 n=6
Req 3 - references 130ms (± 1.02%) 132ms (± 2.38%) ~ 128ms 136ms p=0.318 n=6
Req 4 - navto 526ms (± 0.89%) 526ms (± 0.36%) ~ 523ms 528ms p=0.936 n=6
Req 5 - completionInfo count 2,079 (± 0.00%) 2,079 (± 0.00%) ~ 2,079 2,079 p=1.000 n=6
Req 5 - completionInfo 427ms (± 0.83%) 431ms (± 1.09%) ~ 423ms 437ms p=0.225 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 154.08ms (± 0.15%) 154.36ms (± 0.21%) +0.28ms (+ 0.18%) 153.04ms 159.23ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 227.88ms (± 0.16%) 227.78ms (± 0.17%) -0.10ms (- 0.05%) 226.12ms 232.98ms p=0.001 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 224.89ms (± 0.15%) 224.92ms (± 0.16%) ~ 223.21ms 230.70ms p=0.774 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 223.92ms (± 0.18%) 223.87ms (± 0.17%) ~ 222.35ms 229.82ms p=0.314 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

@DanielRosenwasser Here are the results of running the top 800 repos comparing main and refs/pull/55887/merge:

Something interesting changed - please have a look.

Details

eclipse/che

tests/e2e/tsconfig.json

immich-app/immich

2 of 7 projects failed to build with the old tsc and were ignored

server/tsconfig.json

mattermost/mattermost

1 of 4 projects failed to build with the old tsc and were ignored

webapp/channels/tsconfig.json

microsoft/azuredatastudio

8 of 67 projects failed to build with the old tsc and were ignored

extensions/machine-learning/tsconfig.json

microsoft/vscode

4 of 54 projects failed to build with the old tsc and were ignored

src/tsconfig.json

pubkey/rxdb

8 of 11 projects failed to build with the old tsc and were ignored

tsconfig.json

config/tsconfig.types.json

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 reviewers
PR Backlog
  
Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

Uninitialized variables work around strictNullChecks (follow-up to #13884)
5 participants