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

Enable upcoming features #8

Merged
merged 3 commits into from
Jun 12, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
xcode: ['14.2']
xcode: ['15.4']
config: ['debug', 'release']
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Xcode Select
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
run: sudo xcode-select -s /Applications/Xcode_15.4.0.app
- name: Tap
run: brew tap pointfreeco/formulae
- name: Install
Expand Down
18 changes: 17 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
// swift-tools-version:5.0
// swift-tools-version: 5.10

import PackageDescription

let debugSwiftSettings: [PackageDescription.SwiftSetting] = [
.enableUpcomingFeature("ConciseMagicFile", .when(configuration: .debug)), // SE-0274
.enableUpcomingFeature("ForwardTrailingClosures", .when(configuration: .debug)), // SE-0286
.enableUpcomingFeature("ExistentialAny", .when(configuration: .debug)), // SE-0335
.enableUpcomingFeature("BareSlashRegexLiterals", .when(configuration: .debug)), // SE-0354
.enableUpcomingFeature("DeprecateApplicationMain", .when(configuration: .debug)), // SE-0383
.enableUpcomingFeature("ImportObjcForwardDeclarations", .when(configuration: .debug)), // SE-0384
.enableUpcomingFeature("DisableOutwardActorInference", .when(configuration: .debug)), // SE-0401
.enableUpcomingFeature("IsolatedDefaultValues", .when(configuration: .debug)), // SE-0411
.enableUpcomingFeature("GlobalConcurrency", .when(configuration: .debug)), // SE-0412
]

let package = Package(
name: "ForcibleValue",
products: [
Expand All @@ -20,3 +32,7 @@ let package = Package(
],
swiftLanguageVersions: [.v5]
)

for target in package.targets {
target.swiftSettings = debugSwiftSettings
}
2 changes: 1 addition & 1 deletion Sources/ForcibleValue/Default/ForcibleDefault.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension ForcibleDefault {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
self.wrappedValue = try T.DefaultValue.init(from: decoder).wrappedValue
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/ForcibleValue/ForcibleBool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct ForcibleBool: ForcibleValue {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
let container = try decoder.singleValueContainer()

if let bool = try? container.decode(Bool.self) {
Expand Down Expand Up @@ -71,7 +71,7 @@ extension ForcibleBool {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
self.wrappedValue = try ForcibleBool(from: decoder).wrappedValue
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/ForcibleValue/ForcibleNumber.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct ForcibleNumber<T: ForcibleNumberSource>: ForcibleValue {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
let container = try decoder.singleValueContainer()

if let value = try? container.decode(T.self) {
Expand Down Expand Up @@ -60,7 +60,7 @@ extension ForcibleNumber {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
self.wrappedValue = try ForcibleNumber(from: decoder).wrappedValue
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/ForcibleValue/ForcibleString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct ForcibleString: ForcibleValue {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
let container = try decoder.singleValueContainer()

if let string = try? container.decode(String.self) {
Expand Down Expand Up @@ -49,7 +49,7 @@ extension ForcibleString {
self.wrappedValue = wrappedValue
}

public init(from decoder: Decoder) throws {
public init(from decoder: any Decoder) throws {
self.wrappedValue = try ForcibleString(from: decoder).wrappedValue
}
}
Expand Down
Loading