Uh oh!
There was an error while loading. Please reload this page.
support overload signature for deprecated. - #39221
Conversation
Wenlu Wang (Kingwl)
commented
Jun 24, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at 482a4d3. You can monitor the build here. Update: The results are in! |
Heya Wenlu Wang (@Kingwl), I've started to run the tarball bundle task on this PR at 482a4d3. You can monitor the build here. |
Hey Wenlu Wang (@Kingwl), 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. |
TypeScript Bot (typescript-bot)
commented
Jun 24, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wenlu Wang (Kingwl)
commented
Jun 24, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at 482a4d3. You can monitor the build here. Update: The results are in! |
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
Should we also try to change it up so that we report the "x is deprecated" suggestion when a call resolves to one of the deprecated signatures?
TypeScript Bot (typescript-bot)
commented
Jun 24, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wenlu Wang (Kingwl)
commented
Jun 24, 2020
Update for rules. Let me know if something is incorrect. |
Wesley Wigham (weswigham)
commented
Jun 24, 2020
Daniel Rosenwasser (@DanielRosenwasser) this look good to you? It looks like it resolves the issue pretty well to me. |
Wenlu Wang (Kingwl)
commented
Jun 24, 2020
Matt Bierner (@mjbvz) please look at this changes. |
Uh oh!
There was an error while loading. Please reload this page.
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
Couple of minor changes, but the big one is that we need to make sure performance is still OK, because this adds a symbol property and does work in the binder for every signature, even non-deprecated ones.
| else if (hasDeprecated) { | ||
There was a problem hiding this comment.
| elseif(hasDeprecated){ | |
| elseif(hasDeprecated){ |
| /* @internal */ isReplaceableByMethod?: boolean; // Can this Javascript class property be replaced by a method symbol? | ||
| /* @internal */ isAssigned?: boolean; // True if the symbol is a parameter with assignments | ||
| /* @internal */ assignmentDeclarationMembers?: Map<Declaration>; // detected late-bound assignment declarations associated with the symbol | ||
| /* @internal */ allSignatureDeprecated?: boolean; // All signatures have the deprecated tag |
There was a problem hiding this comment.
I would add an s: allSignaturesDeprecated
| symbol.flags &= ~SymbolFlags.Deprecated; | ||
| } | ||
| } | ||
| else if (hasDeprecated) { |
There was a problem hiding this comment.
merged signatures/other things will end up deprecating the whole thing, right?
/** @deprecated */interfaceF{}functionF(){}There was a problem hiding this comment.
Later: No, the code correctly unsets the flag, but please add a test like this (or point me to an existing one).
There was a problem hiding this comment.
I had the same fear - I don't really understand why it needs to check the symbol if the resolved signature is already there though.
There was a problem hiding this comment.
Because to avoid duplicate diagnostic. eg:
/* @deprecated */
declare function foo (); void;
foo;
~~~ // foo is deprecated. checked by identifier
foo();
~~~ // foo is deprecated. checked by identifier
~~~~~ // (): void is deprecated. checked by callExpression
Uh oh!
There was an error while loading. Please reload this page.
Wenlu Wang (Kingwl)
commented
Jun 25, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at fcd722a. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
Jun 25, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wenlu Wang (Kingwl)
commented
Jun 25, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at fcd722a. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
Jun 25, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
After discussing this one-on-one, I think the best thing is to switch away from SymbolFlags.Deprecated and make the checker look at NodeFlags.Deprecated for specific declarations. |
Wenlu Wang (Kingwl)
commented
Jun 27, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at 2410ea6. You can monitor the build here. Update: The results are in! |
Wenlu Wang (Kingwl)
commented
Jun 27, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at aab7a32. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
Jun 27, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TypeScript Bot (typescript-bot)
commented
Jun 27, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wenlu Wang (Kingwl)
commented
Jun 27, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at aab7a32. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
Jun 27, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0dcf09c to
c1911f6CompareThis reverts commit d7a7297.
c1911f6 to
11340daCompare
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
This is a pretty good fix now. It just needs to use SymbolLinks instead of Symbol.
After that's done, let's just take whichever is faster, this or #39323.
| } | ||
| export function getDeprecatedFlags(symbol: Symbol) { | ||
| if (symbol.flags & SymbolFlags.Deprecated) { |
There was a problem hiding this comment.
instead of modifying Symbol, please using SymbolLinks with getSymbolLinks to cache deprecatedFlags.
There was a problem hiding this comment.
(the function should also move into the checker; pretty sure getSymbolLinks is not exported)
| } | ||
| export function getDeprecatedFlags(symbol: Symbol) { | ||
| if (symbol.flags & SymbolFlags.Deprecated) { |
There was a problem hiding this comment.
I would invert the symbol.flags & SymbolFlags.Deprecated check to immediately return None.
Wenlu Wang (Kingwl)
commented
Jun 30, 2020
TypeScript Bot (@typescript-bot) pack this. |
Heya Wenlu Wang (@Kingwl), I've started to run the tarball bundle task on this PR at 11340da. You can monitor the build here. |
Hey Wenlu Wang (@Kingwl), 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. |
Wenlu Wang (Kingwl)
commented
Jun 30, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at 11340da. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
Jun 30, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wenlu Wang (Kingwl)
commented
Jul 1, 2020
TypeScript Bot (@typescript-bot) perf test. |
Heya Wenlu Wang (@Kingwl), I've started to run the perf test suite on this PR at 2dd4148. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
Jul 1, 2020
Wenlu Wang (@Kingwl) Here they are:Comparison Report - master..39221
System
Hosts
Scenarios
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fixes#39212
This or follow the below rules: