Skip to content

Commit

Permalink
Fix build for non-macOS platforms (#29)
Browse files Browse the repository at this point in the history
* fix Task not available before iOS 13

* fix Task not available before watchOS 6

* bump watchOS target to match SwiftTreeSitter
  • Loading branch information
DivineDominion authored Nov 18, 2023
1 parent cc54c78 commit 1954bdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription

let package = Package(
name: "Neon",
platforms: [.macOS(.v10_13), .iOS(.v11), .tvOS(.v11), .watchOS(.v4)],
platforms: [.macOS(.v10_13), .iOS(.v11), .tvOS(.v11), .watchOS(.v5)],
products: [
.library(name: "Neon", targets: ["Neon"]),
],
Expand Down
6 changes: 3 additions & 3 deletions Sources/Neon/RangeStateValidator.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import Rearrange

@available(macOS 10.15, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public final class RangeStateValidator {
public enum ValidationResult: Sendable, Hashable {
case success(NSRange)
Expand Down Expand Up @@ -94,7 +94,7 @@ public final class RangeStateValidator {
}
}

@available(macOS 10.15, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension RangeStateValidator {
private var length: Int {
configuration.lengthProvider()
Expand Down Expand Up @@ -123,7 +123,7 @@ extension RangeStateValidator {
}
}

@available(macOS 10.15, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension RangeStateValidator {
/// Computes the next contiguous invalid range
private func nextNeededRange() -> NSRange? {
Expand Down

0 comments on commit 1954bdf

Please sign in to comment.