-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: Deprecations and related refactorings #18132
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
Merged
asgerf
merged 34 commits into
github:js/shared-dataflow-branch
from
asgerf:jss/deprecation
Dec 6, 2024
Merged
JS: Deprecations and related refactorings #18132
asgerf
merged 34 commits into
github:js/shared-dataflow-branch
from
asgerf:jss/deprecation
Dec 6, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d198347
to
2cdc1de
Compare
f3e815c
to
5356086
Compare
We're deprecating the class through an alias, but it is still the base class for a non-deprecated class, for backwards compatibility. For this reason we're also deprecating all of its member predicates so we can remove those in the future.
Also avoid the term "analysis-specific" because it's not a term we use anywhere else.
Mainly adds 'deprecated' in front of a bunch of tests for deprecated APIs.
The tests show a new (source, sink) pair for an already-flagged sink. Not sure why it was not flagged originally since the data flow path seems valid, given the steps provided by our models.
Unlike most other references to this class, we're not subclassing it here, we're just trying to reuse some standard barrier guards but with a different flow state.
Drive-by bugfix: Rename sanitizes -> blocksExpr. This fixes a bug that caused the sanitizer guard not to work in df2. The test output reflects the fact that the barrier guard works now.
…rdNode Previously our barrier guard classes were direct descendents of SanitizerGuardNode which made it hard to deprecate that class. Now our barrier guards are not descending from any shared class. Instead they are contributed to SanitizerGuardNode via a private helper class we can remove in the future.
Makes a quick effort attempt to restore the original behaviour, though it is not exactly the same due to lack of recursion.
5356086
to
3f0d0e3
Compare
erik-krogh
approved these changes
Dec 6, 2024
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.
Nice 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deprecates a lot of stuff and refactors a few things to avoid depending on deprecated predicates ourselves.
Deprecations
Deprecates the old data flow library and some related classes.
Configuration
BarrierGuardNode
LabeledBarrierGuardNode
AdditionalBarrierGuardNode
Configuration
SanitizerGuardNode
LabeledSanitizerGuardNode
AdditionalSanitizerGuardNode
A couple of refactorings were needed to actually remove our own uses of the guard-related classes.
Also adds a new class called
TaintTracking::AdditionalBarrierGuard
for built-in taint barriers.More deprecations and migration docs will likely follow in later PRs.
Documentation
Also beefs up the qldoc for
SummarizedCallable
in preparation of using it as the replacement for some of our step-related APIs, and we'll likely need to reference it in an upcoming data flow migration article.We now have plenty of articles/tutorials that refer to the deprecated APIs, but I've factored updates to
.rst
files into a separate documentation PR.Evaluations
Evaluation shows a a nice little speed-up of 1% average and 3% median, resulting from the refactorings mentioned.