Skip to content

Commit 7d5368f

Browse files
committed
Do not warn on failure to in-process query target info or supported features
These warnings are not actionable by the user. Instead issue a remark, so as to avoid having these messages being raised as issues in build logs.
1 parent 8d02030 commit 7d5368f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extension Driver {
7070
return supportedArgs
7171
}
7272
} catch {
73-
diagnosticsEngine.emit(.warning_inprocess_supported_features_query_failed(error.localizedDescription))
73+
diagnosticsEngine.emit(.remark_inprocess_supported_features_query_failed(error.localizedDescription))
7474
}
7575

7676
// Fallback: Invoke `swift-frontend -emit-supported-features` and decode the output

Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ extension Driver {
256256
return targetInfo
257257
}
258258
} catch {
259-
diagnosticsEngine.emit(.warning_inprocess_target_info_query_failed(error.localizedDescription))
259+
diagnosticsEngine.emit(.remark_inprocess_target_info_query_failed(error.localizedDescription))
260260
}
261261

262262
// Fallback: Invoke `swift-frontend -print-target-info` and decode the output

Sources/SwiftDriver/Utilities/Diagnostics.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ extension Diagnostic.Message {
5151
.warning("inferring simulator environment for target '\(originalTriple.triple)'; use '-target \(inferredTriple.triple)' instead")
5252
}
5353

54-
static func warning_inprocess_target_info_query_failed(_ error: String) -> Diagnostic.Message {
55-
.warning("In-process target-info query failed (\(error)). Using fallback mechanism.")
54+
static func remark_inprocess_target_info_query_failed(_ error: String) -> Diagnostic.Message {
55+
.remark("In-process target-info query failed (\(error)). Using fallback mechanism.")
5656
}
5757

58-
static func warning_inprocess_supported_features_query_failed(_ error: String) -> Diagnostic.Message {
59-
.warning("In-process supported-compiler-features query failed (\(error)). Using fallback mechanism.")
58+
static func remark_inprocess_supported_features_query_failed(_ error: String) -> Diagnostic.Message {
59+
.remark("In-process supported-compiler-features query failed (\(error)). Using fallback mechanism.")
6060
}
6161

6262
static func error_argument_not_allowed_with(arg: String, other: String) -> Diagnostic.Message {

0 commit comments

Comments
 (0)