-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add deprecated related feature #38523
Conversation
Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary |
@typescript-bot pack this. |
@typescript-bot pack this. |
Hey @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. |
Ping, need some help. Please take a look |
Another problem is, where's the line: a.b.c.d // c is deprecated What is the expected behavior?
And if: a.b.c.d // c and d is deprecated What is the expected behavior
|
Does the protocol looks good?I'm not sure🤷♂️ |
I believe this would also fix #33093 |
Finally, It passed tests. I'll add more tests soon. |
Hey @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. |
src/compiler/binder.ts
Outdated
@@ -533,6 +534,7 @@ namespace ts { | |||
} | |||
} | |||
|
|||
symbol.isDeprecated = symbol.isDeprecated || isDeprecated; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHould this be SymbolFlags instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree -- if there's space there. I think the limit is 29 so there's 1 left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, making this a ModifierFlag would go well with public/@public et al. It would also go better with getNodeModifiers
in services.
Heya @Kingwl, I've started to run the perf test suite on this PR at b8142f9. You can monitor the build here. Update: The results are in! |
@Kingwl Here they are:Comparison Report - master..38523
System
Hosts
Scenarios
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So to recap: we now have NodeFlags.Deprecated, SymbolFlags.Deprecated and ModifierFlags.Deprecated.
I would say we are well-positioned to deprecate things now. =)
It's in! Thanks so much for your persistence @Kingwl! |
I've not followed this feature much, so while I've done a quick read over the discussions, linked tickets & searched the issue tracker I still could have missed something or misunderstood entirely, but just in case: Has anyone raised the behaviour of Happy to open a new issue for discussion. Just found #14619, which would resolve this problem. |
@typescript-bot pack this. |
Does it works with a comment which explain why something is deprecated?
VSCode should than show that message. |
# Why _This follows the TS 4.0 update PR: #9960_ Typescript 4.0 comes with support for `@deprecated` annotations, which gives nice VS Code (and probably other IDE) messages informing users about API deprecation. It also marks deprecated methods/properties with ~~Strikethrough~~. See [this](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support) and microsoft/TypeScript#38523 # How - Added appropriate annotations to every possible deprecated Expo API that I found. - Updated existing comments to play nice with VS Code messages Also, added note about dead code in Notifications, which is related to #9563 (I forgot to add it then) > Not sure what to do with changelogs ❓ # Test Plan Tested messages in VS Code with _TS 4.0.2_ enabled.
# Why _This follows the TS 4.0 update PR: #9960_ Typescript 4.0 comes with support for `@deprecated` annotations, which gives nice VS Code (and probably other IDE) messages informing users about API deprecation. It also marks deprecated methods/properties with ~~Strikethrough~~. See [this](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support) and microsoft/TypeScript#38523 # How - Added appropriate annotations to every possible deprecated Expo API that I found. - Updated existing comments to play nice with VS Code messages Also, added note about dead code in Notifications, which is related to expo#9563 (I forgot to add it then) > Not sure what to do with changelogs ❓ # Test Plan Tested messages in VS Code with _TS 4.0.2_ enabled.
Is there a way to suppress this warning using |
Fixes #390
Fixes #33092
Fixes #33093
After read the codebase, I found below things need todo:
completions with symbol tag
workspace symbol with symbol tag
document symbol with symbol tag
call hierarchy with symbol tag
DiagnosticTags
current state:
Others need to do: