mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Dependency Scanning] Do not process transitive '@_implementationOnly' dependencies of binary Swift modules
These modules are not guaranteed to be found, which is okay, as compilation is meant to be possible in their absense since their contents are not used in the public API of the module which imports them as implementation-only. Resolves rdar://103031296
This commit is contained in:
@@ -420,6 +420,12 @@ llvm::ErrorOr<ModuleDependencyInfo> SerializedModuleLoaderBase::scanModuleFile(
|
||||
if (dependency.isHeader())
|
||||
continue;
|
||||
|
||||
// Transitive @_implementationOnly dependencies of
|
||||
// binary modules are not required to be imported during normal builds
|
||||
// TODO: This is worth revisiting for debugger purposes
|
||||
if (dependency.isImplementationOnly())
|
||||
continue;
|
||||
|
||||
// Find the top-level module name.
|
||||
auto modulePathStr = dependency.getPrettyPrintedPath();
|
||||
StringRef moduleName = modulePathStr;
|
||||
|
||||
Reference in New Issue
Block a user