Skip to content

[6.0🍒][Dependency Scanning] Use a standalone DependencyScanningFilesystem on the scanner, sharing a common status cache from Clang's dependency service cache #72933

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 Apr 9, 2024

Cherry-pick of #72932

Explanation: Built-in Clang dependency scanner uses a DependencyScanningFilesystem which relies on the stat cache owned by its parent DependencyScanningService. This way repeated attempts to query a filesystem entry hit the cache during scanning. Until now, the Swift scanner did not share this stat cache so filesystem entry lookups by the Swift scanner went directly to the "real" underlying filesystem, resulting in often duplicated calls to stat. This change makes the Swift scanner use/share Clang Scanner's stat cache, unifying the filesystem abstraction for the two.

Risk: Low. This change affects a code-path that is currently disabled in the compiler by-default (Explicit Modules). The addition for Explicit Module Builds is to now rely on existing caching technology already in-use and well-validated by the built-in Clang dependency scanner.

Testing: Existing test suite coverage exercises the relevant code-paths affected by this functional change.

Reviewed By: @cachemeifyoucan

@artemcm artemcm added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Apr 9, 2024
@artemcm artemcm requested a review from nkcsgexi April 9, 2024 17:39
@artemcm artemcm requested a review from a team as a code owner April 9, 2024 17:39
@artemcm artemcm force-pushed the 60UseClangStatCacheForScanningFS branch from 019217f to e17e147 Compare April 9, 2024 18:08
@artemcm
Copy link
Contributor Author

artemcm commented Apr 9, 2024

@swift-ci test

@artemcm artemcm enabled auto-merge April 9, 2024 18:09
… on the scanner, sharing a common `status` cache from Clang's dependency service cache
@artemcm artemcm force-pushed the 60UseClangStatCacheForScanningFS branch from e17e147 to 750041c Compare April 9, 2024 20:38
@artemcm
Copy link
Contributor Author

artemcm commented Apr 9, 2024

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Apr 10, 2024

@swift-ci test Windows platform

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.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants