diff --git a/Package.resolved b/Package.resolved index 5225cb5..bf14856 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,114 +1,123 @@ { - "originHash" : "62d09cddc4ab84131cb5e2cef0a442b1197e705e7023b538a05462a3e113a8f4", - "pins" : [ + "originHash": "aa8bf4913549d8243ca09d1b54c3e8f35f1e2da825e9f455e170f1887093dad8", + "pins": [ { - "identity" : "combine-schedulers", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/combine-schedulers", - "state" : { - "revision" : "dcccb979a2183b8df3334237e3dc1ae2b4116a86", - "version" : "1.2.0" + "identity": "combine-schedulers", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/combine-schedulers", + "state": { + "revision": "dcccb979a2183b8df3334237e3dc1ae2b4116a86", + "version": "1.2.0" } }, { - "identity" : "swift-clocks", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-clocks", - "state" : { - "revision" : "72d749bf341b78851203066ab421869b783ec42a", - "version" : "1.1.0" + "identity": "swift-clocks", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-clocks", + "state": { + "revision": "72d749bf341b78851203066ab421869b783ec42a", + "version": "1.1.0" } }, { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections", - "state" : { - "revision" : "a0cb0954ecb21e4e31b0070e6ed5674e8556685a", - "version" : "1.6.0" + "identity": "swift-collections", + "kind": "remoteSourceControl", + "location": "https://github.com/apple/swift-collections", + "state": { + "revision": "a0cb0954ecb21e4e31b0070e6ed5674e8556685a", + "version": "1.6.0" } }, { - "identity" : "swift-concurrency-extras", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-concurrency-extras", - "state" : { - "revision" : "a90e2e40a7a840a853dd29e57cbef5dbb72c9d5b", - "version" : "1.4.0" + "identity": "swift-concurrency-extras", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-concurrency-extras", + "state": { + "revision": "a90e2e40a7a840a853dd29e57cbef5dbb72c9d5b", + "version": "1.4.0" } }, { - "identity" : "swift-custom-dump", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-custom-dump", - "state" : { - "revision" : "b9b59eb58c946236d6f16305c576ad194c36444e", - "version" : "1.6.0" + "identity": "swift-custom-dump", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-custom-dump", + "state": { + "revision": "b9b59eb58c946236d6f16305c576ad194c36444e", + "version": "1.6.0" } }, { - "identity" : "swift-dependencies", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-dependencies", - "state" : { - "revision" : "f80552807ec92f72fe3fe4543d71879182b0bfd5", - "version" : "1.13.0" + "identity": "swift-dependencies", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-dependencies", + "state": { + "revision": "f80552807ec92f72fe3fe4543d71879182b0bfd5", + "version": "1.13.0" } }, { - "identity" : "swift-docc-plugin", - "kind" : "remoteSourceControl", - "location" : "https://github.com/swiftlang/swift-docc-plugin", - "state" : { - "revision" : "647c708be89f834fa6a6d4945442793a77ddf5b6", - "version" : "1.5.0" + "identity": "swift-docc-plugin", + "kind": "remoteSourceControl", + "location": "https://github.com/swiftlang/swift-docc-plugin", + "state": { + "revision": "647c708be89f834fa6a6d4945442793a77ddf5b6", + "version": "1.5.0" } }, { - "identity" : "swift-docc-symbolkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/swiftlang/swift-docc-symbolkit", - "state" : { - "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", - "version" : "1.0.0" + "identity": "swift-docc-symbolkit", + "kind": "remoteSourceControl", + "location": "https://github.com/swiftlang/swift-docc-symbolkit", + "state": { + "revision": "b45d1f2ed151d057b54504d653e0da5552844e34", + "version": "1.0.0" } }, { - "identity" : "swift-identified-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-identified-collections", - "state" : { - "revision" : "322d9ffeeba85c9f7c4984b39422ec7cc3c56597", - "version" : "1.1.1" + "identity": "swift-identified-collections", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-identified-collections", + "state": { + "revision": "322d9ffeeba85c9f7c4984b39422ec7cc3c56597", + "version": "1.1.1" } }, { - "identity" : "swift-perception", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-perception", - "state" : { - "revision" : "25ac73741c3436605d61eceb5207e896973918e7", - "version" : "2.0.10" + "identity": "swift-issue-reporting", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-issue-reporting", + "state": { + "revision": "71c7c9a761d1ca6ed4ccb6ced040fe1c1a39e8e7", + "version": "2.1.0" } }, { - "identity" : "swift-syntax", - "kind" : "remoteSourceControl", - "location" : "https://github.com/swiftlang/swift-syntax", - "state" : { - "revision" : "4799286537280063c85a32f09884cfbca301b1a1", - "version" : "602.0.0" + "identity": "swift-perception", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/swift-perception", + "state": { + "revision": "25ac73741c3436605d61eceb5207e896973918e7", + "version": "2.0.10" } }, { - "identity" : "xctest-dynamic-overlay", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", - "state" : { - "revision" : "cb281f343fd953280336dcbd3822cdf47c182f5b", - "version" : "1.10.0" + "identity": "swift-syntax", + "kind": "remoteSourceControl", + "location": "https://github.com/swiftlang/swift-syntax", + "state": { + "revision": "4799286537280063c85a32f09884cfbca301b1a1", + "version": "602.0.0" + } + }, + { + "identity": "xctest-dynamic-overlay", + "kind": "remoteSourceControl", + "location": "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state": { + "revision": "7bbd97af585672a3dcdf6575ad37b339ad41b579", + "version": "1.13.0" } } ], - "version" : 3 + "version": 3 } diff --git a/Package.swift b/Package.swift index c2b8cc7..b79a52e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.1 +// swift-tools-version: 6.4 import Foundation import PackageDescription @@ -6,10 +6,10 @@ import PackageDescription let package = Package( name: "swift-sharing", platforms: [ - .iOS(.v13), - .macOS(.v10_15), - .tvOS(.v13), - .watchOS(.v6), + .iOS(.v15), + .macOS(.v12), + .tvOS(.v15), + .watchOS(.v9), ], products: [ .library( @@ -38,8 +38,8 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.1"), .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/swift-issue-reporting", from: "2.1.0"), .package(url: "https://github.com/pointfreeco/swift-perception", "1.4.1"..<"3.0.0"), - .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.4.3"), .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"), ], targets: [ @@ -71,7 +71,7 @@ let package = Package( traits: ["IdentifiedCollections"] ) ), - .product(name: "IssueReporting", package: "xctest-dynamic-overlay"), + .product(name: "IssueReporting", package: "swift-issue-reporting"), .product(name: "PerceptionCore", package: "swift-perception"), ], resources: [ diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index e8139b5..9e2443f 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -22,7 +22,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.1"), .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swift-perception", "1.4.1"..<"3.0.0"), - .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.4.3"), + .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"), ], targets: [ diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift index a2c79b0..ccadc61 100644 --- a/Package@swift-6.0.swift +++ b/Package@swift-6.0.swift @@ -23,7 +23,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.1"), .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swift-perception", "1.4.1"..<"3.0.0"), - .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.4.3"), + .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"), ], targets: [ diff --git a/Package@swift-6.1.swift b/Package@swift-6.1.swift new file mode 100644 index 0000000..949739f --- /dev/null +++ b/Package@swift-6.1.swift @@ -0,0 +1,134 @@ +// swift-tools-version: 6.1 + +import Foundation +import PackageDescription + +let package = Package( + name: "swift-sharing", + platforms: [ + .iOS(.v13), + .macOS(.v10_15), + .tvOS(.v13), + .watchOS(.v6), + ], + products: [ + .library( + name: "Sharing", + targets: ["Sharing"] + ) + ], + traits: [ + .trait( + name: "CasePaths", + description: "Derive Shared cases from Shared enums using CasePaths" + ), + .trait( + name: "CustomDump", + description: "Pretty-print and diff Sharing's data types using CustomDump" + ), + .trait( + name: "IdentifiedCollections", + description: "Derive Shared elements from Shared collections using IdentifiedCollections" + ), + ], + dependencies: [ + .package(url: "https://github.com/pointfreeco/combine-schedulers", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/swift-case-paths", from: "1.7.3"), + .package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.3.0"), + .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.1"), + .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/swift-perception", "1.4.1"..<"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"), + ], + targets: [ + .target( + name: "Sharing", + dependencies: [ + "Sharing1", + "Sharing2", + .product( + name: "CasePaths", + package: "swift-case-paths", + condition: .when( + traits: ["CasePaths"] + ) + ), + .product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"), + .product( + name: "CustomDump", + package: "swift-custom-dump", + condition: .when( + traits: ["CustomDump"] + ) + ), + .product(name: "Dependencies", package: "swift-dependencies"), + .product( + name: "IdentifiedCollections", + package: "swift-identified-collections", + condition: .when( + traits: ["IdentifiedCollections"] + ) + ), + .product(name: "IssueReporting", package: "xctest-dynamic-overlay"), + .product(name: "PerceptionCore", package: "swift-perception"), + ], + resources: [ + .process("PrivacyInfo.xcprivacy") + ] + ), + .testTarget( + name: "SharingTests", + dependencies: [ + "Sharing", + .product( + name: "CasePaths", + package: "swift-case-paths", + condition: .when( + traits: ["CasePaths"] + ) + ), + .product(name: "CombineSchedulers", package: "combine-schedulers"), + .product(name: "CustomDump", package: "swift-custom-dump"), + .product(name: "DependenciesTestSupport", package: "swift-dependencies"), + ], + exclude: ["Sharing.xctestplan"] + ), + .target( + name: "Sharing1", + path: "Sources/VersionMarkerModules/Sharing1" + ), + .target( + name: "Sharing2", + path: "Sources/VersionMarkerModules/Sharing2" + ), + ], + swiftLanguageModes: [.v6] +) + +let enableAllTraits = ProcessInfo.processInfo.environment["SPI_GENERATE_DOCS"] != nil +package.traits.insert( + .default( + enabledTraits: Set( + enableAllTraits + ? package.traits.map(\.name) + : [ + "CustomDump", + "IdentifiedCollections", + ] + ) + ) +) + +for target in package.targets { + target.swiftSettings = target.swiftSettings ?? [] + target.swiftSettings?.append(contentsOf: [ + .enableUpcomingFeature("ExistentialAny"), + .enableUpcomingFeature("ImmutableWeakCaptures"), + .enableUpcomingFeature("InferIsolatedConformances"), + .enableUpcomingFeature("InternalImportsByDefault"), + .enableUpcomingFeature("MemberImportVisibility"), + .enableUpcomingFeature("NonisolatedNonsendingByDefault"), + ]) +}