Skip to content

NFC: Fix @Sendable @escaping order, symbol name typo #7446

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
Apr 9, 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/Basics/Concurrency/ConcurrencyHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extension DispatchQueue {

/// Bridges between potentially blocking methods that take a result completion closure and async/await
public func safe_async<T, ErrorType: Error>(
_ body: @Sendable @escaping (@Sendable @escaping (Result<T, ErrorType>) -> Void) -> Void
_ body: @escaping @Sendable (@escaping @Sendable (Result<T, ErrorType>) -> Void) -> Void
) async throws -> T {
try await withCheckedThrowingContinuation { continuation in
// It is possible that body make block indefinitely on a lock, semaphore,
Expand Down
2 changes: 1 addition & 1 deletion Sources/Basics/FileSystem/TemporaryFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public func withTemporaryDirectory<Result>(
fileSystem: FileSystem = localFileSystem,
dir: AbsolutePath? = nil,
prefix: String = "TemporaryDirectory",
_ body: @Sendable @escaping (AbsolutePath, @escaping (AbsolutePath) -> Void) async throws -> Result
_ body: @escaping @Sendable (AbsolutePath, @escaping (AbsolutePath) -> Void) async throws -> Result
) throws -> Task<Result, Error> {
let temporaryDirectory = try createTemporaryDirectory(fileSystem: fileSystem, dir: dir, prefix: prefix)

Expand Down
3 changes: 1 addition & 2 deletions Sources/Basics/Observability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public class ObservabilitySystem {
private struct SingleDiagnosticsHandler: ObservabilityHandlerProvider, DiagnosticsHandler {
var diagnosticsHandler: DiagnosticsHandler { self }

let underlying: @Sendable (ObservabilityScope, Diagnostic)
-> Void
let underlying: @Sendable (ObservabilityScope, Diagnostic) -> Void

init(_ underlying: @escaping @Sendable (ObservabilityScope, Diagnostic) -> Void) {
self.underlying = underlying
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreCommands/BuildSystemSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private struct NativeBuildSystemFactory: BuildSystemFactory {
),
additionalFileRules: FileRuleDescription.swiftpmFileTypes,
pkgConfigDirectories: self.swiftCommandState.options.locations.pkgConfigDirectories,
dependenciesByRootPackageIdentity: rootPackageInfo.dependecies,
dependenciesByRootPackageIdentity: rootPackageInfo.dependencies,
targetsByRootPackageIdentity: rootPackageInfo.targets,
outputStream: outputStream ?? self.swiftCommandState.outputStream,
logLevel: logLevel ?? self.swiftCommandState.logLevel,
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreCommands/SwiftCommandState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ package final class SwiftCommandState {
return workspace
}

package func getRootPackageInformation() throws -> (dependecies: [PackageIdentity: [PackageIdentity]], targets: [PackageIdentity: [String]]) {
package func getRootPackageInformation() throws -> (dependencies: [PackageIdentity: [PackageIdentity]], targets: [PackageIdentity: [String]]) {
let workspace = try self.getActiveWorkspace()
let root = try self.getWorkspaceRoot()
let rootManifests = try temp_await {
Expand Down
14 changes: 7 additions & 7 deletions Sources/PackageRegistry/SignatureValidation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct SignatureValidation {
fileSystem: FileSystem,
observabilityScope: ObservabilityScope,
callbackQueue: DispatchQueue,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
guard !self.skipSignatureValidation else {
return completion(.success(.none))
Expand Down Expand Up @@ -138,7 +138,7 @@ struct SignatureValidation {
fileSystem: FileSystem,
observabilityScope: ObservabilityScope,
callbackQueue: DispatchQueue,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
do {
let versionMetadata = try self.versionMetadataProvider(package, version)
Expand Down Expand Up @@ -240,7 +240,7 @@ struct SignatureValidation {
configuration: RegistryConfiguration.Security.Signing,
fileSystem: FileSystem,
observabilityScope: ObservabilityScope,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
Task {
do {
Expand Down Expand Up @@ -353,7 +353,7 @@ struct SignatureValidation {
fileSystem: FileSystem,
observabilityScope: ObservabilityScope,
callbackQueue: DispatchQueue,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
guard !self.skipSignatureValidation else {
return completion(.success(.none))
Expand Down Expand Up @@ -402,7 +402,7 @@ struct SignatureValidation {
fileSystem: FileSystem,
observabilityScope: ObservabilityScope,
callbackQueue: DispatchQueue,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
let manifestName = toolsVersion.map { "Package@swift-\($0).swift" } ?? Manifest.filename

Expand Down Expand Up @@ -506,7 +506,7 @@ struct SignatureValidation {
configuration: RegistryConfiguration.Security.Signing,
fileSystem: FileSystem,
observabilityScope: ObservabilityScope,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
Task {
do {
Expand Down Expand Up @@ -577,7 +577,7 @@ struct SignatureValidation {
signatureFormat: SignatureFormat,
configuration: RegistryConfiguration.Security.Signing,
fileSystem: FileSystem,
completion: @Sendable @escaping (Result<SigningEntity?, Error>) -> Void
completion: @escaping @Sendable (Result<SigningEntity?, Error>) -> Void
) {
Task {
do {
Expand Down