Skip to content

Commit ae42606

Browse files
author
David Ungar
authored
Merge pull request #392 from davidungar/take-rel-path-for-source-file-dep-graph
[Incremental] Allow relative paths when reading swiftdeps files
2 parents 87d6a4d + 8485c2b commit ae42606

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Sources/SwiftDriver/Incremental Compilation/SourceFileDependencyGraph.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,14 @@ extension SourceFileDependencyGraph {
111111
case malformedSourceFileDepGraphNodeRecord
112112
case unknownRecord
113113
case unexpectedSubblock
114-
case notAbsolutePath
115114
case bogusNameOrContext
116115
case unknownKind
117116
}
118117

119118
// FIXME: This should accept a FileSystem parameter.
120119
static func read(from swiftDeps: ModuleDependencyGraph.SwiftDeps
121120
) throws -> Self {
122-
guard let path = swiftDeps.file.absolutePath
123-
else {
124-
throw ReadError.notAbsolutePath
125-
}
126-
return try self.init(pathString: path.pathString)
121+
try self.init(pathString: swiftDeps.file.name)
127122
}
128123

129124
init(nodesForTesting: [Node]) {

0 commit comments

Comments
 (0)