diff --git a/Sources/PackageModel/ToolsVersion.swift b/Sources/PackageModel/ToolsVersion.swift index 1fd6abb6c66..571882a2126 100644 --- a/Sources/PackageModel/ToolsVersion.swift +++ b/Sources/PackageModel/ToolsVersion.swift @@ -32,7 +32,6 @@ public struct ToolsVersion: Equatable, Hashable, Codable, Sendable { public static let v5_9 = ToolsVersion(version: "5.9.0") public static let v5_10 = ToolsVersion(version: "5.10.0") public static let v6_0 = ToolsVersion(version: "6.0.0") - public static let v6_1 = ToolsVersion(version: "6.1.0") public static let vNext = ToolsVersion(version: "999.0.0") /// The current tools version in use. diff --git a/Tests/CommandsTests/BuildCommandTests.swift b/Tests/CommandsTests/BuildCommandTests.swift index 589a3289d87..ec94f9cb9a5 100644 --- a/Tests/CommandsTests/BuildCommandTests.swift +++ b/Tests/CommandsTests/BuildCommandTests.swift @@ -142,7 +142,7 @@ final class BuildCommandTests: CommandsTestCase { stderr.contains( "error: Target A imports another target (B) in the package without declaring it a dependency." ), - "got stdout: \(String(describing: stdout)), stderr: \(String(describing: stderr))" + "got stdout: \(stdout), stderr: \(stderr)" ) } } @@ -159,7 +159,7 @@ final class BuildCommandTests: CommandsTestCase { stderr.contains( "warning: Target A imports another target (B) in the package without declaring it a dependency." ), - "got stdout: \(String(describing: stdout)), stderr: \(String(describing: stderr))" + "got stdout: \(stdout), stderr: \(stderr)" ) } } diff --git a/Tests/CommandsTests/PackageCommandTests.swift b/Tests/CommandsTests/PackageCommandTests.swift index c644958b077..15064647b12 100644 --- a/Tests/CommandsTests/PackageCommandTests.swift +++ b/Tests/CommandsTests/PackageCommandTests.swift @@ -2522,27 +2522,27 @@ final class PackageCommandTests: CommandsTestCase { // Overall configuration: debug, plugin build request: debug -> without testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) + try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) } // Overall configuration: debug, plugin build request: release -> without testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) + try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) } // Overall configuration: release, plugin build request: debug -> with testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) + try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) } // Overall configuration: release, plugin build request: release -> with testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) + try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) } // Overall configuration: release, plugin build request: release including tests -> with testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "all-with-tests", "release", "true"], packagePath: fixturePath)) + try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "all-with-tests", "release", "true"], packagePath: fixturePath)) } } diff --git a/Tests/FunctionalTests/TraitTests.swift b/Tests/FunctionalTests/TraitTests.swift index 722782216d1..e1164eea6e1 100644 --- a/Tests/FunctionalTests/TraitTests.swift +++ b/Tests/FunctionalTests/TraitTests.swift @@ -19,7 +19,7 @@ import XCTest final class TraitTests: XCTestCase { func testTraits_whenNoFlagPassed() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example") + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example") // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -38,7 +38,7 @@ final class TraitTests: XCTestCase { func testTraits_whenTraitUnification() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9,Package10"]) + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9,Package10"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -61,7 +61,7 @@ final class TraitTests: XCTestCase { func testTraits_whenTraitUnification_whenSecondTraitNotEnabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9"]) + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -82,7 +82,7 @@ final class TraitTests: XCTestCase { func testTraits_whenIndividualTraitsEnabled_andDefaultTraits() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package5,Package7,BuildCondition3"]) + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package5,Package7,BuildCondition3"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -119,7 +119,7 @@ final class TraitTests: XCTestCase { func testTraits_whenIndividualTraitsEnabled_andDefaultTraitsDisabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "Package5,Package7"]) + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "Package5,Package7"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -137,7 +137,7 @@ final class TraitTests: XCTestCase { func testTraits_whenAllTraitsEnabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits"]) + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // GitHub issue #8131 // XCTAssertFalse(stderr.contains("warning:")) @@ -163,7 +163,7 @@ final class TraitTests: XCTestCase { func testTraits_whenAllTraitsEnabled_andDefaultTraitsDisabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits", "--disable-default-traits"]) + let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits", "--disable-default-traits"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // GitHub issue #8131 // XCTAssertFalse(stderr.contains("warning:")) diff --git a/Tests/WorkspaceTests/WorkspaceTests.swift b/Tests/WorkspaceTests/WorkspaceTests.swift index 457deeb04a6..1b31a3725c1 100644 --- a/Tests/WorkspaceTests/WorkspaceTests.swift +++ b/Tests/WorkspaceTests/WorkspaceTests.swift @@ -217,25 +217,11 @@ final class WorkspaceTests: XCTestCase { XCTAssertMatch(try ws.interpreterFlags(for: packageManifest), [.equal("-swift-version"), .equal("6")]) } - do { - let ws = try createWorkspace( - """ - // swift-tools-version:5.9.2 - import PackageDescription - let package = Package( - name: "foo" - ) - """ - ) - - XCTAssertMatch(try ws.interpreterFlags(for: packageManifest), [.equal("-swift-version"), .equal("5")]) - } - do { // Invalid package manifest should still produce build settings. let ws = try createWorkspace( """ - // swift-tools-version:5.9.2 + // swift-tools-version:999.0 import PackageDescription """ ) @@ -4136,7 +4122,7 @@ final class WorkspaceTests: XCTestCase { .sourceControl(url: "https://localhost/org/foo", requirement: .upToNextMajor(from: "1.0.0")), .sourceControl(url: "https://localhost/org/bar", requirement: .upToNextMinor(from: "1.1.0")) ], - toolsVersion: .v5_10 + toolsVersion: .vNext // change to the one after 5.9 ), ], packages: [ @@ -8698,6 +8684,7 @@ final class WorkspaceTests: XCTestCase { let maxConcurrentRequests = 2 let concurrentRequests = ThreadSafeBox(0) + let concurrentRequestsLock = NSLock() var configuration = HTTPClient.Configuration() configuration.maxConcurrentRequests = maxConcurrentRequests diff --git a/Utilities/build-using-self b/Utilities/build-using-self index c1277db00e1..543d01d5782 100755 --- a/Utilities/build-using-self +++ b/Utilities/build-using-self @@ -32,9 +32,6 @@ set -x env | sort -# Display toolchain version -swift --version - # Perform package update in order to get the latest commits for the dependencies. swift package update swift build -c $CONFIGURATION