-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Node-based @deprecated checks #39323
Conversation
Switch the checker to syntactic checks for `@deprecated` on declarations. This requires a bit more checking of declarations in the checker at times, but it 1. Gets rid of work, and a symbol flag, in the binder. 2. Skips work in the checker unless there is a `@deprecated` tag. 3. Makes it fairly simple to only issue errors on particular signatures of overloaded functions.
@typescript-bot perf test this |
Heya @sandersn, I've started to run the perf test suite on this PR at 8079ec2. You can monitor the build here. Update: The results are in! |
@sandersn Here they are:Comparison Report - master..39323
System
Hosts
Scenarios
|
@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. |
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.
It's looks pretty good and simple and faster.
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 couldn't figure out how to reference the
constructor
symbol, so I left it out. - isCallLikeExpression also supports JSX, tagged templates, and Decorators, so I added tests for those.
(github isn't letting me reply to other comments)
@typescript-bot perf test this |
Heya @sandersn, I've started to run the perf test suite on this PR at 9eb774b. You can monitor the build here. Update: The results are in! |
@sandersn Here they are:Comparison Report - master..39323
System
Hosts
Scenarios
|
@typescript-bot perf test this |
Heya @sandersn, I've started to run the perf test suite on this PR at 9eb774b. You can monitor the build here. Update: The results are in! |
@sandersn Here they are:Comparison Report - master..39323
System
Hosts
Scenarios
|
Overall, there's still a good bit of variation in our perf tests. But the perf on this is still pretty good even after supporting JSX et al. I'm going to merge this since I've addressed all the comments on it and in unblocks #39388. |
Switch the checker to syntactic checks for
@deprecated
on declarations. This requires a bit more checking of declarations in thechecker at times, but it:
@deprecated
tag.Fixes #39212, alternative to #39221 -- and tests are based on #39221's.
Edit: This now fixes part of #39374; JSX elements, decorators and tagged template functions are all calls and were not being marked deprecated.