Skip to content
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

[Dependency Scanner] Refactor the global scanning service to no longer maintain scanner cache state #77794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Nov 21, 2024

Instead, each scan's 'ModuleDependenciesCache' will hold all of the data corresponding to discovered module dependencies.

The initial design presumed the possibility of sharing a global scanning cache amongst different scanner invocations, possibly even different concurrent scanner invocations.

This change also deprecates two libSwiftScan entry-points: swiftscan_scanner_cache_load and swiftscan_scanner_cache_serialize. They never ended up getting used, and since this code has been largely stale, we are confident they have not otherwise had users, and they do not fit with this design.

A follow-up change will re-introduce module dependency cache serialization on a per-query basis and bring the binary format up-to-date.

…r maintain scanner cache state

Instead, each scan's 'ModuleDependenciesCache' will hold all of the data corresponding to discovered module dependencies.

The initial design presumed the possibility of sharing a global scanning cache amongs different scanner invocations, possibly even different concurrent scanner invocations.

This change also deprecates two libSwiftScan entry-points: 'swiftscan_scanner_cache_load' and 'swiftscan_scanner_cache_serialize'. They never ended up getting used, and since this code has been largely stale, we are confident they have not otherwise had users, and they do not fit with this design.

A follow-up change will re-introduce moduele dependency cache serialization on a per-query basis and bring the binary format up-to-date.
@artemcm artemcm force-pushed the RefactorGlobalDependencyScanningCache branch from 35f1fb0 to ac00029 Compare November 21, 2024 21:52
@artemcm
Copy link
Contributor Author

artemcm commented Nov 21, 2024

@swift-ci test

artemcm added a commit to artemcm/swift-driver that referenced this pull request Nov 21, 2024
…serialization SwiftScan API uses

This mechanism relied on serializing contents of a dependency scanner cache that included all queried scanning contexts. Instead, the scanner will move to a per-query serialization format.
These API were never actually deployed and, to our knowledge, have not worked for a long time.

Compiler-side change: swiftlang/swift#77794
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.

1 participant