Skip to content

[6.2 🍒][Dependency Scanning] Always use a locking diagnostic consumer #81294

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

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 5, 2025

Cherry-pick of #81262

  • Explanation: Since we enabled parallel dependency scanning by-default, each individual scan needs a diagnostic consumer that is safe to use across many threads. Deprecate the 'Locking' sub-class, making its behavior the default in the base class. This ensures that parallel scanning will not encounter a race when multiple worker threads are registering new diagnostics.

  • Scope: All clients of parallel (default) dependency scanning

  • Risk: Low, replaces the use of a base diagnostic collector data-structure with one that simply causes its functionality to form a critical section without changing the semantics otherwise.

  • Issue: rdar://150286558

  • Original PR: [Dependency Scanning] Always use a locking diagnostic consumer #81262

artemcm added 2 commits May 5, 2025 10:43
Since we enabled parallel dependency scanning by-default, each individual scan needs a diagnostic consumer that is safe to use across many threads. Deprecate the 'Locking' sub-class, making its behavior the default in the base class.
…ic collection

All clients are expected to have switched to the per-scan-query diagnostics using 'swiftscan_dependency_graph_get_diagnostics'
@artemcm artemcm added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 5, 2025
@artemcm artemcm requested a review from nkcsgexi May 5, 2025 17:47
@artemcm artemcm requested a review from a team as a code owner May 5, 2025 17:47
@artemcm
Copy link
Contributor Author

artemcm commented May 5, 2025

@swift-ci test

@artemcm artemcm enabled auto-merge May 5, 2025 23:25
@artemcm
Copy link
Contributor Author

artemcm commented May 6, 2025

@swift-ci test macOS platform

@artemcm artemcm merged commit e42f05f into swiftlang:release/6.2 May 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants