Skip to content

Commit 254e109

Browse files
author
David Ungar
committed
Keep it as an error.
1 parent 70bb830 commit 254e109

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,9 @@ extension ModuleDependencyGraph {
677677
atomically: true)
678678
return false
679679
} catch {
680-
info.diagnosticEngine.emit(.warning_could_not_write_dep_graph(to: path, error: error))
680+
// It would be OK to just warn here because the build record will be
681+
// removed so that bogus priors won't be used next time.
682+
info.diagnosticEngine.emit(.error_could_not_write_dep_graph(to: path, error: error))
681683
return true
682684
}
683685
}
@@ -1038,11 +1040,12 @@ fileprivate extension DependencyKey.Designator {
10381040
}
10391041

10401042
extension Diagnostic.Message {
1041-
fileprivate static func warning_could_not_write_dep_graph(
1042-
to path: VirtualPath,
1043-
error: Error
1043+
// FIXME: This should be a warning, but I've been asked to make this
1044+
// an error for now.
1045+
fileprivate static func error_could_not_write_dep_graph(
1046+
to path: VirtualPath
10441047
) -> Diagnostic.Message {
1045-
.warning("could not write driver dependency graph to \(path), \(error.localizedDescription)")
1048+
.error("could not write driver dependency graph to \(path), \(error.localizedDescription)")
10461049
}
10471050
}
10481051

0 commit comments

Comments
 (0)