From 715df55f896e5e0b7d21d13d4863b14d1dc44d2d Mon Sep 17 00:00:00 2001 From: bartszczepaniak Date: Wed, 13 Dec 2023 15:17:24 +0000 Subject: [PATCH 01/13] Update to support `Xcode 15.1` - Updating config files for CI to run with `Xcode 15.1`. - Removing no longer in use travis badge from `README`. --- .circleci/config.yml | 5 ++--- CHANGELOG.md | 6 ++++++ Flow.xcodeproj/project.pbxproj | 4 ++-- README.md | 3 +-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b55daa..31c0ae5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ anchors: - &clean_before_build true - &default_executor macos: - xcode: "15.0.0" + xcode: "15.1.0" env: global: @@ -177,7 +177,6 @@ workflows: - swiftlint: version: 0.49.1 - test-xcode14-ios16 - # Disable untill we fix test for Xcode 15 - # - test-xcode15-ios17 + - test-xcode15-ios17 - test-example-login diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e33231..1e29bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # 1.11.0 - Add Compose and SwiftUI bridging functions +# 1.10.4 +- Xcode 15.1 compatibility + +# 1.10.3 +- Xcode 14.0 compatibility + # 1.10.2 - Specify type of the library for `spm` builds as `dynamic` diff --git a/Flow.xcodeproj/project.pbxproj b/Flow.xcodeproj/project.pbxproj index 010d947..3de3d26 100644 --- a/Flow.xcodeproj/project.pbxproj +++ b/Flow.xcodeproj/project.pbxproj @@ -718,7 +718,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.10.3; + MARKETING_VERSION = 1.10.4; OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-function-bodies=300 -Xfrontend -warn-long-expression-type-checking=300"; PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Flow; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -746,7 +746,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.10.3; + MARKETING_VERSION = 1.10.4; OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-function-bodies=300 -Xfrontend -warn-long-expression-type-checking=300"; PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Flow; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/README.md b/README.md index 97c42ac..e1906c5 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -[![Build Status](https://travis-ci.org/iZettle/Flow.svg?branch=master)](https://travis-ci.org/iZettle/Flow) [![Platforms](https://img.shields.io/badge/platform-%20iOS%20|%20macOS%20|%20tvOS%20|%20linux-gray.svg)](https://img.shields.io/badge/platform-%20iOS%20|%20macOS%20|%20tvOS%20|%20linux-gray.svg) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) -![Xcode version](https://img.shields.io/badge/Xcode-13.2.0-green) +![Xcode version](https://img.shields.io/badge/Xcode-15.1.0-green) Modern applications often contain complex asynchronous flows and life cycles. Flow is a Swift library aiming to simplify building these by solving three main problems: From 233cbe0be9b2d63f26aae248f92bcb1c31e8fa10 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Dec 2023 13:01:45 +0100 Subject: [PATCH 02/13] Update ci architecture --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 31c0ae5..d30c4bc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ anchors: - &default_executor macos: xcode: "15.1.0" + resource_class: macos.m1.large.gen1 env: global: From 6acd4322de1a894f2feec5599385784b7e278419 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Dec 2023 15:43:46 +0100 Subject: [PATCH 03/13] Change swift version --- Flow.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.xcodeproj/project.pbxproj b/Flow.xcodeproj/project.pbxproj index 3de3d26..2c9b98d 100644 --- a/Flow.xcodeproj/project.pbxproj +++ b/Flow.xcodeproj/project.pbxproj @@ -726,7 +726,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Debug; @@ -754,7 +754,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Release; From f5da8de1eaec730e0d6f694de69342ddc5e8af5e Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Dec 2023 15:57:38 +0100 Subject: [PATCH 04/13] Change swift version --- Flow.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Flow.xcodeproj/project.pbxproj b/Flow.xcodeproj/project.pbxproj index 2c9b98d..e0a6758 100644 --- a/Flow.xcodeproj/project.pbxproj +++ b/Flow.xcodeproj/project.pbxproj @@ -638,7 +638,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; @@ -694,7 +694,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; @@ -726,7 +726,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Debug; @@ -754,7 +754,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Release; From 5396f75838ccad85574b5e13d199d9867dfcb7cc Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Dec 2023 16:12:37 +0100 Subject: [PATCH 05/13] Update swift to 4.2 --- Flow.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Flow.xcodeproj/project.pbxproj b/Flow.xcodeproj/project.pbxproj index e0a6758..ae6ecbb 100644 --- a/Flow.xcodeproj/project.pbxproj +++ b/Flow.xcodeproj/project.pbxproj @@ -638,7 +638,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; @@ -694,7 +694,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; @@ -726,7 +726,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Debug; @@ -754,7 +754,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Release; From bbe0c241db065570008d5f008d2778c7b71363c1 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 15 Dec 2023 10:43:01 +0100 Subject: [PATCH 06/13] Update package swift version --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index a25e46a..88b79cb 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:4.2 import PackageDescription From d63b1b064891d49c8a711338a0151b43cad7b7f0 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 18 Dec 2023 15:19:22 +0100 Subject: [PATCH 07/13] Change data samle for testThrottle --- FlowTests/SignalProviderTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowTests/SignalProviderTests.swift b/FlowTests/SignalProviderTests.swift index 06071c3..8696103 100644 --- a/FlowTests/SignalProviderTests.swift +++ b/FlowTests/SignalProviderTests.swift @@ -2635,7 +2635,7 @@ class SignalProviderStressTests: XCTestCase { let signals: [(TimeInterval, Int)] = [ (0.1, 3), - (0.15, 4), + (0.2, 4), (0.3, 5), (0.5, 6), (0.55, 7), From 1b5d56f9b1d02a07f88e3527626f35d320d9eb62 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Dec 2023 14:01:50 +0100 Subject: [PATCH 08/13] Increase timeout --- FlowTests/SignalProviderTests.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/FlowTests/SignalProviderTests.swift b/FlowTests/SignalProviderTests.swift index 8696103..9474178 100644 --- a/FlowTests/SignalProviderTests.swift +++ b/FlowTests/SignalProviderTests.swift @@ -2627,20 +2627,20 @@ class SignalProviderStressTests: XCTestCase { let signal = ReadWriteSignal(1) var result = [Int]() - bag += signal.throttle(0.2).onValue { + bag += signal.throttle(2).onValue { result.append($0) } signal.value = 2 let signals: [(TimeInterval, Int)] = [ - (0.1, 3), - (0.2, 4), - (0.3, 5), - (0.5, 6), - (0.55, 7), - (0.9, 8), - (0.95, 9), + (1, 3), + (1.5, 4), + (3, 5), + (5, 6), + (5.5, 7), + (9.0, 8), + (9.5, 9), ] for (time, value) in signals { @@ -2650,7 +2650,7 @@ class SignalProviderStressTests: XCTestCase { } let e = expectation(description: "done") - Scheduler.main.async(after: 1.5) { + Scheduler.main.async(after: 15) { e.fulfill() XCTAssertEqual(result, [2, 4, 5, 7, 8, 9]) } From d1a93c352b1ff95c0598b07cff620a861aa1e7f9 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Dec 2023 14:00:59 +0100 Subject: [PATCH 09/13] Fix timeout --- FlowTests/SignalProviderTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowTests/SignalProviderTests.swift b/FlowTests/SignalProviderTests.swift index 9474178..7857258 100644 --- a/FlowTests/SignalProviderTests.swift +++ b/FlowTests/SignalProviderTests.swift @@ -2623,7 +2623,7 @@ class SignalProviderStressTests: XCTestCase { #endif func testThrottle() { - runTest(timeout: 2) { bag in + runTest(timeout: 20) { bag in let signal = ReadWriteSignal(1) var result = [Int]() From c0316add36678848980875d14648d8fabb76e99a Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Dec 2023 14:13:53 +0100 Subject: [PATCH 10/13] Change debounce test data --- FlowTests/SignalProviderTests.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/FlowTests/SignalProviderTests.swift b/FlowTests/SignalProviderTests.swift index 7857258..e2761c6 100644 --- a/FlowTests/SignalProviderTests.swift +++ b/FlowTests/SignalProviderTests.swift @@ -2530,23 +2530,23 @@ class SignalProviderStressTests: XCTestCase { } func testDebounce() { - runTest(timeout: 2) { bag in + runTest(timeout: 20) { bag in let signal = ReadWriteSignal(1) var result = [Int]() - bag += signal.debounce(0.2).atOnce().onValue { + bag += signal.debounce(2).atOnce().onValue { result.append($0) } signal.value = 2 let signals: [(TimeInterval, Int)] = [ - (0.1, 3), - (0.2, 4), - (0.5, 5), - (0.6, 6), - (0.7, 7), - (1.0, 8), + (1, 3), + (2, 4), + (5, 5), + (6, 6), + (7, 7), + (10, 8), ] for (time, value) in signals { @@ -2556,7 +2556,7 @@ class SignalProviderStressTests: XCTestCase { } let e = expectation(description: "done") - Scheduler.main.async(after: 1.5) { + Scheduler.main.async(after: 15) { e.fulfill() XCTAssertEqual(result, [1, 4, 7, 8]) } From 34955ebf0d956f9e55c90ef9528cd6dda065c5ce Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Dec 2023 15:44:19 +0100 Subject: [PATCH 11/13] Update swift version to 5.0 --- Flow.xcodeproj/project.pbxproj | 8 ++++---- Package.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Flow.xcodeproj/project.pbxproj b/Flow.xcodeproj/project.pbxproj index ae6ecbb..e0a6758 100644 --- a/Flow.xcodeproj/project.pbxproj +++ b/Flow.xcodeproj/project.pbxproj @@ -638,7 +638,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; @@ -694,7 +694,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; @@ -726,7 +726,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Debug; @@ -754,7 +754,7 @@ SDKROOT = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3"; }; name = Release; diff --git a/Package.swift b/Package.swift index 88b79cb..a25e46a 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.2 +// swift-tools-version:5.0 import PackageDescription From bcff672e982746310e3421124919bbcc1c6e3af9 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Dec 2023 16:00:38 +0100 Subject: [PATCH 12/13] Change marketing version --- Flow.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.xcodeproj/project.pbxproj b/Flow.xcodeproj/project.pbxproj index e0a6758..f886883 100644 --- a/Flow.xcodeproj/project.pbxproj +++ b/Flow.xcodeproj/project.pbxproj @@ -718,7 +718,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.10.4; + MARKETING_VERSION = 1.11.1; OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-function-bodies=300 -Xfrontend -warn-long-expression-type-checking=300"; PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Flow; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -746,7 +746,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 1.10.4; + MARKETING_VERSION = 1.11.1; OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-function-bodies=300 -Xfrontend -warn-long-expression-type-checking=300"; PRODUCT_BUNDLE_IDENTIFIER = com.iZettle.Flow; PRODUCT_NAME = "$(TARGET_NAME)"; From b10217729631509b09f28556b24e0cff69a5b810 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Dec 2023 16:01:45 +0100 Subject: [PATCH 13/13] Update Changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e29bcb..9c38504 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ +# 1.11.1 +- Xcode 15.1 compatibility + # 1.11.0 - Add Compose and SwiftUI bridging functions -# 1.10.4 -- Xcode 15.1 compatibility - # 1.10.3 - Xcode 14.0 compatibility