diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift index 1a0a363e0..475b9ddbc 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift @@ -344,8 +344,7 @@ extension IncrementalCompilationState.IncrementalDependencyAndInputSetup { graphIfPresent = try ModuleDependencyGraph.read(from: dependencyGraphPath, info: self) } catch let ModuleDependencyGraph.ReadError.mismatchedSerializedGraphVersion(expected, read) { - diagnosticEngine.emit(.warning("Will not do cross-module incremental builds, wrong version of priors; expected \(expected) but read \(read) at '\(dependencyGraphPath)'"), - location: nil) + reporter?.report("Will not do cross-module incremental builds, wrong version of priors; expected \(expected) but read \(read) at '\(dependencyGraphPath)'") graphIfPresent = nil } catch { diff --git a/Tests/SwiftDriverTests/IncrementalCompilationTests.swift b/Tests/SwiftDriverTests/IncrementalCompilationTests.swift index 8f22969d8..53a1c4282 100644 --- a/Tests/SwiftDriverTests/IncrementalCompilationTests.swift +++ b/Tests/SwiftDriverTests/IncrementalCompilationTests.swift @@ -1603,7 +1603,7 @@ extension DiagVerifiable { "Incremental compilation: Read dependency graph" } @DiagsBuilder var couldNotReadPriors: [Diagnostic.Message] { - .warning("Will not do cross-module incremental builds, wrong version of priors; expected") + .remark("Will not do cross-module incremental builds, wrong version of priors; expected") } // MARK: - dependencies @DiagsBuilder func reading(deps inputs: [String]) -> [Diagnostic.Message] {