-
Notifications
You must be signed in to change notification settings - Fork 2
FEA-1781: Avoid indexing synthetic functions with no definition #38
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
FEA-1781: Avoid indexing synthetic functions with no definition #38
Conversation
// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/other.dart/more. | ||
// ^^^^ reference scip-dart pub dart:async 2.18.0 dart:async/future.dart/Future#then(). |
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.
loadLibrary
has no scip reference, as it has no definition
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/other.dart/Bar# | ||
// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/other.dart/Bar#someMethod(). |
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.
Similarly, call
has no reference, as it has no definition
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
@@ -1 +1 @@ | |||
FROM drydock-prod.workiva.net/workiva/dart_build_image:3 as build No newline at end of file |
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.
leftover from previous release process, now that scip-dart
is published to pub.dev, publishing will be done manually (until we can figure out how to automate it)
var element = node.staticElement; | ||
|
||
// Both `.loadLibrary()`, and `.call()` are synthetic functions that | ||
// have no definition. These should therefore should not be indexed. |
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.
#nit
// have no definition. These should therefore should not be indexed. | |
// have no definition. Therefore these should not be indexed. |
FunctionElement.LOAD_LIBRARY_NAME, | ||
FunctionElement.CALL_METHOD_NAME, |
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 don't suppose the analyzer provides their own list of synthetic functions without definitions? :badpokerface:
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.
Unfortunately not
I pulled this directly from the analyzer code here: https://sourcegraph.com/github.com/dart-lang/sdk/-/blob/pkg/analyzer/lib/src/dart/analysis/index.dart?L145:27. There's also no references of LOAD_LIBRARY_NAME
QA +1 Verified results of scip snapshots, all changes are what we expect |
🚀 @Workiva/release-management-p 🚢 |
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.
+1 from RM
Closes #18
Dart has 2 synthetic functions which have no definition:
loadLibrary
on deferred imports, andcall
on all functions. These should be completely omitted from the scip symbol references