Skip to content

Commit

Permalink
Disable development mode
Browse files Browse the repository at this point in the history
Disable development mode on the release.
  • Loading branch information
bkhouri committed Dec 13, 2024
1 parent cade736 commit df93234
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/Basics/SwiftVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public struct SwiftVersion: Sendable {
extension SwiftVersion {
/// The current version of the package manager.
public static let current = SwiftVersion(
version: (6, 2, 0),
isDevelopment: true,
version: (6, 1, 0),
isDevelopment: false,
buildIdentifier: getBuildIdentifier()
)
}
Expand Down
1 change: 1 addition & 0 deletions Sources/PackageModel/ToolsVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ 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.
Expand Down
22 changes: 20 additions & 2 deletions Tests/WorkspaceTests/WorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ final class WorkspaceTests: XCTestCase {
do {
let ws = try createWorkspace(
"""
// swift-tools-version:999.0
// swift-tools-version:5.10.0
import PackageDescription
let package = Package(
name: "foo"
Expand All @@ -228,7 +228,25 @@ final class WorkspaceTests: XCTestCase {

XCTAssertMatch(try ws.interpreterFlags(for: packageManifest), [.equal("-package-description-version")])
}

do {
let ws = try createWorkspace(
"""
// swift-tools-version:999.0
import PackageDescription
let package = Package(
name: "foo"
)
"""
)

XCTAssertMatch(
ws.interpreterFlags(for: foo),
(SwiftVersion.current.isDevelopment) ? [.equal("-swift-version"), .equal("6")]: []
)
}
}

}

func testManifestParseError() async throws {
Expand Down Expand Up @@ -4092,7 +4110,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: .vNext // change to the one after 5.9
toolsVersion: .v5_10
),
],
packages: [
Expand Down
3 changes: 3 additions & 0 deletions Utilities/build-using-self
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export SWIFTCI_IS_SELF_HOSTED=1

set -x

# 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
Expand Down

0 comments on commit df93234

Please sign in to comment.