Skip to content

Commit b9f8032

Browse files
author
David Ungar
authored
Merge pull request #491 from davidungar/print-path-fix
[Incremental] Handle nodes imported from swiftmodules
2 parents 8d38100 + 63cc4cf commit b9f8032

File tree

1 file changed

+7
-3
lines changed
  • Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts

1 file changed

+7
-3
lines changed

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Tracer.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ extension ModuleDependencyGraph.Tracer {
114114
currentPathIfTracing = currentPath
115115
}
116116

117-
118117
private func printPath(_ path: [Graph.Node]) {
119118
guard path.first?.dependencySource != path.last?.dependencySource
120119
else {
@@ -126,8 +125,13 @@ extension ModuleDependencyGraph.Tracer {
126125
path
127126
.compactMap { node in
128127
node.dependencySource
129-
.flatMap {graph.inputDependencySourceMap[$0] }
130-
.map { "\(node.key) in \($0.file.basename)"}
128+
.flatMap {
129+
// swiftmodules won't be in the map
130+
graph.inputDependencySourceMap.contains(key: $0)
131+
? "\(node.key) in \(graph.inputDependencySourceMap[$0].file.basename)"
132+
: "\(node.key)"
133+
}
134+
131135
}
132136
.joined(separator: " -> ")
133137
].joined(separator: " ")

0 commit comments

Comments
 (0)