Skip to content

Commit 307316d

Browse files
authored
Tool version updates (#8183)
Update the `ToolsVersion` data structure to include the 6.1.0 release, and update some references to ToolsVersion.vNext and 999.0 to non-development releases. References: - #8139 - #8074
1 parent dd1f6f4 commit 307316d

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Sources/PackageModel/ToolsVersion.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public struct ToolsVersion: Equatable, Hashable, Codable, Sendable {
3232
public static let v5_9 = ToolsVersion(version: "5.9.0")
3333
public static let v5_10 = ToolsVersion(version: "5.10.0")
3434
public static let v6_0 = ToolsVersion(version: "6.0.0")
35+
public static let v6_1 = ToolsVersion(version: "6.1.0")
3536
public static let vNext = ToolsVersion(version: "999.0.0")
3637

3738
/// The current tools version in use.

Tests/WorkspaceTests/WorkspaceTests.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,25 @@ final class WorkspaceTests: XCTestCase {
217217
XCTAssertMatch(try ws.interpreterFlags(for: packageManifest), [.equal("-swift-version"), .equal("6")])
218218
}
219219

220+
do {
221+
let ws = try createWorkspace(
222+
"""
223+
// swift-tools-version:5.9.2
224+
import PackageDescription
225+
let package = Package(
226+
name: "foo"
227+
)
228+
"""
229+
)
230+
231+
XCTAssertMatch(try ws.interpreterFlags(for: packageManifest), [.equal("-swift-version"), .equal("5")])
232+
}
233+
220234
do {
221235
// Invalid package manifest should still produce build settings.
222236
let ws = try createWorkspace(
223237
"""
224-
// swift-tools-version:999.0
238+
// swift-tools-version:5.9.2
225239
import PackageDescription
226240
"""
227241
)
@@ -4122,7 +4136,7 @@ final class WorkspaceTests: XCTestCase {
41224136
.sourceControl(url: "https://localhost/org/foo", requirement: .upToNextMajor(from: "1.0.0")),
41234137
.sourceControl(url: "https://localhost/org/bar", requirement: .upToNextMinor(from: "1.1.0"))
41244138
],
4125-
toolsVersion: .vNext // change to the one after 5.9
4139+
toolsVersion: .v5_10
41264140
),
41274141
],
41284142
packages: [

Utilities/build-using-self

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ set -x
3232

3333
env | sort
3434

35+
# Display toolchain version
36+
swift --version
37+
3538
# Perform package update in order to get the latest commits for the dependencies.
3639
swift package update
3740
swift build -c $CONFIGURATION

0 commit comments

Comments
 (0)