From 855eddb56850f8ad51d0605e664f144bddfc8018 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 7 Jul 2023 12:43:56 -0700 Subject: [PATCH] Downgrade priors version mismatch warning As a user when you're changing between versions of these files there's nothing you could do to avoid invalidation so this warning feel superfluous --- .../IncrementalDependencyAndInputSetup.swift | 3 +-- Tests/SwiftDriverTests/IncrementalCompilationTests.swift | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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] {