Skip to content

Commit bc68941

Browse files
authored
Disable SwiftVersion development mode (#8074)
### Motivation: Running `swift package --version` indicate it is in development mode, while `swift --release` does not. ``` ❯ swift --version Apple Swift version 6.0.1 (swift-6.0.1-RELEASE) Target: arm64-apple-macosx15.0 ❯ swift package --version Swift Package Manager - Swift 6.0.1-dev ``` ### Modifications: Toggling `isDevelopment` boolean to `false` in `SwiftVersion` struct extension. ### Result: ``` ❯ swift build --show-bin-path /Users/bkhouri/Documents/git/public/swiftlang/swift-package-manager/.build/arm64-apple-macosx/debug ❯ /Users/bkhouri/Documents/git/public/swiftlang/swift-package-manager/.build/arm64-apple-macosx/debug/swift-package --version Swift Package Manager - Swift 6.0.2 ```
1 parent 00095ed commit bc68941

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Sources/Basics/SwiftVersion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extension SwiftVersion {
5959
/// The current version of the package manager.
6060
public static let current = SwiftVersion(
6161
version: (6, 0, 3),
62-
isDevelopment: true,
62+
isDevelopment: false,
6363
buildIdentifier: getBuildIdentifier()
6464
)
6565
}

Tests/WorkspaceTests/WorkspaceTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ final class WorkspaceTests: XCTestCase {
213213
"""
214214
)
215215

216-
XCTAssertMatch(ws.interpreterFlags(for: foo), [.equal("-swift-version"), .equal("6")])
216+
XCTAssertMatch(
217+
ws.interpreterFlags(for: foo),
218+
(SwiftVersion.current.isDevelopment) ? [.equal("-swift-version"), .equal("6")] : []
219+
)
217220
}
218221
}
219222
}
@@ -4015,7 +4018,7 @@ final class WorkspaceTests: XCTestCase {
40154018
.sourceControl(url: "https://localhost/org/foo", requirement: .upToNextMajor(from: "1.0.0")),
40164019
.sourceControl(url: "https://localhost/org/bar", requirement: .upToNextMinor(from: "1.1.0"))
40174020
],
4018-
toolsVersion: .vNext // change to the one after 5.9
4021+
toolsVersion: .v5_10
40194022
),
40204023
],
40214024
packages: [

Utilities/build-using-self

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export SWIFTCI_IS_SELF_HOSTED=1
2323

2424
set -x
2525

26+
# Display toolchain version
27+
swift --version
28+
2629
# Perform package update in order to get the latest commits for the dependencies.
2730
swift package update
2831
swift build -c $CONFIGURATION

0 commit comments

Comments
 (0)