Skip to content

Conversation

@artemcm
Copy link
Contributor

@artemcm artemcm commented Feb 27, 2024

Adds APIs to libSwiftScan that report diagnostics per each scanning query as a part of the produced swiftscan_dependency_graph_t or swiftscan_import_set_t.

Clients then no longer query the scanner's overall collected diagnostics. The scanner, for now, continues maintaining a shared Diagnostic Consumer in the DependencyScanningTool, which we've guarded with manual isolation to try and prevent concurrency issues:
#71792

Nevertheless, the approach of a shared diagnostic consumer by a DependencyScanningTool is broadly incorrect and has been giving us issues in contexts where the same tool is shared across many concurrently-executing scanning queries some of which may emit diagnostics.

API and code-paths added here are exercised and tested in: swiftlang/swift-driver#1552

@artemcm
Copy link
Contributor Author

artemcm commented Feb 27, 2024

@artemcm artemcm force-pushed the ScannerDiagsPerQuery branch from 315b476 to acd29b8 Compare February 27, 2024 18:16
@artemcm
Copy link
Contributor Author

artemcm commented Feb 27, 2024

swiftlang/swift-driver#1552
@swift-ci smoke test

2 similar comments
@artemcm
Copy link
Contributor Author

artemcm commented Feb 27, 2024

swiftlang/swift-driver#1552
@swift-ci smoke test

@artemcm
Copy link
Contributor Author

artemcm commented Feb 27, 2024

swiftlang/swift-driver#1552
@swift-ci smoke test

@artemcm artemcm marked this pull request as ready for review February 27, 2024 20:21
@artemcm
Copy link
Contributor Author

artemcm commented Feb 27, 2024

swiftlang/swift-driver#1552
@swift-ci smoke test

@artemcm artemcm force-pushed the ScannerDiagsPerQuery branch from acd29b8 to d2a8e32 Compare February 27, 2024 22:52
@artemcm
Copy link
Contributor Author

artemcm commented Feb 27, 2024

swiftlang/swift-driver#1552
@swift-ci smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants