File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -812,13 +812,13 @@ extension Driver {
812
812
return ( key, outputPaths)
813
813
} )
814
814
815
- func collectSwiftModuleNames ( _ ids: [ ModuleDependencyId ] ) -> [ String ] {
816
- return ids. compactMap { id in
815
+ func collectUniqueSwiftModuleNames ( _ ids: [ ModuleDependencyId ] ) -> [ String ] {
816
+ return Array ( Set ( ids. compactMap { id in
817
817
if case . swift( let module) = id {
818
818
return module
819
819
}
820
820
return nil
821
- }
821
+ } ) )
822
822
}
823
823
824
824
func getSwiftDependencies( for module: String ) -> [ String ] {
@@ -827,7 +827,7 @@ extension Driver {
827
827
guard !dependencies. isEmpty else {
828
828
return [ ]
829
829
}
830
- return collectSwiftModuleNames ( dependencies)
830
+ return collectUniqueSwiftModuleNames ( dependencies)
831
831
}
832
832
833
833
func getOutputPaths( withName modules: [ String ] , loadableFor arch: Triple . Arch ) throws -> [ TypedVirtualPath ] {
@@ -870,7 +870,7 @@ extension Driver {
870
870
// Keep track of modules we haven't handled.
871
871
var unhandledModules = Set < String > ( inputMap. keys)
872
872
// Start from those modules explicitly imported into the file under scanning
873
- var openModules = collectSwiftModuleNames ( dependencyGraph. mainModule. allDependencies)
873
+ var openModules = collectUniqueSwiftModuleNames ( dependencyGraph. mainModule. allDependencies)
874
874
var idx = 0
875
875
while idx != openModules. count {
876
876
let module = openModules [ idx]
You can’t perform that action at this time.
0 commit comments