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

[#144] Updated Minimum Swift Version to 5.9 #153

Merged
merged 4 commits into from
May 17, 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
5 changes: 1 addition & 4 deletions .github/workflows/Common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,14 @@ jobs:
runs-on: ${{ matrix.OS }}
strategy:
matrix:
SWIFT_VERSION: ["5.10", "5.9", "5.8"]
SWIFT_VERSION: ["5.10", "5.9"]
include:
- SWIFT_VERSION: "5.10"
OS: macos-14
XCODE_APP_NAME: "Xcode_15.3"
- SWIFT_VERSION: "5.9"
OS: macos-13
XCODE_APP_NAME: "Xcode_15.2"
- SWIFT_VERSION: "5.8"
OS: macos-13
XCODE_APP_NAME: "Xcode_14.3.1"
steps:
- uses: actions/checkout@v4
- name: Select Xcode Version
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.8
// swift-tools-version: 5.9

import PackageDescription

Expand Down
21 changes: 7 additions & 14 deletions Tests/YMFFTests/Cases/FeatureFlagValueTransformerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,16 @@ final class FeatureFlagValueTransformerTests: XCTestCase {
func test_valueFromRawValue_enumFromInt() {
let transformer = FeatureFlagValueTransformer { (age: Int) -> AgeGroup in
switch age {
case ..<13:
return .under13
case 13...17:
return .between13And17
case 18...:
return .over17
default:
return .under13
case ..<13: .under13
case 13...17: .between13And17
case 18...: .over17
default: .under13
}
} rawValueFromValue: { group in
switch group {
case .under13:
return 13
case .between13And17:
return 17
case .over17:
return 18
case .under13: 13
case .between13And17: 17
case .over17: 18
}
}

Expand Down
8 changes: 4 additions & 4 deletions Tests/YMFFTests/Utilities/FeatureFlagStoreMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ extension FeatureFlagStoreMock: FeatureFlagStore {
func value<Value>(for key: FeatureFlagKey) async -> Result<Value, FeatureFlagStoreError> {
value_invocationCount += 1
value_keys.append(key)
switch value_result! {
return switch value_result! {
case .success(let anyValue):
if let value = anyValue as? Value {
return .success(value)
.success(value)
} else {
return .failure(.typeMismatch)
.failure(.typeMismatch)
}
case .failure(let error): return .failure(error)
case .failure(let error): .failure(error)
}
}

Expand Down
8 changes: 4 additions & 4 deletions Tests/YMFFTests/Utilities/MutableFeatureFlagStoreMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ extension MutableFeatureFlagStoreMock: MutableFeatureFlagStore {
func value<Value>(for key: FeatureFlagKey) async -> Result<Value, FeatureFlagStoreError> {
value_invocationCount += 1
value_keys.append(key)
switch value_result! {
return switch value_result! {
case .success(let anyValue):
if let value = anyValue as? Value {
return .success(value)
.success(value)
} else {
return .failure(.typeMismatch)
.failure(.typeMismatch)
}
case .failure(let error): return .failure(error)
case .failure(let error): .failure(error)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ extension SynchronousFeatureFlagStoreMock: SynchronousFeatureFlagStore {
func valueSync<Value>(for key: FeatureFlagKey) -> Result<Value, FeatureFlagStoreError> {
valueSync_invocationCount += 1
valueSync_keys.append(key)
switch valueSync_result! {
return switch valueSync_result! {
case .success(let anyValue):
if let value = anyValue as? Value {
return .success(value)
.success(value)
} else {
return .failure(.typeMismatch)
.failure(.typeMismatch)
}
case .failure(let error): return .failure(error)
case .failure(let error): .failure(error)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ extension SynchronousMutableFeatureFlagStoreMock: SynchronousMutableFeatureFlagS
func valueSync<Value>(for key: FeatureFlagKey) -> Result<Value, FeatureFlagStoreError> {
valueSync_invocationCount += 1
valueSync_keys.append(key)
switch valueSync_result! {
return switch valueSync_result! {
case .success(let anyValue):
if let value = anyValue as? Value {
return .success(value)
.success(value)
} else {
return .failure(.typeMismatch)
.failure(.typeMismatch)
}
case .failure(let error): return .failure(error)
case .failure(let error): .failure(error)
}
}

Expand Down
2 changes: 1 addition & 1 deletion YMFF.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pod::Spec.new do |s|

s.name = "YMFF"
s.version = "4.0.0"
s.swift_version = "5.8"
s.swift_version = "5.9"
s.authors = { "Yakov Manshin" => "git@yakovmanshin.com" }
s.license = { :type => "Apache License, version 2.0", :file => "LICENSE" }
s.homepage = "https://github.com/yakovmanshin/YMFF"
Expand Down
Loading