Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable SwiftVersion development mode #8074

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Basics/SwiftVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension SwiftVersion {
/// The current version of the package manager.
public static let current = SwiftVersion(
version: (6, 0, 3),
isDevelopment: true,
isDevelopment: false,
buildIdentifier: getBuildIdentifier()
)
}
Expand Down
7 changes: 5 additions & 2 deletions Tests/WorkspaceTests/WorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ final class WorkspaceTests: XCTestCase {
"""
)

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: instead of setting the expected value based on SwiftVersion.current.isDevelopment, should we instead modify line 208 to use a specific // swift-tools-version:5.10, or whichever version it's supposed to be?

)
}
}
}
Expand Down Expand Up @@ -4015,7 +4018,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