mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Pull optional dependencies from the adjacent binary module for direct interface dependencies
For a `@Testable` import in program source, if a Swift interface dependency is discovered, and has an adjacent binary `.swiftmodule`, open up the module, and pull in its optional dependencies. If an optional dependency cannot be resolved on the filesystem, fail silently without raising a diagnostic.
This commit is contained in:
@@ -245,7 +245,8 @@ public:
|
||||
/// If a non-null \p versionInfo is provided, the module version will be
|
||||
/// parsed and populated.
|
||||
virtual bool canImportModule(ImportPath::Module named,
|
||||
ModuleVersionInfo *versionInfo) = 0;
|
||||
ModuleVersionInfo *versionInfo,
|
||||
bool isTestableImport = false) = 0;
|
||||
|
||||
/// Import a module with the given module path.
|
||||
///
|
||||
@@ -328,7 +329,8 @@ public:
|
||||
virtual Optional<const ModuleDependencyInfo*> getModuleDependencies(
|
||||
StringRef moduleName,
|
||||
ModuleDependenciesCache &cache,
|
||||
InterfaceSubContextDelegate &delegate) = 0;
|
||||
InterfaceSubContextDelegate &delegate,
|
||||
bool isTestableImport = false) = 0;
|
||||
};
|
||||
|
||||
} // namespace swift
|
||||
|
||||
Reference in New Issue
Block a user