-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Dependency Scanning] Implement parallel imported module resolution #68252
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
Conversation
02b7a4d
to
edf95dd
Compare
@swift-ci test |
@swift-ci test Windows platform |
Windows build is failing to build the refactor because we're not linking something in correctly when building
|
edf95dd
to
70636cf
Compare
@swift-ci test |
70636cf
to
74ef02c
Compare
@swift-ci test |
74ef02c
to
139a56b
Compare
@swift-ci test |
@@ -0,0 +1,150 @@ | |||
//===--- ModuleDependencyScanner.h - Import Swift modules --------*- C++ | |||
//-*-===// |
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.
👀
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.
LGTM!
@swift-ci test |
…pendencyScanner' class From being a scattered collection of 'static' methods in ScanDependencies.cpp and member methods of ASTContext. This makes 'ScanDependencies.cpp' much easier to read, and abstracts the actual scanning logic away to a place with common state which will make it easier to reason about in the future.
'ModuleDependencyScanner' maintains a Thread Pool along with a pool of workers which are capable of executing a filesystem lookup of a named module dependency. When resolving imports of a given Swift module, each import's resolution operation can be issued asunchronously.
139a56b
to
b4dfb6b
Compare
@swift-ci test |
[Dependency Scanning] Refactor primary scan operations into
ModuleDependencyScanner
classFrom being a scattered collection of
static
methods in ScanDependencies.cppand member methods of
ASTContext
. This makesScanDependencies.cpp
much easierto read, and abstracts the actual scanning logic away to a place with common
state which will make it easier to reason about in the future.
[Dependency Scanning] Implement parallel imported module resolution
ModuleDependencyScanner
maintains a Thread Pool along with a pool of workerswhich are capable of executing a filesystem lookup of a named module dependency.
When resolving imports of a given Swift module, each import's resolution
operation can be issued asynchronously.
For the time being, the scanner is restricted to still run single-threaded, with a new frontend option
-parallel-scan
enabling multi-threaded dependency scanning.