error on variables that are used but never initialized#55887
error on variables that are used but never initialized#55887gabritto merged 28 commits intomicrosoft:mainfrom
Conversation
|
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. |
src/compiler/checker.ts
Outdated
| var deferredGlobalClassFieldDecoratorContextType: GenericType | undefined; | ||
|
|
||
| var allPotentiallyUnusedIdentifiers = new Map<Path, PotentiallyUnusedIdentifier[]>(); // key is file name | ||
| var allPotentiallyUnusedOrUninitializedIdentifiers = new Map<Path, PotentiallyUnusedIdentifier[]>(); // key is file name |
There was a problem hiding this comment.
Will allLocalIdentifiers be a better variable name?
I assume you meant “initialized” here. |
|
@typescript-bot pack this |
|
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! |
|
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! |
|
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at ff025b3. You can monitor the build here. |
|
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! |
|
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! |
|
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! |
|
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
|
@DanielRosenwasser Here are the results of running the user test suite comparing Everything looks good! |
|
@DanielRosenwasser Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
|
@DanielRosenwasser Here they are:
CompilerComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
StartupComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hm, perf result indicates that adding this prop has moved Symbol into a new size class, given the memory increase. |
|
@DanielRosenwasser Here are the results of running the top-repos suite comparing Something interesting changed - please have a look. DetailsServer exited prematurely with code unknown and signal SIGABRTAffected reposcalcom/cal.comRaw 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
|
|
@DanielRosenwasser Here are the results of running the top-repos suite comparing Something interesting changed - please have a look. Details
|
|
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. For the most part, in the top 300 TypeScript projects on GitHub, the only real false negatives are variables that get assigned in a |
|
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 |
|
@typescript-bot test it |
|
Hey @gabritto, the results of running the DT tests are ready. There were interesting changes: Branch only errors:Package: svelte-leafletjs Package: raphael Package: nodal Package: rx-lite-async Package: bluebird |
|
@gabritto Here are the results of running the user tests with tsc comparing Everything looks good! |
|
@gabritto Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@typescript-bot pack this |
|
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
DanielRosenwasser
left a comment
There was a problem hiding this comment.
Apart from my nits I think this is ready. Excited to get this into 5.7!
Fixes #23305