diff --git a/Sources/SWBBuildService/Messages.swift b/Sources/SWBBuildService/Messages.swift index 070b5d3c..ded6b880 100644 --- a/Sources/SWBBuildService/Messages.swift +++ b/Sources/SWBBuildService/Messages.swift @@ -99,12 +99,10 @@ private struct MacCatalystUnavailableFrameworkNamesHandler: MessageHandler { } } +// TODO: Delete once all clients are no longer calling the public APIs which invoke this message private struct AppleSystemFrameworkNamesHandler: MessageHandler { func handle(request: Request, message: AppleSystemFrameworkNamesRequest) async throws -> StringListResponse { - guard let buildService = request.service as? BuildService else { - throw StubError.error("service object is not of type BuildService") - } - return try await StringListResponse([]) + return StringListResponse([]) } } diff --git a/Sources/SWBCore/LibSwiftDriver/PlannedBuild.swift b/Sources/SWBCore/LibSwiftDriver/PlannedBuild.swift index 5b7a5685..8fcefc65 100644 --- a/Sources/SWBCore/LibSwiftDriver/PlannedBuild.swift +++ b/Sources/SWBCore/LibSwiftDriver/PlannedBuild.swift @@ -25,7 +25,7 @@ private extension Path { init(_ virtualPath: TypedVirtualPath) throws { switch virtualPath.file { case let .absolute(absPath): self = Path(absPath.pathString) - case .standardInput, .standardOutput, .fileList, .relative, .temporary, .temporaryWithKnownContents: + case .standardInput, .standardOutput, .fileList, .relative, .temporary, .temporaryWithKnownContents, .buildArtifactWithKnownContents: fallthrough @unknown default: throw StubError.error("Cannot build Path from \(virtualPath); unimplemented path type.") diff --git a/Sources/SWBCore/LinkageDependencyResolver.swift b/Sources/SWBCore/LinkageDependencyResolver.swift index 9c648201..78897d9d 100644 --- a/Sources/SWBCore/LinkageDependencyResolver.swift +++ b/Sources/SWBCore/LinkageDependencyResolver.swift @@ -166,7 +166,7 @@ actor LinkageDependencyResolver { return nil } let buildParameters = resolver.buildParametersByTarget[target] ?? configuredTarget.parameters - if await !resolver.isTargetSuitableForPlatformForIndex(target, parameters: buildParameters, imposedParameters: imposedParameters) { + if !resolver.isTargetSuitableForPlatformForIndex(target, parameters: buildParameters, imposedParameters: imposedParameters) { return nil } let effectiveImposedParameters = imposedParameters?.effectiveParameters(target: configuredTarget, dependency: ConfiguredTarget(parameters: buildParameters, target: target), dependencyResolver: resolver) diff --git a/Sources/SWBCore/SpecImplementations/Tools/CCompiler.swift b/Sources/SWBCore/SpecImplementations/Tools/CCompiler.swift index d09d9119..279b0b3b 100644 --- a/Sources/SWBCore/SpecImplementations/Tools/CCompiler.swift +++ b/Sources/SWBCore/SpecImplementations/Tools/CCompiler.swift @@ -1065,7 +1065,7 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible // Start with the executable. let compilerExecPath = resolveExecutablePath(cbc, forLanguageOfFileType: resolvedInputFileType) - let launcher = await resolveCompilerLauncher(cbc, compilerPath: compilerExecPath, delegate: delegate) + let launcher = resolveCompilerLauncher(cbc, compilerPath: compilerExecPath, delegate: delegate) if let launcher { commandLine += [launcher.str] } diff --git a/Sources/SWBTestSupport/Timeout.swift b/Sources/SWBTestSupport/Timeout.swift index 42e54606..c50176b5 100644 --- a/Sources/SWBTestSupport/Timeout.swift +++ b/Sources/SWBTestSupport/Timeout.swift @@ -14,7 +14,7 @@ package struct TimeoutError: Error { package var description: String? } -package func withTimeout( +@discardableResult package func withTimeout( timeout: Duration, description: String? = nil, block: sending () async throws -> T diff --git a/Tests/SWBBuildSystemTests/CustomTaskBuildOperationTests.swift b/Tests/SWBBuildSystemTests/CustomTaskBuildOperationTests.swift index 763d508a..736b48d2 100644 --- a/Tests/SWBBuildSystemTests/CustomTaskBuildOperationTests.swift +++ b/Tests/SWBBuildSystemTests/CustomTaskBuildOperationTests.swift @@ -29,7 +29,6 @@ fileprivate struct CustomTaskBuildOperationTests: CoreBasedTests { try await withTemporaryDirectory { tmpDir in let destination: RunDestinationInfo = .host let core = try await getCore() - let toolchain = try #require(core.toolchainRegistry.defaultToolchain) let environment = destination.hostRuntimeEnvironment(core) let testProject = TestProject( diff --git a/Tests/SWBCoreTests/DependencyScopingTests.swift b/Tests/SWBCoreTests/DependencyScopingTests.swift index 635577d9..a18490c4 100644 --- a/Tests/SWBCoreTests/DependencyScopingTests.swift +++ b/Tests/SWBCoreTests/DependencyScopingTests.swift @@ -160,7 +160,6 @@ import Foundation // Configure the targets and create a BuildRequest. let buildParameters = BuildParameters(configuration: "Debug") let t1 = BuildRequest.BuildTargetInfo(parameters: buildParameters, target: try #require(workspace.target(named: "T1"))) - let t2 = BuildRequest.BuildTargetInfo(parameters: buildParameters, target: try #require(workspace.target(named: "T2"))) do { let buildRequest = BuildRequest(parameters: buildParameters, buildTargets: [t1], dependencyScope: .workspace, continueBuildingAfterErrors: true, useParallelTargets: false, useImplicitDependencies: true, useDryRun: false) let buildRequestContext = BuildRequestContext(workspaceContext: workspaceContext) diff --git a/Tests/SWBUtilPerfTests/MsgPackSerializationPerfTests.swift b/Tests/SWBUtilPerfTests/MsgPackSerializationPerfTests.swift index 5727c39e..dd005c7e 100644 --- a/Tests/SWBUtilPerfTests/MsgPackSerializationPerfTests.swift +++ b/Tests/SWBUtilPerfTests/MsgPackSerializationPerfTests.swift @@ -44,7 +44,7 @@ fileprivate struct MsgPackSerializationPerfTests: PerfTests { await measure { for _ in 1...iterations { - #expect(self.serializeScalarData() != nil) + #expect(!self.serializeScalarData().byteString.isEmpty) } } } @@ -91,7 +91,7 @@ fileprivate struct MsgPackSerializationPerfTests: PerfTests { await measure { for _ in 1...iterations { - #expect(self.serializeStringData() != nil) + #expect(!self.serializeStringData().byteString.isEmpty) } } } @@ -133,7 +133,7 @@ fileprivate struct MsgPackSerializationPerfTests: PerfTests { await measure { for _ in 1...iterations { - #expect(self.serializeArrayData() != nil) + #expect(!self.serializeArrayData().byteString.isEmpty) } } } @@ -171,7 +171,7 @@ fileprivate struct MsgPackSerializationPerfTests: PerfTests { await measure { for _ in 1...iterations { - #expect(self.serializeDictionaryData() != nil) + #expect(!self.serializeDictionaryData().byteString.isEmpty) } } } @@ -220,7 +220,7 @@ fileprivate struct MsgPackSerializationPerfTests: PerfTests { { for _ in 1...iterations { - #expect(self.serializeCustomElementData(elements) != nil) + #expect(!self.serializeCustomElementData(elements).byteString.isEmpty) } } } diff --git a/Tests/SWBUtilTests/FSProxyTests.swift b/Tests/SWBUtilTests/FSProxyTests.swift index 0389b852..ebfced2a 100644 --- a/Tests/SWBUtilTests/FSProxyTests.swift +++ b/Tests/SWBUtilTests/FSProxyTests.swift @@ -466,8 +466,6 @@ import SWBTestSupport let fileAtts = try FileManager.default.attributesOfItem(atPath: filePath.str) let fileMgrModDate = try #require(fileAtts[FileAttributeKey.modificationDate] as? Date) - // not working on Windows for some reason - let hostOS = try ProcessInfo.processInfo.hostOperatingSystem() #expect(fsModDate == fileMgrModDate) } }