Skip to content

Commit 12952a3

Browse files
Dependencies: emit warning instead of error if the Swift toolchain can't support VALIDATE_MODULE_DEPENDENCIES to match clang
1 parent d711bb7 commit 12952a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SWBCore/Dependencies.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public struct ModuleDependenciesContext: Sendable, SerializableCodable {
138138
guard validate != .no else { return [] }
139139
guard let imports else {
140140
return [Diagnostic(
141-
behavior: .error,
141+
behavior: .warning,
142142
location: .unknown,
143143
data: DiagnosticData("The current toolchain does not support \(BuiltinMacros.VALIDATE_MODULE_DEPENDENCIES.name)"))]
144144
}

Tests/SWBBuildSystemTests/DependencyValidationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ fileprivate struct DependencyValidationTests: CoreBasedTests {
446446
let buildRequest = BuildRequest(parameters: parameters, buildTargets: [BuildRequest.BuildTargetInfo(parameters: parameters, target: target)], continueBuildingAfterErrors: false, useParallelTargets: true, useImplicitDependencies: true, useDryRun: false)
447447

448448
try await tester.checkBuild(runDestination: .host, buildRequest: buildRequest, persistent: true) { results in
449-
guard !results.checkError(.prefix("The current toolchain does not support VALIDATE_MODULE_DEPENDENCIES"), failIfNotFound: false) else { return }
449+
guard !results.checkWarning(.prefix("The current toolchain does not support VALIDATE_MODULE_DEPENDENCIES"), failIfNotFound: false) else { return }
450450

451451
for expectedDiag in expectedDiags {
452452
_ = results.check(.contains(expectedDiag.data.description), kind: expectedDiag.behavior, failIfNotFound: true, sourceLocation: #_sourceLocation) { diag in

0 commit comments

Comments
 (0)