diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift index 061218753..24fd57972 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 3055a0b7d..6f19e121b 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] {