Skip to content
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
15 changes: 12 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:6.1
// swift-tools-version: 6.4

import CompilerPluginSupport
import PackageDescription
Expand Down Expand Up @@ -43,11 +43,11 @@ let package = Package(
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.2"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.4.0"),
.package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.1.0"),
.package(url: "https://github.com/pointfreeco/swift-issue-reporting", from: "2.1.0"),
.package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.2.0"),
.package(url: "https://github.com/pointfreeco/swift-navigation", from: "2.7.0"),
.package(url: "https://github.com/pointfreeco/swift-perception", "1.3.4"..<"3.0.0"),
.package(url: "https://github.com/pointfreeco/swift-sharing", "1.0.0"..<"3.0.0"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.3.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"605.0.0"),
],
Expand All @@ -64,7 +64,7 @@ let package = Package(
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "DependenciesMacros", package: "swift-dependencies"),
.product(name: "IdentifiedCollections", package: "swift-identified-collections"),
.product(name: "IssueReporting", package: "xctest-dynamic-overlay"),
.product(name: "IssueReporting", package: "swift-issue-reporting"),
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "Perception", package: "swift-perception"),
.product(name: "Sharing", package: "swift-sharing"),
Expand All @@ -79,7 +79,7 @@ let package = Package(
name: "ComposableArchitectureTests",
dependencies: [
"ComposableArchitecture",
.product(name: "IssueReportingTestSupport", package: "xctest-dynamic-overlay"),
.product(name: "IssueReportingTestSupport", package: "swift-issue-reporting"),
]
),
.macro(
Expand Down
116 changes: 116 additions & 0 deletions Package@swift-6.1.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// swift-tools-version:6.1

import CompilerPluginSupport
import PackageDescription

let package = Package(
name: "swift-composable-architecture",
platforms: [
.iOS(.v16),
.macOS(.v13),
.tvOS(.v16),
.watchOS(.v9),
],
products: [
.library(
name: "ComposableArchitecture",
targets: ["ComposableArchitecture"]
)
],
traits: [
.trait(
name: "ComposableArchitecture2Deprecations",
description: """
Prepare for the next major release by enabling some of the more viral deprecations. Enable \
this trait to remain ready for Composable Architecture 2.0.
"""
),
.trait(
name: "ComposableArchitecture2DeprecationOverloads",
description: """
Prepare for the next major release by enabling some of the more viral deprecations. These \
deprecations rely on overloads that can tax the compiler and prevent existing applications \
from compiling. Temporarily enable this trait to perform these specific migrations.
"""
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-collections", from: "1.1.0"),
.package(url: "https://github.com/pointfreeco/combine-schedulers", from: "1.0.2"),
.package(url: "https://github.com/pointfreeco/swift-case-paths", from: "1.5.4"),
.package(url: "https://github.com/pointfreeco/swift-clocks", from: "1.0.4"),
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.2.0"),
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.2"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.4.0"),
.package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.1.0"),
.package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.2.0"),
.package(url: "https://github.com/pointfreeco/swift-navigation", from: "2.7.0"),
.package(url: "https://github.com/pointfreeco/swift-perception", "1.3.4"..<"3.0.0"),
.package(url: "https://github.com/pointfreeco/swift-sharing", "1.0.0"..<"3.0.0"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.13.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"605.0.0"),
],
targets: [
.target(
name: "ComposableArchitecture",
dependencies: [
"ComposableArchitectureMacros",
.product(name: "CasePaths", package: "swift-case-paths"),
.product(name: "Clocks", package: "swift-clocks"),
.product(name: "CombineSchedulers", package: "combine-schedulers"),
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
.product(name: "CustomDump", package: "swift-custom-dump"),
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "DependenciesMacros", package: "swift-dependencies"),
.product(name: "IdentifiedCollections", package: "swift-identified-collections"),
.product(name: "IssueReporting", package: "xctest-dynamic-overlay"),
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "Perception", package: "swift-perception"),
.product(name: "Sharing", package: "swift-sharing"),
.product(name: "SwiftUINavigation", package: "swift-navigation"),
.product(name: "UIKitNavigation", package: "swift-navigation"),
],
resources: [
.process("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "ComposableArchitectureTests",
dependencies: [
"ComposableArchitecture",
.product(name: "IssueReportingTestSupport", package: "xctest-dynamic-overlay"),
]
),
.macro(
name: "ComposableArchitectureMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
]
),
.testTarget(
name: "ComposableArchitectureMacrosTests",
dependencies: [
"ComposableArchitectureMacros",
.product(name: "MacroTesting", package: "swift-macro-testing"),
]
),
],
swiftLanguageModes: [.v6]
)

for target in package.targets {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings?.append(contentsOf: [
.enableUpcomingFeature("ExistentialAny")
])
}

for target in package.targets where target.type == .system || target.type == .test {
target.swiftSettings?.append(contentsOf: [
.swiftLanguageMode(.v5),
.enableExperimentalFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])
}
15 changes: 8 additions & 7 deletions Tests/ComposableArchitectureTests/RuntimeWarningTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@

XCTExpectFailure {
store.scope(\.path, action: \.path)[
fileID: "file.swift",
filePath: "/file.swift",
fileID: "Unknown/file.swift",
filePath: "/Unknown/file.swift",
line: 1,
column: 1
] = .init()
} issueMatcher: {
$0.compactDescription.hasSuffix(
"""
A navigation stack binding at "file.swift:1" was written to with a path that has the \
same number of elements that already exist in the store. A view should only write to \
A navigation stack binding at "Unknown/file.swift:1" was written to with a path that has \
the same number of elements that already exist in the store. A view should only write to \
this binding with a path that has pushed a new element onto the stack, or popped one or \
more elements from the stack.

Expand Down Expand Up @@ -172,15 +172,16 @@
state: \.destination,
action: \.destination,
isInViewBody: false,
fileID: "file.swift",
filePath: "/file.swift",
fileID: "Unknown/file.swift",
filePath: "/Unknown/file.swift",
line: 1,
column: 1
] = nil
} issueMatcher: {
$0.compactDescription.hasSuffix(
"""
A binding at "file.swift:1" was set to "nil", but the store destination wasn't nil'd out.
A binding at "Unknown/file.swift:1" was set to "nil", but the store destination wasn't \
nil'd out.

This usually means an "ifLet" has not been integrated with the reducer powering the \
store, and this reducer is responsible for handling presentation actions.
Expand Down
Loading