diff --git a/Sources/Basics/Netrc.swift b/Sources/Basics/Netrc.swift index 4bbd211cd78..fdfe4db25e0 100644 --- a/Sources/Basics/Netrc.swift +++ b/Sources/Basics/Netrc.swift @@ -13,7 +13,7 @@ import Foundation /// Representation of Netrc configuration -public struct Netrc { +public struct Netrc: Sendable { /// Representation of `machine` connection settings & `default` connection settings. /// If `default` connection settings present, they will be last element. public let machines: [Machine] @@ -37,7 +37,7 @@ public struct Netrc { } /// Representation of connection settings - public struct Machine: Equatable { + public struct Machine: Equatable, Sendable { public let name: String public let login: String public let password: String @@ -147,7 +147,6 @@ public enum NetrcError: Error, Equatable { } private enum RegexUtil { - @frozen fileprivate enum Token: String, CaseIterable { case machine, login, password, account, macdef, `default` diff --git a/Sources/_InternalTestSupport/MockArchiver.swift b/Sources/_InternalTestSupport/MockArchiver.swift index 296f0d413a9..4eecaaadbd8 100644 --- a/Sources/_InternalTestSupport/MockArchiver.swift +++ b/Sources/_InternalTestSupport/MockArchiver.swift @@ -13,19 +13,23 @@ import Basics package final class MockArchiver: Archiver { - package typealias ExtractionHandler = ( + package typealias ExtractionHandler = @Sendable ( MockArchiver, AbsolutePath, AbsolutePath, (Result) -> Void ) throws -> Void - package typealias CompressionHandler = ( + package typealias CompressionHandler = @Sendable ( MockArchiver, AbsolutePath, AbsolutePath, (Result) -> Void ) throws -> Void - package typealias ValidationHandler = (MockArchiver, AbsolutePath, (Result) -> Void) throws -> Void + package typealias ValidationHandler = @Sendable ( + MockArchiver, + AbsolutePath, + (Result) -> Void + ) throws -> Void package struct Extraction: Equatable { public let archivePath: AbsolutePath diff --git a/Tests/BasicsTests/CancellatorTests.swift b/Tests/BasicsTests/CancellatorTests.swift index a9ecef35c8f..ed34c03a50c 100644 --- a/Tests/BasicsTests/CancellatorTests.swift +++ b/Tests/BasicsTests/CancellatorTests.swift @@ -348,6 +348,7 @@ final class CancellatorTests: XCTestCase { struct Worker { func work() {} + @Sendable func cancel() { Thread.sleep(forTimeInterval: 5) } @@ -391,6 +392,7 @@ fileprivate struct Worker { return self.semaphore.wait(timeout: deadline) } + @Sendable func cancel() { print("\(self.name) cancel") self.semaphore.signal() diff --git a/Tests/CommandsTests/PackageRegistryCommandTests.swift b/Tests/CommandsTests/PackageRegistryCommandTests.swift index 28dcb7c0de4..27578413645 100644 --- a/Tests/CommandsTests/PackageRegistryCommandTests.swift +++ b/Tests/CommandsTests/PackageRegistryCommandTests.swift @@ -716,6 +716,7 @@ final class PackageRegistryCommandTests: CommandsTestCase { ) } + @Sendable func validateManifest( manifestFile: String, in archivePath: AbsolutePath, diff --git a/Tests/CommandsTests/TestCommandTests.swift b/Tests/CommandsTests/TestCommandTests.swift index 1d83fb1fa44..fa6cdadaa95 100644 --- a/Tests/CommandsTests/TestCommandTests.swift +++ b/Tests/CommandsTests/TestCommandTests.swift @@ -191,7 +191,7 @@ final class TestCommandTests: CommandsTestCase { } try await fixture(name: "Miscellaneous/SkipTests") { fixturePath in - let (stdout, stderr) = try await SwiftPM.Test.execute(["--skip", "Tests"], packagePath: fixturePath) + let (stdout, _) = try await SwiftPM.Test.execute(["--skip", "Tests"], packagePath: fixturePath) // in "swift test" test output goes to stdout XCTAssertNoMatch(stdout, .contains("testExample1")) XCTAssertNoMatch(stdout, .contains("testExample2"))