-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Dependency Scanning] Adding Diagnostics C-API for Invalid Negative-stat-cached Paths Incurred During Clang Modules Scan #81944
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
base: main
Are you sure you want to change the base?
Conversation
Note to reviewers:
|
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.
Can you specify the intent usage this new API? In both commit message and proper documentation around the API?
For the test, I created swift-scan-test
binary to test C APIs from scanner. There is a scan option but only takes one command. Potentially, you can add a new command that takes multiple commands (maybe through a YAML or JSON file) so some work needs to be done here.
Alternatively, you can look to write the test in swift-driver repo.
@@ -838,9 +838,11 @@ generateFullDependencyGraph(const CompilerInstance &instance, | |||
swiftTextualDeps->textualModuleDetails.bridgingSourceFiles), | |||
create_set(clangHeaderDependencyNames), | |||
create_set(bridgedOverlayDependencyNames), | |||
/*sourceImportedDependencies*/ create_set({}), | |||
/*sourceImportedDependencies*/ | |||
create_set(std::vector<std::string>()), |
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.
Maybe better to change to create_empty_set
?
@@ -458,6 +458,10 @@ swiftscan_scanner_diagnostics_query(swiftscan_scanner_t scanner); | |||
SWIFTSCAN_PUBLIC void | |||
swiftscan_scanner_diagnostics_reset(swiftscan_scanner_t scanner); | |||
|
|||
SWIFTSCAN_PUBLIC swiftscan_string_set_t * | |||
swiftscan_scanner_get_invalid_negative_stat_cached_paths( |
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.
This should not be in the Scanner Diagnostics API section and need proper documentation.
I think I can test the C++ API in Swift's |
This PR adds a C-API
swiftscan_scanner_get_invalid_negative_stat_cached_paths
that takes aDependencyScanningTool
as input.rdar://150954767