Skip to content

Commit

Permalink
feat: add support for more package manager versions, use correct feat…
Browse files Browse the repository at this point in the history
…ure flag
  • Loading branch information
ph1ps committed Aug 17, 2024
1 parent a64f204 commit 5eefd2a
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.10
// swift-tools-version: 5.9

import PackageDescription

Expand All @@ -14,15 +14,15 @@ let package = Package(
targets: [
.target(
name: "Deadline",
swiftSettings: [.enableUpcomingFeature("StrictConcurrency")]
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
),
.testTarget(
name: "DeadlineTests",
dependencies: [
"Deadline",
.product(name: "Clocks", package: "swift-clocks")
],
swiftSettings: [.enableUpcomingFeature("StrictConcurrency")]
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
),
]
)
26 changes: 26 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version: 5.8

import PackageDescription

let package = Package(
name: "swift-concurrency-deadline",
platforms: [.iOS(.v16), .macOS(.v13), .macCatalyst(.v16), .tvOS(.v16), .watchOS(.v9)],
products: [
.library(name: "Deadline", targets: ["Deadline"]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-clocks", from: "1.0.0")
],
targets: [
.target(
name: "Deadline"
),
.testTarget(
name: "DeadlineTests",
dependencies: [
"Deadline",
.product(name: "Clocks", package: "swift-clocks")
]
),
]
)
27 changes: 27 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// swift-tools-version: 6.0

import PackageDescription

let package = Package(
name: "swift-concurrency-deadline",
platforms: [.iOS(.v16), .macOS(.v13), .macCatalyst(.v16), .tvOS(.v16), .watchOS(.v9), .visionOS(.v1)],
products: [
.library(name: "Deadline", targets: ["Deadline"]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-clocks", from: "1.0.0")
],
targets: [
.target(
name: "Deadline",
),
.testTarget(
name: "DeadlineTests",
dependencies: [
"Deadline",
.product(name: "Clocks", package: "swift-clocks")
]
)
],
swiftLanguageModes: [.v6]
)
2 changes: 1 addition & 1 deletion Sources/Deadline/Deadline.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum DeadlineState<T> {
enum DeadlineState<T>: Sendable where T: Sendable {
case result(Result<T, any Error>)
case sleepWasCancelled
case deadlineExceeded
Expand Down

0 comments on commit 5eefd2a

Please sign in to comment.