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

Fix SPM integration of the latest version of swift-testing #6121

Merged
merged 6 commits into from
Mar 27, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.9
5.10
2 changes: 1 addition & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--disable hoistAwait
--disable hoistTry
--disable redundantReturn
--swiftversion 5.9
--swiftversion 5.10
--minversion 0.53.0

# format options
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.2
15.3
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:5.10

import PackageDescription

Expand Down
4 changes: 2 additions & 2 deletions Sources/TuistLoader/SwiftPackageManager/SettingsMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ struct SettingsMapper {
case (.swift, .unsafeFlags):
swiftFlags.append(contentsOf: setting.value)
case (.swift, .enableUpcomingFeature):
swiftFlags.append("-enable-upcoming-feature \(setting.value[0])")
swiftFlags.append("-enable-upcoming-feature \"\(setting.value[0])\"")
case (.swift, .enableExperimentalFeature):
swiftFlags.append("-enable-experimental-feature \(setting.value[0])")
swiftFlags.append("-enable-experimental-feature \"\(setting.value[0])\"")
case (.linker, .unsafeFlags):
linkerFlags.append(contentsOf: setting.value)
case (.linker, .linkedFramework), (.linker, .linkedLibrary):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,11 @@ final class PackageInfoMapperTests: TuistUnitTestCase {
.testWithDefaultConfigs(
name: "Package",
targets: [
.test("Target1", basePath: basePath, customSettings: ["OTHER_SWIFT_FLAGS": ["-enable-upcoming-feature Foo"]]),
.test(
"Target1",
basePath: basePath,
customSettings: ["OTHER_SWIFT_FLAGS": ["-enable-upcoming-feature \"Foo\""]]
),
]
)
)
Expand Down Expand Up @@ -2043,7 +2047,7 @@ final class PackageInfoMapperTests: TuistUnitTestCase {
.test(
"Target1",
basePath: basePath,
customSettings: ["OTHER_SWIFT_FLAGS": ["-enable-experimental-feature Foo"]]
customSettings: ["OTHER_SWIFT_FLAGS": ["-enable-experimental-feature \"Foo\""]]
),
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ final class SettingsMapperTests: XCTestCase {
.array([
"$(inherited)",
"ArbitraryFlag",
"-enable-upcoming-feature NewFeature",
"-enable-experimental-feature Experimental",
"-enable-upcoming-feature \"NewFeature\"",
"-enable-experimental-feature \"Experimental\"",
])
)
}
Expand Down
2 changes: 1 addition & 1 deletion Tuist/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ let config = Config(
url: "https://cloud.tuist.io",
options: [.optional]
),
swiftVersion: .init("5.9")
swiftVersion: .init("5.10")
)
20 changes: 10 additions & 10 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ workflows:
name: Lint
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
scripts:
- name: Set environment variables
script: |
Expand All @@ -26,7 +26,7 @@ workflows:
name: Build Documentation
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
scripts:
Expand All @@ -45,7 +45,7 @@ workflows:
name: Unit tests
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand All @@ -71,7 +71,7 @@ workflows:
name: Cache
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand Down Expand Up @@ -100,7 +100,7 @@ workflows:
name: Deploy Documentation
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
scripts:
Expand Down Expand Up @@ -131,7 +131,7 @@ workflows:
name: Tuist acceptance tests
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand Down Expand Up @@ -164,7 +164,7 @@ workflows:
name: Tuist automation acceptance tests
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand Down Expand Up @@ -195,7 +195,7 @@ workflows:
name: Tuist dependencies acceptance tests
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand Down Expand Up @@ -226,7 +226,7 @@ workflows:
name: Tuist generator acceptance tests
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand Down Expand Up @@ -257,7 +257,7 @@ workflows:
name: Tuist acceptance tests
max_build_duration: 60
environment:
xcode: 15.2
xcode: 15.3
groups:
- tuist
cache:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let package = Package(
],
dependencies: [
// Depend on the latest Swift 5.9 prerelease of SwiftSyntax
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-07-10-a"),
.package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.1"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
Expand Down
90 changes: 18 additions & 72 deletions fixtures/app_with_spm_dependencies/Tuist/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
"version" : "3.8.4"
}
},
{
"identity" : "collectionconcurrencykit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/JohnSundell/CollectionConcurrencyKit.git",
"state" : {
"revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95",
"version" : "0.2.0"
}
},
{
"identity" : "combine-schedulers",
"kind" : "remoteSourceControl",
Expand All @@ -54,15 +45,6 @@
"version" : "1.0.0"
}
},
{
"identity" : "cryptoswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "7892a123f7e8d0fe62f9f03728b17bbd4f94df5c",
"version" : "1.8.1"
}
},
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -189,15 +171,6 @@
"version" : "8.20.0"
}
},
{
"identity" : "sourcekitten",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/SourceKitten.git",
"state" : {
"revision" : "b6dc09ee51dfb0c66e042d2328c017483a1a5d56",
"version" : "0.34.1"
}
},
{
"identity" : "svprogresshud",
"kind" : "remoteSourceControl",
Expand All @@ -207,22 +180,13 @@
"version" : "2.3.1"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531",
"version" : "1.2.3"
}
},
{
"identity" : "swift-case-paths",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "551150d5e60e3be78972607d89cd69069cca3e7c",
"version" : "1.2.4"
"revision" : "e593aba2c6222daad7c4f2732a431eed2c09bb07",
"version" : "1.3.0"
}
},
{
Expand All @@ -248,8 +212,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-composable-architecture",
"state" : {
"revision" : "3568f01377c6c668aad40d066acf97ce670a1dad",
"version" : "1.5.6"
"revision" : "115fe5af41d333b6156d4924d7c7058bc77fd580",
"version" : "1.9.2"
}
},
{
Expand All @@ -275,8 +239,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "09e49dd46932adfe80ce672b4b3772d79ee6c21a",
"version" : "1.2.1"
"revision" : "d3a5af3038a09add4d7682f66555d6212058a3c0",
"version" : "1.2.2"
}
},
{
Expand Down Expand Up @@ -325,30 +289,30 @@
}
},
{
"identity" : "swift-syntax",
"identity" : "swift-perception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"location" : "https://github.com/pointfreeco/swift-perception",
"state" : {
"revision" : "6ad4ea24b01559dde0773e3d091f1b9e36175036",
"version" : "509.0.2"
"revision" : "83fc3d89676b33f1c3d49e9268e76ef62430339f",
"version" : "1.1.3"
}
},
{
"identity" : "swift-testing",
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-testing",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"revision" : "3ed2f90058afe4437369aee4880890e7fa65d1ec",
"version" : "0.5.1"
"revision" : "fa8f95c2d536d6620cc2f504ebe8a6167c9fc2dd",
"version" : "510.0.1"
}
},
{
"identity" : "swiftlint",
"identity" : "swift-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/SwiftLint",
"location" : "https://github.com/apple/swift-testing",
"state" : {
"revision" : "f17a4f9dfb6a6afb0408426354e4180daaf49cee",
"version" : "0.54.0"
"revision" : "8097dd8bcf7f2ed85f8aa8883635ce413012f53b",
"version" : "0.6.0"
}
},
{
Expand All @@ -360,24 +324,6 @@
"version" : "1.2.1"
}
},
{
"identity" : "swiftytexttable",
"kind" : "remoteSourceControl",
"location" : "https://github.com/scottrhoyt/SwiftyTextTable.git",
"state" : {
"revision" : "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3",
"version" : "0.9.0"
}
},
{
"identity" : "swxmlhash",
"kind" : "remoteSourceControl",
"location" : "https://github.com/drmohundro/SWXMLHash.git",
"state" : {
"revision" : "a853604c9e9a83ad9954c7e3d2a565273982471f",
"version" : "7.0.2"
}
},
{
"identity" : "uickeychainstore",
"kind" : "remoteSourceControl",
Expand Down
7 changes: 3 additions & 4 deletions fixtures/app_with_spm_dependencies/Tuist/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 5.10
import PackageDescription

#if TUIST
Expand All @@ -18,13 +18,12 @@ let package = Package(
name: "PackageName",
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire", exact: "5.8.0"),
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", .upToNextMinor(from: "1.5.0")),
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", .upToNextMinor(from: "1.9.2")),
.package(url: "https://github.com/ZipArchive/ZipArchive", .upToNextMajor(from: "2.5.5")),
.package(url: "https://github.com/jpsim/Yams", .upToNextMajor(from: "5.0.6")),
.package(url: "https://github.com/google/GoogleSignIn-iOS", .upToNextMajor(from: "7.0.0")),
.package(url: "https://github.com/getsentry/sentry-cocoa", .upToNextMajor(from: "8.20.0")),
.package(url: "https://github.com/realm/realm-swift", .upToNextMajor(from: "10.46.0")),
.package(url: "https://github.com/realm/SwiftLint", exact: "0.54.0"),
.package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack", .upToNextMajor(from: "3.8.4")),
.package(url: "https://github.com/facebook/zstd", exact: "1.5.5"),
.package(url: "https://github.com/microsoft/appcenter-sdk-apple", .upToNextMajor(from: "5.0.4")),
Expand All @@ -38,7 +37,7 @@ let package = Package(
// Has an umbrella header where moduleName must be sanitized
.package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.2.0"),
.package(url: "https://github.com/googleads/swift-package-manager-google-mobile-ads", from: "11.1.0"),
.package(url: "https://github.com/apple/swift-testing", .upToNextMajor(from: "0.5.1")),
.package(url: "https://github.com/apple/swift-testing", .upToNextMajor(from: "0.6.0")),
.package(path: "../LocalSwiftPackage"),
.package(path: "../StringifyMacro"),
.package(url: "https://github.com/kishikawakatsumi/UICKeyChainStore", exact: "2.2.1"),
Expand Down