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

Merged
merged 28 commits into from
Aug 20, 2024

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
@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.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 7, 2024

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

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 7, 2024

Hey @gabritto, 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/163174/artifacts?artifactName=tgz&fileId=1B4C4A309A13E2A9D48577A04475E993BD4E3D22A5BB554494021DAA5A6D56E602&fileName=/typescript-5.6.0-insiders.20240807.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]".;

src/compiler/checker.ts Outdated Show resolved Hide resolved
@gabritto
Copy link
Member

gabritto commented Aug 8, 2024

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 8, 2024

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

@typescript-bot
Copy link
Collaborator

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

There were interesting changes:

Branch only errors:

Package: svelte-leafletjs
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/svelte-leafletjs/svelte-leafletjs-tests.ts
  74:66  error  TypeScript@local compile error: 
Variable 'getMap' is used before being assigned  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: raphael
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/raphael/test/raphael-tests-old.ts
  57:13  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect
  58:60  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect
  67:13  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect
  68:53  error  TypeScript@local compile error: 
Variable 'angle' is used before being assigned  @definitelytyped/expect

✖ 4 problems (4 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: nodal
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/nodal/nodal-tests.ts
  26:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  36:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  40:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  44:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect
  48:9  error  TypeScript@local compile error: 
Variable 'BlogPost' is used before being assigned  @definitelytyped/expect

✖ 5 problems (5 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: rx-lite-async
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/rx-lite-async/rx-lite-async-tests.ts
   9:52  error  TypeScript@local compile error: 
Variable 'sch' is used before being assigned  @definitelytyped/expect
  15:45  error  TypeScript@local compile error: 
Variable 'sch' is used before being assigned  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: bluebird
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/bluebird/bluebird-tests.ts
   516:12  error  TypeScript@local compile error: 
Variable 'voidThen' is used before being assigned  @definitelytyped/expect
  1360:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1366:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1375:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1385:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1398:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1404:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1413:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1423:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1436:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1442:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1451:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1461:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1474:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1480:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1489:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect
  1499:12  error  TypeScript@local compile error: 
Variable 'boolThen' is used before being assigned  @definitelytyped/expect

✖ 17 problems (17 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

@gabritto
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 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 194,593k (± 0.93%) 193,504k (± 0.97%) ~ 192,255k 195,994k p=1.000 n=6
Parse Time 1.95s (± 0.60%) 1.95s (± 1.30%) ~ 1.93s 1.99s p=0.743 n=6
Bind Time 1.06s (± 1.39%) 1.05s (± 1.55%) ~ 1.03s 1.07s p=0.615 n=6
Check Time 13.98s (± 0.34%) 13.97s (± 0.39%) ~ 13.89s 14.03s p=0.873 n=6
Emit Time 4.00s (± 1.32%) 4.00s (± 0.63%) ~ 3.95s 4.02s p=0.685 n=6
Total Time 20.98s (± 0.32%) 20.97s (± 0.28%) ~ 20.90s 21.04s p=0.810 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,757 945,757 ~ ~ ~ p=1.000 n=6
Types 410,045 410,045 ~ ~ ~ p=1.000 n=6
Memory used 1,222,503k (± 0.00%) 1,222,515k (± 0.00%) ~ 1,222,430k 1,222,577k p=0.378 n=6
Parse Time 7.92s (± 0.43%) 7.93s (± 0.58%) ~ 7.88s 7.99s p=1.000 n=6
Bind Time 2.23s (± 0.23%) 2.23s (± 0.37%) ~ 2.22s 2.24s p=0.929 n=6
Check Time 36.24s (± 0.51%) 36.27s (± 0.34%) ~ 36.09s 36.39s p=0.520 n=6
Emit Time 17.81s (± 0.69%) 17.81s (± 0.42%) ~ 17.71s 17.89s p=0.872 n=6
Total Time 64.21s (± 0.43%) 64.24s (± 0.20%) ~ 64.05s 64.37s p=0.748 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,487,631 2,487,631 ~ ~ ~ p=1.000 n=6
Types 1,012,953 1,012,953 ~ ~ ~ p=1.000 n=6
Memory used 2,493,460k (± 0.00%) 2,493,494k (± 0.00%) ~ 2,493,441k 2,493,532k p=0.230 n=6
Parse Time 10.94s (± 0.07%) 10.98s (± 0.29%) +0.04s (+ 0.37%) 10.94s 11.02s p=0.028 n=6
Bind Time 2.61s (± 0.54%) 2.62s (± 0.24%) ~ 2.61s 2.63s p=0.180 n=6
Check Time 89.42s (± 0.42%) 89.24s (± 0.69%) ~ 88.72s 90.42s p=0.378 n=6
Emit Time 0.33s (± 2.50%) 0.33s (± 1.91%) ~ 0.32s 0.34s p=0.432 n=6
Total Time 103.30s (± 0.35%) 103.18s (± 0.59%) ~ 102.70s 104.34s p=0.471 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,292 1,229,303 +11 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,032 264,036 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,526,174k (± 7.71%) 2,348,495k (± 0.03%) ~ 2,346,949k 2,348,862k p=0.689 n=6
Parse Time 6.07s (± 1.16%) 6.01s (± 0.43%) ~ 5.98s 6.05s p=0.128 n=6
Bind Time 2.23s (± 1.41%) 2.25s (± 1.17%) ~ 2.23s 2.29s p=0.228 n=6
Check Time 40.50s (± 0.95%) 40.76s (± 0.46%) ~ 40.63s 41.14s p=0.575 n=6
Emit Time 3.96s (± 0.78%) 3.96s (± 1.02%) ~ 3.90s 4.01s p=0.936 n=6
Total Time 52.79s (± 0.64%) 53.01s (± 0.45%) ~ 52.85s 53.49s p=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,292 1,229,303 +11 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,032 264,036 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,599,692k (±11.39%) 2,541,443k (± 7.20%) ~ 2,422,947k 2,778,511k p=0.471 n=6
Parse Time 7.80s (± 0.81%) 7.77s (± 0.99%) ~ 7.63s 7.86s p=0.575 n=6
Bind Time 2.49s (± 1.45%) 2.55s (± 2.02%) ~ 2.48s 2.61s p=0.065 n=6
Check Time 50.85s (± 0.74%) 50.65s (± 0.83%) ~ 49.91s 51.04s p=0.575 n=6
Emit Time 5.00s (± 1.10%) 5.02s (± 2.06%) ~ 4.91s 5.21s p=0.936 n=6
Total Time 66.17s (± 0.55%) 66.02s (± 0.61%) ~ 65.37s 66.56s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,694 256,705 +11 (+ 0.00%) ~ ~ p=0.001 n=6
Types 105,545 105,549 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 428,877k (± 0.03%) 428,954k (± 0.02%) ~ 428,795k 429,086k p=0.336 n=6
Parse Time 4.16s (± 0.45%) 4.16s (± 0.35%) ~ 4.14s 4.18s p=0.808 n=6
Bind Time 1.61s (± 1.08%) 1.62s (± 1.26%) ~ 1.58s 1.64s p=0.492 n=6
Check Time 22.29s (± 0.33%) 22.34s (± 0.41%) ~ 22.22s 22.45s p=0.575 n=6
Emit Time 2.03s (± 0.80%) 2.02s (± 0.92%) ~ 2.00s 2.04s p=0.121 n=6
Total Time 30.09s (± 0.25%) 30.14s (± 0.30%) ~ 30.00s 30.24s p=0.686 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 68 🔻+33 (+94.29%) ~ ~ p=0.001 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,245 94,249 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 370,167k (± 0.02%) 370,102k (± 0.02%) ~ 370,025k 370,177k p=0.173 n=6
Parse Time 2.76s (± 0.32%) 2.75s (± 0.59%) ~ 2.73s 2.77s p=0.563 n=6
Bind Time 1.57s (± 1.25%) 1.57s (± 1.02%) ~ 1.55s 1.59s p=0.931 n=6
Check Time 15.61s (± 0.20%) 15.70s (± 0.20%) +0.09s (+ 0.58%) 15.67s 15.74s p=0.005 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.94s (± 0.12%) 20.01s (± 0.22%) +0.07s (+ 0.36%) 19.95s 20.07s p=0.016 n=6
vscode - node (v18.15.0, x64)
Errors 0 66 🔻+66 (+ ∞%) ~ ~ p=0.001 n=6
Symbols 2,995,242 2,995,242 ~ ~ ~ p=1.000 n=6
Types 1,032,059 1,032,059 ~ ~ ~ p=1.000 n=6
Memory used 3,120,638k (± 0.00%) 3,120,752k (± 0.00%) +114k (+ 0.00%) 3,120,677k 3,120,934k p=0.020 n=6
Parse Time 17.08s (± 0.30%) 17.03s (± 0.28%) ~ 16.95s 17.08s p=0.226 n=6
Bind Time 5.23s (± 0.23%) 5.22s (± 0.30%) ~ 5.20s 5.24s p=0.611 n=6
Check Time 96.45s (± 0.59%) 96.61s (± 0.16%) ~ 96.34s 96.78s p=0.470 n=6
Emit Time 25.00s (± 0.60%) 24.85s (± 0.41%) ~ 24.69s 24.95s p=0.128 n=6
Total Time 143.76s (± 0.44%) 143.72s (± 0.15%) ~ 143.39s 143.99s p=1.000 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 273,789 273,789 ~ ~ ~ p=1.000 n=6
Types 111,669 111,669 ~ ~ ~ p=1.000 n=6
Memory used 419,898k (± 0.02%) 419,891k (± 0.02%) ~ 419,795k 420,010k p=1.000 n=6
Parse Time 3.30s (± 0.45%) 3.30s (± 0.30%) ~ 3.29s 3.31s p=0.796 n=6
Bind Time 1.45s (± 1.01%) 1.46s (± 1.53%) ~ 1.43s 1.49s p=0.626 n=6
Check Time 14.49s (± 0.44%) 14.53s (± 0.64%) ~ 14.42s 14.68s p=0.521 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.25s (± 0.32%) 19.29s (± 0.60%) ~ 19.17s 19.46s p=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 538,614 538,614 ~ ~ ~ p=1.000 n=6
Types 176,536 176,536 ~ ~ ~ p=1.000 n=6
Memory used 481,472k (± 0.01%) 481,460k (± 0.00%) ~ 481,441k 481,489k p=0.810 n=6
Parse Time 4.25s (± 0.61%) 4.25s (± 0.69%) ~ 4.20s 4.28s p=0.685 n=6
Bind Time 1.55s (± 0.53%) 1.55s (± 0.33%) ~ 1.54s 1.55s p=0.929 n=6
Check Time 22.25s (± 0.30%) 22.34s (± 0.35%) ~ 22.24s 22.46s p=0.124 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.05s (± 0.27%) 28.14s (± 0.38%) ~ 27.98s 28.28s p=0.148 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

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

Something interesting changed - please have a look.

Details

immich-app/immich

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

server/tsconfig.json

microsoft/vscode

4 of 53 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

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 19, 2024

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

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 19, 2024

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/163380/artifacts?artifactName=tgz&fileId=FA4786617EC62F6D82F4F215B7B541D15CEF997545365AE0E862D7EE6C7917F502&fileName=/typescript-5.6.0-insiders.20240819.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]".;

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

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

Apart from my nits I think this is ready. Excited to get this into 5.7!

src/compiler/checker.ts Show resolved Hide resolved
src/compiler/transformers/es2015.ts Outdated Show resolved Hide resolved
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: Done
Development

Successfully merging this pull request may close these issues.

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