Skip to content

Do not warn on failure to in-process query target info or supported features #1597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ extension Driver {
return supportedArgs
}
} catch {
diagnosticsEngine.emit(.warning_inprocess_supported_features_query_failed(error.localizedDescription))
diagnosticsEngine.emit(.remark_inprocess_supported_features_query_failed(error.localizedDescription))
}

// Fallback: Invoke `swift-frontend -emit-supported-features` and decode the output
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ extension Driver {
return targetInfo
}
} catch {
diagnosticsEngine.emit(.warning_inprocess_target_info_query_failed(error.localizedDescription))
diagnosticsEngine.emit(.remark_inprocess_target_info_query_failed(error.localizedDescription))
}

// Fallback: Invoke `swift-frontend -print-target-info` and decode the output
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftDriver/Utilities/Diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ extension Diagnostic.Message {
.warning("inferring simulator environment for target '\(originalTriple.triple)'; use '-target \(inferredTriple.triple)' instead")
}

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

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

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