diff --git a/Sources/CompletionScoring/Utilities/SwiftExtensions.swift b/Sources/CompletionScoring/Utilities/SwiftExtensions.swift index 42eeb8cf4..70ab5f4b1 100644 --- a/Sources/CompletionScoring/Utilities/SwiftExtensions.swift +++ b/Sources/CompletionScoring/Utilities/SwiftExtensions.swift @@ -232,7 +232,7 @@ extension RandomAccessCollection { return body(scratchArea) } - package func concurrentCompactMap(_ f: @Sendable (Element) -> T?) -> [T] where Self: Sendable { + package func concurrentCompactMap(_ f: @Sendable (Element) -> T?) -> [T] where Self: Sendable, Index: Sendable { return withMapScratchArea { (results: UnsafeMutablePointer) -> [T] in // `nonisolated(unsafe)` is fine because we write to different offsets within the buffer on every concurrent // iteration. @@ -245,7 +245,7 @@ extension RandomAccessCollection { } } - package func concurrentMap(_ f: @Sendable (Element) -> T) -> [T] where Self: Sendable { + package func concurrentMap(_ f: @Sendable (Element) -> T) -> [T] where Self: Sendable, Index: Sendable { return withMapScratchArea { (results: UnsafeMutablePointer) -> [T] in // `nonisolated(unsafe)` is fine because we write to different offsets within the buffer on every concurrent // iteration. @@ -290,7 +290,7 @@ protocol ContiguousZeroBasedIndexedCollection: Collection where Index == Int { } extension ContiguousZeroBasedIndexedCollection { - func slicedConcurrentForEachSliceRange(body: @Sendable (Range) -> Void) { + func slicedConcurrentForEachSliceRange(body: @Sendable (Range) -> Void) where Self: SendableMetatype { // We want to use `DispatchQueue.concurrentPerform`, but we want to be called only a few times. So that we // can amortize per-callback work. We also want to oversubscribe so that we can efficiently use // heterogeneous CPUs. If we had 4 efficiency cores, and 4 performance cores, and we dispatched 8 work items diff --git a/Sources/SKLogging/LoggingScope.swift b/Sources/SKLogging/LoggingScope.swift index bdd747c0a..c6cc490f5 100644 --- a/Sources/SKLogging/LoggingScope.swift +++ b/Sources/SKLogging/LoggingScope.swift @@ -43,7 +43,7 @@ package final class LoggingScope { package func withLoggingSubsystemAndScope( subsystem: String, scope: String?, - @_inheritActorContext _ operation: @Sendable () throws -> Result + _ operation: @Sendable () throws -> Result ) rethrows -> Result { return try LoggingScope.$_subsystem.withValue(subsystem) { return try LoggingScope.$_scope.withValue(scope, operation: operation) diff --git a/Sources/SourceKitLSP/Swift/CodeActions/SyntaxCodeActionProvider.swift b/Sources/SourceKitLSP/Swift/CodeActions/SyntaxCodeActionProvider.swift index 4ed0f42eb..07f2212c1 100644 --- a/Sources/SourceKitLSP/Swift/CodeActions/SyntaxCodeActionProvider.swift +++ b/Sources/SourceKitLSP/Swift/CodeActions/SyntaxCodeActionProvider.swift @@ -17,7 +17,7 @@ import SwiftSyntax /// Describes types that provide one or more code actions based on purely /// syntactic information. -protocol SyntaxCodeActionProvider { +protocol SyntaxCodeActionProvider: SendableMetatype { /// Produce code actions within the given scope. Each code action /// corresponds to one syntactic transformation that can be performed, such /// as adding or removing separators from an integer literal. diff --git a/Sources/SwiftExtensions/AsyncUtils.swift b/Sources/SwiftExtensions/AsyncUtils.swift index cc587e769..eeed7570e 100644 --- a/Sources/SwiftExtensions/AsyncUtils.swift +++ b/Sources/SwiftExtensions/AsyncUtils.swift @@ -132,7 +132,7 @@ package func withCancellableCheckedThrowingContinuation( maxConcurrentTasks: Int = ProcessInfo.processInfo.processorCount, diff --git a/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift b/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift index 58dc68d26..2db01daf9 100644 --- a/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift +++ b/Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift @@ -770,7 +770,7 @@ struct SwiftPMBuildSystemTests { // We opened the project from a symlink. The realpath isn't part of the project and we should thus not receive // build settings for it. #expect( - try await #require( + try #require( await buildSystemManager.buildSettingsInferredFromMainFile( for: DocumentURI(aswiftReal), language: .swift,