File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
Sources/SKSwiftPMWorkspace Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,9 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {
363363 private func compilerArguments( for file: URL , in buildTarget: any SwiftBuildTarget ) async throws -> [ String ] {
364364 let compileArguments = try buildTarget. compileArguments ( for: file)
365365
366+ #if compiler(>=6.1)
367+ #warning("When we drop support for Swift 5.10 we no longer need to adjust compiler arguments for the Modules move")
368+ #endif
366369 // Fix up compiler arguments that point to a `/Modules` subdirectory if the Swift version in the toolchain is less
367370 // than 6.0 because it places the modules one level higher up.
368371 let toolchainVersion = await orLog ( " Getting Swift version " ) { try await toolchainRegistry. default? . swiftVersion }
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ final class DependencyTrackingTests: XCTestCase {
5050 // Semantic analysis: expect module import error.
5151 XCTAssertEqual ( initialDiags. diagnostics. count, 1 )
5252 if let diagnostic = initialDiags. diagnostics. first {
53+ #if compiler(>=6.1)
54+ #warning("When we drop support for Swift 5.10 we no longer need to check for the Objective-C error message")
55+ #endif
5356 XCTAssert (
5457 diagnostic. message. contains ( " Could not build Objective-C module " )
5558 || diagnostic. message. contains ( " No such module " ) ,
Original file line number Diff line number Diff line change @@ -186,7 +186,14 @@ final class PublishDiagnosticsTests: XCTestCase {
186186
187187 _ = try project. openDocument ( " LibB.swift " )
188188 let diagnosticsBeforeBuilding = try await project. testClient. nextDiagnosticsNotification ( )
189- XCTAssert ( diagnosticsBeforeBuilding. diagnostics. contains ( where: { $0. message == " No such module 'LibA' " } ) )
189+ XCTAssert (
190+ diagnosticsBeforeBuilding. diagnostics. contains ( where: {
191+ #if compiler(>=6.1)
192+ #warning("When we drop support for Swift 5.10 we no longer need to check for the Objective-C error message")
193+ #endif
194+ return $0. message == " No such module 'LibA' " || $0. message == " Could not build Objective-C module 'LibA' "
195+ } )
196+ )
190197
191198 try await SwiftPMTestProject . build ( at: project. scratchDirectory)
192199
Original file line number Diff line number Diff line change @@ -222,7 +222,14 @@ final class PullDiagnosticsTests: XCTestCase {
222222 XCTFail ( " Expected full diagnostics report " )
223223 return
224224 }
225- XCTAssert ( fullReportBeforeBuilding. items. contains ( where: { $0. message == " No such module 'LibA' " } ) )
225+ XCTAssert (
226+ fullReportBeforeBuilding. items. contains ( where: {
227+ #if compiler(>=6.1)
228+ #warning("When we drop support for Swift 5.10 we no longer need to check for the Objective-C error message")
229+ #endif
230+ return $0. message == " No such module 'LibA' " || $0. message == " Could not build Objective-C module 'LibA' "
231+ } )
232+ )
226233
227234 let diagnosticsRefreshRequestReceived = self . expectation ( description: " DiagnosticsRefreshRequest received " )
228235 project. testClient. handleSingleRequest { ( request: DiagnosticsRefreshRequest ) in
You can’t perform that action at this time.
0 commit comments