profile
viewpoint
Michael Brown mluisbrown XM.com Lisbon, Portugal http://michael-brown.net/ iOS Engineer 📱 Functional programming FRP

mluisbrown/iCloudCoreDataStack 129

A persistence stack for using Core Data with iCloud Sync in iOS7

mluisbrown/LCZoomTransition 92

A UIViewController custom animated and interactive transition that uses a delightful zoom animation.

mluisbrown/Memories 43

An iOS app that displays photos from your photo library taken on a particular day in history.

mluisbrown/iCalendar 13

A minimal iCalendar (RFC 5545) parser in Swift

mluisbrown/BabylonHealthDemo 1

Demo project for Babylon Health

mluisbrown/BVReorderTableView 1

Easy Long Press Reordering for UITableView

mluisbrown/camstudio-mousedown-highlight 0

Modify CamStudio so that the cursor highlight is only displayed when the mouse button is pressed

mluisbrown/Cartography 0

A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:

mluisbrown/CombineFeedback 0

Unidirectional reactive architecture using new Apple Combine framework https://developer.apple.com/documentation/combine

mluisbrown/DACircularProgress 0

DACircularProgress is a UIView subclass with circular UIProgressView properties.

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha da2a965b1f6bf44c7a25ebef13df68c9d4b522af

Update README to reflect support for Linux.

view details

push time in 18 hours

created tagtrading-point/reactiveswift-composable-architecture

tag0.8.1

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.

created time in 18 hours

starteddandavison/delta

started time in 5 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha a5595df604b0ae5c5f189ee2e2728b882e99478e

Remove unused debugging code and tests. (#30)

view details

push time in 7 days

delete branch trading-point/reactiveswift-composable-architecture

delete branch : michael/remove-unused-debug-code

delete time in 7 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 59af2ea81712fdf1cdb1c50c37e1d69fbcf440a4

Remove unused debugging code and tests.

view details

push time in 7 days

push eventmluisbrown/swift-composable-architecture

Michael Brown

commit sha d06e4302a4729d48b4767b7b13cb1644fd0736dd

Don't depend on Equatable conformance of DispatchQueue (#311)

view details

Brandon Williams

commit sha 584a1384e4ec85ca1e9993dc1d0520bec3f97b08

Remove some CustomDebugOutputConvertible conformances. (#312) * Remove some CustomDebugOutputConvertible conformances. * fix tests

view details

Michael Brown

commit sha c9a4c9d1a2b071b7c310e26a6b031f1967329dd8

Merge remote-tracking branch 'upstream/main' into main

view details

push time in 7 days

pull request commenttrading-point/reactiveswift-composable-architecture

feat(Produced): KeyPathContainer pattern implementation

No problem @maximkrouk 👍

maximkrouk

comment created time in 8 days

delete branch mluisbrown/swift-composable-architecture

delete branch : michael/dispatch-queue-equatable

delete time in 9 days

PR opened pointfreeco/swift-composable-architecture

Don't depend on DispatchQueue's Equatable conformance

Among the changes I had to make in order to get the ReactiveSwift fork building for Linux was not depending on the Equatable conformance of DispatchQueue, and I realised that it probably isn't necessary at all.

Equatable conformance allows the switch self and the matching on .main, however, in Linux DispatchQueue does not conform to Equatable, so this doesn't work.

Since for the other queues we are doing name matching we could do the same for .main whose name is always "com.apple.main-thread"

+4 -4

0 comment

1 changed file

pr created time in 9 days

push eventmluisbrown/swift-composable-architecture

Jeffrey Macko

commit sha 767e1d9553fcee5a95af10e0352f20fb03b98352

Update ci.yml (#308)

view details

Michael Brown

commit sha 45ad4ec4d6efbd2fec90072fbc4586d08db809d3

Merge remote-tracking branch 'upstream/main' into main

view details

push time in 9 days

push eventtrading-point/reactiveswift-composable-architecture

Andrei Vidrasco

commit sha 6b0a4ceeae9331f952619b2ea652fd5165760ced

Add Identifiable copy for Linux (#29) * Add Identifiable copy for Linux * Add Tests for Identifiable * Apply changes after PR review * Comment indetifiable protocol * Remove Identifiable.swift

view details

push time in 9 days

PR merged trading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

Hi, @mluisbrown

Nice job with your last PR. However one thing I noticed is that you guarded out Identified and IdentifiedArray. The obvious reason is that Identifiable is not available on non-Apple platforms. However if we add copy of it(guarding for linux/android), it compiles for Android on my machine.

What do you think, does it make sense to add it, to make use of IdentifiedArray?

+376 -380

7 comments

4 changed files

AndreiVidrasco

pr closed time in 9 days

PullRequestReviewEvent

pull request commenttrading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

Ok cool. It looks like all the uses of Identifiable were already guarded with @available anyway 👍

AndreiVidrasco

comment created time in 9 days

pull request commenttrading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

Thinking about this a bit more, I don't think we should add our own implementation of Identifiable. It is part of Swift since Swift 5.1:

  • https://github.com/apple/swift/blob/main/stdlib/public/core/Identifiable.swift
  • https://github.com/apple/swift-evolution/blob/master/proposals/0261-identifiable.md

It is guarded with @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) where the * means it's available on any other platform (including Linux). The restriction is just or Apple platforms where Swift is shipped as part of the OS.

So I'm pretty sure we don't need our own implementation. We would need to add @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) to Identified and everything else that uses Identifiable directly or indirectly.

The CI for Linux is using Swift 5.3 so it should be fine. The local declaration you added probably just overrode the STL version.

Can you try removing it and adding @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) where needed and see if that passes CI?

AndreiVidrasco

comment created time in 9 days

pull request commenttrading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

Looks good. I never really understood why Identified is part of the Swift Standard Library but restricted to newer platform versions 🤷

With these changes, you could also allow the version of Reducer.forEach which works with WritableKeyPath<GlobalState, IdentifiedArray<ID, State>> and is currently guarded with #if canImport(SwiftUI)

AndreiVidrasco

comment created time in 9 days

Pull request review commenttrading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

       array.remove(atOffsets: [0, 2])       XCTAssertEqual(array, [User(id: 2, name: "Blob Jr.")])     }-+    #if canImport(SwiftUI)

    #if canImport(SwiftUI)
AndreiVidrasco

comment created time in 9 days

PullRequestReviewEvent

Pull request review commenttrading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

       array.remove(atOffsets: [0, 2])       XCTAssertEqual(array, [User(id: 2, name: "Blob Jr.")])     }
    }
    
AndreiVidrasco

comment created time in 9 days

PullRequestReviewEvent

Pull request review commenttrading-point/reactiveswift-composable-architecture

Add Identifiable copy for Linux

-#if canImport(SwiftUI)-  import Foundation--  /// An array of elements that can be identified by a given key path.-  ///-  /// A useful container of state that is intended to interface with `SwiftUI.ForEach`. For example,-  /// your application may model a counter in an identifiable fashion:-  ///-  ///     struct CounterState: Identifiable {-  ///       let id: UUID-  ///       var count = 0-  ///     }-  ///     enum CounterAction { case incr, decr }-  ///     let counterReducer = Reducer<CounterState, CounterAction, Void> { ... }-  ///-  /// This domain can be pulled back to a larger domain with the `forEach` method:-  ///-  ///     struct AppState { var counters = IdentifiedArray<Int>(id: \.self) }-  ///     enum AppAction { case counter(id: UUID, action: CounterAction) }-  ///     let appReducer = counterReducer.forEach(-  ///       state: \AppState.counters,-  ///       action: /AppAction.counter(id:action:),-  ///       environment: { $0 }-  ///     )+import Foundation++/// An array of elements that can be identified by a given key path.+///+/// A useful container of state that is intended to interface with `SwiftUI.ForEach`. For example,+/// your application may model a counter in an identifiable fashion:+///+///     struct CounterState: Identifiable {+///       let id: UUID+///       var count = 0+///     }+///     enum CounterAction { case incr, decr }+///     let counterReducer = Reducer<CounterState, CounterAction, Void> { ... }+///+/// This domain can be pulled back to a larger domain with the `forEach` method:+///+///     struct AppState { var counters = IdentifiedArray<Int>(id: \.self) }+///     enum AppAction { case counter(id: UUID, action: CounterAction) }+///     let appReducer = counterReducer.forEach(+///       state: \AppState.counters,+///       action: /AppAction.counter(id:action:),+///       environment: { $0 }+///     )+///+/// And then SwiftUI can work with this array of identified elements in a list view:+///+///     struct AppView: View {+///       let store: Store<AppState, AppAction>+///+///       var body: some View {+///         List {+///           ForEachStore(+///             self.store.scope(state: \.counters, action: AppAction.counter(id:action))+///             content: CounterView.init(store:)+///           )+///         }+///       }+///     }+@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)+public struct IdentifiedArray<ID, Element>: MutableCollection, RandomAccessCollection+where ID: Hashable {+  /// A key path to a value that identifies an element.+  public let id: KeyPath<Element, ID>+  +  /// A raw array of each element's identifier.+  public private(set) var ids: [ID]+  +  /// A raw array of the underlying elements.+  public var elements: [Element] { Array(self) }+  +  // TODO: Support multiple elements with the same identifier but different data.+  private var dictionary: [ID: Element]+  +  /// Initializes an identified array with a sequence of elements and a key+  /// path to an element's identifier.   ///-  /// And then SwiftUI can work with this array of identified elements in a list view:+  /// - Parameters:+  ///   - elements: A sequence of elements.+  ///   - id: A key path to a value that identifies an element.+  public init<S>(_ elements: S, id: KeyPath<Element, ID>)+  where S: Sequence, S.Element == Element {+    self.id = id+    +    let idsAndElements = elements.map { (id: $0[keyPath: id], element: $0) }+    self.ids = idsAndElements.map { $0.id }+    self.dictionary = Dictionary(idsAndElements, uniquingKeysWith: { $1 })+  }+  +  /// Initializes an empty identified array with a key path to an element's+  /// identifier.   ///-  ///     struct AppView: View {-  ///       let store: Store<AppState, AppAction>+  /// - Parameter id: A key path to a value that identifies an element.+  public init(id: KeyPath<Element, ID>) {+    self.init([], id: id)+  }+  +  public var startIndex: Int { self.ids.startIndex }+  public var endIndex: Int { self.ids.endIndex }+  +  public func index(after i: Int) -> Int {+    self.ids.index(after: i)+  }+  +  public func index(before i: Int) -> Int {+    self.ids.index(before: i)+  }+  +  public subscript(position: Int) -> Element {+    // NB: `_read` crashes Xcode Preview compilation.+    get { self.dictionary[self.ids[position]]! }+    _modify { yield &self.dictionary[self.ids[position]]! }+  }+  +  #if DEBUG+  /// Direct access to an element by its identifier.   ///-  ///       var body: some View {-  ///         List {-  ///           ForEachStore(-  ///             self.store.scope(state: \.counters, action: AppAction.counter(id:action))-  ///             content: CounterView.init(store:)-  ///           )-  ///         }-  ///       }-  ///     }-  @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)-  public struct IdentifiedArray<ID, Element>: MutableCollection, RandomAccessCollection-  where ID: Hashable {-    /// A key path to a value that identifies an element.-    public let id: KeyPath<Element, ID>--    /// A raw array of each element's identifier.-    public private(set) var ids: [ID]--    /// A raw array of the underlying elements.-    public var elements: [Element] { Array(self) }--    // TODO: Support multiple elements with the same identifier but different data.-    private var dictionary: [ID: Element]--    /// Initializes an identified array with a sequence of elements and a key-    /// path to an element's identifier.-    ///-    /// - Parameters:-    ///   - elements: A sequence of elements.-    ///   - id: A key path to a value that identifies an element.-    public init<S>(_ elements: S, id: KeyPath<Element, ID>)-    where S: Sequence, S.Element == Element {-      self.id = id--      let idsAndElements = elements.map { (id: $0[keyPath: id], element: $0) }-      self.ids = idsAndElements.map { $0.id }-      self.dictionary = Dictionary(idsAndElements, uniquingKeysWith: { $1 })-    }--    /// Initializes an empty identified array with a key path to an element's-    /// identifier.-    ///-    /// - Parameter id: A key path to a value that identifies an element.-    public init(id: KeyPath<Element, ID>) {-      self.init([], id: id)-    }--    public var startIndex: Int { self.ids.startIndex }-    public var endIndex: Int { self.ids.endIndex }--    public func index(after i: Int) -> Int {-      self.ids.index(after: i)-    }--    public func index(before i: Int) -> Int {-      self.ids.index(before: i)-    }--    public subscript(position: Int) -> Element {-      // NB: `_read` crashes Xcode Preview compilation.-      get { self.dictionary[self.ids[position]]! }-      _modify { yield &self.dictionary[self.ids[position]]! }-    }--    #if DEBUG-      /// Direct access to an element by its identifier.-      ///-      /// - Parameter id: The identifier of element to access. Must be a valid identifier for an-      ///   element of the array and will _not_ insert elements that are not already in the array, or-      ///   remove elements when passed `nil`. Use `append` or `insert(_:at:)` to insert elements. Use-      ///   `remove(id:)` to remove an element by its identifier.-      /// - Returns: The element.-      public subscript(id id: ID) -> Element? {-        get { self.dictionary[id] }-        set {-          if newValue != nil && self.dictionary[id] == nil {-            fatalError(-              """+  /// - Parameter id: The identifier of element to access. Must be a valid identifier for an+  ///   element of the array and will _not_ insert elements that are not already in the array, or+  ///   remove elements when passed `nil`. Use `append` or `insert(_:at:)` to insert elements. Use+  ///   `remove(id:)` to remove an element by its identifier.+  /// - Returns: The element.+  public subscript(id id: ID) -> Element? {+    get { self.dictionary[id] }+    set {+      if newValue != nil && self.dictionary[id] == nil {+        fatalError(+          """               Can't update element with identifier \(id) because no such element exists in the array.                If you are trying to insert an element into the array, use the "append" or "insert" \               methods.               """-            )-          }-          if newValue == nil {-            fatalError(-              """+        )+      }+      if newValue == nil {+        fatalError(+          """               Can't update element with identifier \(id) with nil.                If you are trying to remove an element from the array, use the "remove(id:) method."               """-            )-          }-          self.dictionary[id] = newValue-        }-      }-    #else-      public subscript(id id: ID) -> Element? {-        // NB: `_read` crashes Xcode Preview compilation.-        get { self.dictionary[id] }-        _modify { yield &self.dictionary[id] }-      }-    #endif--    public mutating func insert(_ newElement: Element, at i: Int) {-      let id = newElement[keyPath: self.id]-      self.dictionary[id] = newElement-      self.ids.insert(id, at: i)-    }--    public mutating func insert<C>(-      contentsOf newElements: C, at i: Int-    ) where C: Collection, Element == C.Element {-      for newElement in newElements.reversed() {-        self.insert(newElement, at: i)-      }-    }--    /// Removes and returns the element with the specified identifier.-    ///-    /// - Parameter id: The identifier of the element to remove.-    /// - Returns: The removed element.-    @discardableResult-    public mutating func remove(id: ID) -> Element {-      let element = self.dictionary[id]-      assert(element != nil, "Unexpectedly found nil while removing an identified element.")-      self.dictionary[id] = nil-      self.ids.removeAll(where: { $0 == id })-      return element!-    }--    @discardableResult-    public mutating func remove(at position: Int) -> Element {-      self.remove(id: self.ids.remove(at: position))-    }--    public mutating func removeAll(where shouldBeRemoved: (Element) throws -> Bool) rethrows {-      var ids: [ID] = []-      for (index, id) in zip(self.ids.indices, self.ids).reversed() {-        if try shouldBeRemoved(self.dictionary[id]!) {-          self.ids.remove(at: index)-          ids.append(id)-        }-      }-      for id in ids where !self.ids.contains(id) {-        self.dictionary[id] = nil-      }-    }--    public mutating func remove(atOffsets offsets: IndexSet) {-      for offset in offsets.reversed() {-        _ = self.remove(at: offset)+        )       }+      self.dictionary[id] = newValue     }--    public mutating func move(fromOffsets source: IndexSet, toOffset destination: Int) {-      self.ids.move(fromOffsets: source, toOffset: destination)+  }+  #else+  public subscript(id id: ID) -> Element? {+    // NB: `_read` crashes Xcode Preview compilation.+    get { self.dictionary[id] }+    _modify { yield &self.dictionary[id] }+  }+  #endif+  +  public mutating func insert(_ newElement: Element, at i: Int) {+    let id = newElement[keyPath: self.id]+    self.dictionary[id] = newElement+    self.ids.insert(id, at: i)+  }+  +  public mutating func insert<C>(+    contentsOf newElements: C, at i: Int+  ) where C: Collection, Element == C.Element {+    for newElement in newElements.reversed() {+      self.insert(newElement, at: i)     }--    public mutating func sort(by areInIncreasingOrder: (Element, Element) throws -> Bool) rethrows {-      try self.ids.sort {-        try areInIncreasingOrder(self.dictionary[$0]!, self.dictionary[$1]!)+  }+  +  /// Removes and returns the element with the specified identifier.+  ///+  /// - Parameter id: The identifier of the element to remove.+  /// - Returns: The removed element.+  @discardableResult+  public mutating func remove(id: ID) -> Element {+    let element = self.dictionary[id]+    assert(element != nil, "Unexpectedly found nil while removing an identified element.")+    self.dictionary[id] = nil+    self.ids.removeAll(where: { $0 == id })+    return element!+  }+  +  @discardableResult+  public mutating func remove(at position: Int) -> Element {+    self.remove(id: self.ids.remove(at: position))+  }+  +  public mutating func removeAll(where shouldBeRemoved: (Element) throws -> Bool) rethrows {+    var ids: [ID] = []+    for (index, id) in zip(self.ids.indices, self.ids).reversed() {+      if try shouldBeRemoved(self.dictionary[id]!) {+        self.ids.remove(at: index)+        ids.append(id)       }     }--    public mutating func shuffle<T>(using generator: inout T) where T: RandomNumberGenerator {-      ids.shuffle(using: &generator)+    for id in ids where !self.ids.contains(id) {+      self.dictionary[id] = nil     }--    public mutating func shuffle() {-      var rng = SystemRandomNumberGenerator()-      self.shuffle(using: &rng)+  }+  +  public mutating func remove(atOffsets offsets: IndexSet) {+    for offset in offsets.reversed() {+      _ = self.remove(at: offset)     }--    public mutating func reverse() {-      ids.reverse()+  }
  }
  

Minor nitpick 😄

AndreiVidrasco

comment created time in 9 days

PullRequestReviewEvent

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 6c127d09eb4d039bf4f65717a486ce086863841a

Support for non-Apple platforms (#27) * Conditional import of Combine and SwiftUI * Conditionally import swift ui * Added #if canImport(os) to ReducerInstrumentation.swift * More changes for supporting non-Apple platforms. * Add CI job for Linux * Added Linux test discovery * Added LinuxMain.swift for testing * Add back debugCaseOutput for Linux * Exclude Identified and IdentifiedArray for Linux * Exclude use of IdenfitiedArray for Linux * Workaround for DipatchQueue is not Equatable in Linux * Allow tests to build on Linux. * Another attempt to limit tests on Linux * Only include ComposableArchitecture for Android OS Co-authored-by: Andrei Vidrasco <andrei.vidrasco@icloud.com>

view details

push time in 10 days

delete branch trading-point/reactiveswift-composable-architecture

delete branch : michael/if-can-import-combine

delete time in 10 days

PR merged trading-point/reactiveswift-composable-architecture

Support for non-Apple platforms

Since the dependencies of this library (ReactiveSwift and CasePaths) are compatible with non-Apple platforms (eg, Linux and Android) there is no real reason that ComposableArchitecture can't also be made to support them.

This requires just conditionally importing (and referencing) Combine and SwiftUI, which are still referenced in this port to allow mixing ReactiveSwift and SwiftUI (which requires Combine, if only for the ObservableObject protocol).

Resolves #25. Many thanks to @AndreiVidrasco for the suggestion and for his help with this PR.

+97 -3

0 comment

20 changed files

mluisbrown

pr closed time in 10 days

issue closedtrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

Hi,

First of all, thank you for doing an amazing job in creating this version of the library. It's been of a lot of help.

At my workplace we're still required to support iOS 12, which means that we can't use Combine/SwiftUI yet. I wanted to integrate this version, as it's based on ReactiveSwift which can run on older version, but to my surprise, parts of it are still using Combine.

Is there any option to remove dependency from ViewStore to Combine. It's conforming to ObservableObject(least of all) which makes it impossible to use in older version.

closed time in 10 days

AndreiVidrasco

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 184f755a2150324402ac3f052930f9a9061f3587

Only include ComposableArchitecture for Android OS

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 3a4494104f4bde716381ae34e8f51413fc4b534e

Another attempt to limit tests on Linux

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha ca06ed0d72bb8e9b3e2924fd416909cc10e1ed99

Allow tests to build on Linux.

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha a72489f7b381f79fd800027a18e10b73332a1d1a

Workaround for DipatchQueue is not Equatable in Linux

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha d37e75fc3f4e324978bcdd3900768849920180d0

Exclude use of IdenfitiedArray for Linux

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha c046246ba2cfc5a14b3b789bcce0a0b00d166254

Exclude Identified and IdentifiedArray for Linux

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha ef8f33dfa075dd2bc05e8afe7500d231bb4ed166

Add back debugCaseOutput for Linux

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 08e4cb6083a3bb35d051f6ed4e08dbe7a16a80d0

Added LinuxMain.swift for testing

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 3905c96bc2ab06be31d903f160a7ae8dfba5cdce

Added Linux test discovery

view details

push time in 10 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha bf8782ee67634d400b73e652d66d0be736e1b4f5

Add CI job for Linux

view details

push time in 10 days

PR opened trading-point/reactiveswift-composable-architecture

Support for non-Apple platforms

Since the dependencies of this library (ReactiveSwift and CasePaths) are compatible with non-Apple platforms (eg, Linux and Android) there is no real reason that ComposableArchitecture can't also be made to support them.

This requires just conditionally importing (and referencing) Combine and SwiftUI, which are still referenced in this port to allow mixing ReactiveSwift and SwiftUI (which requires Combine, if only for the ObservableObject protocol).

Resolves #25. Many thanks to @AndreiVidrasco for the suggestion and for his help with this PR.

+38 -1

0 comment

10 changed files

pr created time in 10 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

Nice! I'm going to turn the branch into a PR then, and try to get CI running on Linux for it. Thanks for your help!

AndreiVidrasco

comment created time in 10 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

Ok, I merged your PR into my branch 👍

But there is also, os.signpost, which unfortunately doesn't work, but I don't know the solution for it, and since I don't really need it for my use case, I completely deleted the file.

I added #if canImport(os) around the ReducerInstrumentation.swift file, which should solve this.

For the use of os_unfair_lock I guarded the code with #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS).

So, apart from the explicit returns this should be enough. Are you able to check it in your environment?

AndreiVidrasco

comment created time in 15 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 58f777dd2769781804798b70d7b639db97a3abf4

More changes for supporting non-Apple platforms.

view details

push time in 15 days

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 627066e45fc7ca6552efe3d3fa02f621c2eb04d5

Added #if canImport(os) to ReducerInstrumentation.swift

view details

push time in 15 days

push eventtrading-point/reactiveswift-composable-architecture

Andrei Vidrasco

commit sha 4ca6118099cc00d4cb3e16e4ab703f2645cad63c

Conditionally import swift ui

view details

Michael Brown

commit sha 90c6c8bcb0790ea3d85ee77273328ca0b772c51d

Merge pull request #26 from AndreiVidrasco/michael/if-can-import-combine Conditionally import swift ui

view details

push time in 15 days

PullRequestReviewEvent

pull request commenttrading-point/reactiveswift-composable-architecture

Conditionally import swift ui

Could you also incorporate the changes from https://github.com/trading-point/reactiveswift-composable-architecture/commit/7630087df7c9a4131d6440788f2848f475195efc into this PR?

Then I think we might have a working solution for conditionally excluding both Combine and SwiftUI.

AndreiVidrasco

comment created time in 15 days

IssuesEvent

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

I just created the branch michael/if-can-import-combine which conditionally excludes Combine and SwiftUI stuff from `ViewStore. Let me know if it works for you:

https://github.com/trading-point/reactiveswift-composable-architecture/tree/michael/if-can-import-combine

AndreiVidrasco

comment created time in 15 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

It might be as straightforward as using #if canImport(Combine). I will try this in a branch and let you know.

AndreiVidrasco

comment created time in 15 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

Interesting use case. I hadn't considered using the lib on non-Apple platforms.

It might be possible to use conditional compilation do optionally exclude the Combine dependency completely.

I'll see what I can do 👍

AndreiVidrasco

comment created time in 15 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

The reason that the ObservableObject conformance was kept was so that this library could still be used with SwiftUI if you wanted to, on a version of the OS that supports it.

AndreiVidrasco

comment created time in 16 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

We are not linking Combine in our app at all.

Regarding this, please see this comment in the README:

You will need to weak link Combine and SwiftUI, but they will never be loaded. I have tested this running on an iOS 12 simulator.

AndreiVidrasco

comment created time in 16 days

issue commenttrading-point/reactiveswift-composable-architecture

ViewStore version without Combine/SwiftUI

Hi @AndreiVidrasco, At my work we using this library, including ViewStore in a project that supports iOS 12 with no problem at all. In fact that was the whole purpose of the port, to be able to use it with iOS 12!

Even though ViewStore conforms to ObservableObject since the ObservableObject protocol is annotated with @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) this turns into a no-op and for iOS 12 builds there is no protocol conformance. We are not linking Combine in our app at all.

In our View Controllers we have things like:

        viewStore.produced.isContinueButtonEnabled
            .startWithValues { [weak self] in
                self?.continueButton.isEnabled = $0
            }

and:

        backButton.reactive
            .controlEvents(.primaryActionTriggered)
            .observeValues { [weak self] _ in
                self?.viewStore.send(.prevPage)
            }

Are you getting a particular compiler or build error when using ViewStore?

AndreiVidrasco

comment created time in 16 days

delete branch mluisbrown/swift-composable-architecture

delete branch : michael/localizedStringKey

delete time in 16 days

push eventmluisbrown/swift-composable-architecture

Michael Brown

commit sha 74017427edbfdc52775b008e614f511f1f042297

Fixes bug with LocalizedStringKeyTests (#299) * * Fix locale issues with LocalizedStringKeyTests * Use the locale parameter in LocalizedStringKey.formatted() * Changed test locale to "en_US_POSIX"

view details

Stephen Celis

commit sha 24be50fe1cf779dabc6c9c8f3df96dca3e71d1da

Update Todos app to run its forEach reducer first (#301) Fix #300.

view details

Danny Hertz

commit sha 98d5e88f0ff1f5da9993af9113ced57a1c04df68

Implment heading methods for core location library (#303)

view details

stephencelis

commit sha e1bd51b1761c9f7ab4001928c73f357c9116f807

Run swift-format

view details

Michael Brown

commit sha cc22efaf55ba4db2f402eb449207cb5334708d26

Merge remote-tracking branch 'upstream/main' into main

view details

push time in 16 days

issue commentSkyscanner/SkyFloatingLabelTextField

SkyFloatingLabelTextField doesn't seem to support Dynamic Type

@k0nserv can you at least explain why it's intentional?

tciuro

comment created time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 191122e8c62f1efb8ea751e9689644782ca771cd

Update README with SPI badges.

view details

push time in a month

PR opened SwiftPackageIndex/PackageList

Added trading-point/reactiveswift-composable-architecture

The package(s) being submitted are:

Checklist

I have either:

  • [ ] Run swift ./validate.swift.

Or, checked that:

  • [x] The package repositories are publicly accessible.
  • [x] The packages all contain a Package.swift file in the root folder.
  • [x] The packages are written in Swift 4.0 or later.
  • [x] The packages all contain at least one product (either library or executable).
  • [x] The packages all have at least one release tagged as a semantic version.
  • [x] The packages all output valid JSON from swift package dump-package with the latest Swift toolchain.
  • [x] The package URLs are all fully specified including https and the .git extension.
  • [x] The packages all compile without errors.
+2 -1

0 comment

1 changed file

pr created time in a month

push eventmluisbrown/PackageList

Michael Brown

commit sha cf4fa3e188cd9c085ba38112f52bf57ecb1f79d0

Added trading-point/reactiveswift-composable-architecture

view details

push time in a month

push eventmluisbrown/PackageList

Michael Brown

commit sha cbd1d1121fda3f471d55d5ecef36401169b9e2f9

Added trading-point/reactiveswift-composable-architecture

view details

push time in a month

push eventmluisbrown/PackageList

Michael Brown

commit sha 1163507e9c3be2aff817c5a37fb804e9019dd12c

Added trading-point/reactiveswift-composable-architecture

view details

push time in a month

fork mluisbrown/PackageList

The master list of repositories for the Swift Package Index.

https://swiftpackageindex.com

fork in a month

created tagtrading-point/reactiveswift-composable-architecture

tag0.8.0

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.

created time in a month

delete branch trading-point/reactiveswift-composable-architecture

delete branch : michael/sync-upstream

delete time in a month

push eventtrading-point/reactiveswift-composable-architecture

Jefferson Setiawan

commit sha 5324a5b327e7b5a225edc172b5dbd057f74b4381

Add implementation of shuffle on IdentifiedArray (#254) * add shuffle * Update Tests/ComposableArchitectureTests/IdentifiedArrayTests.swift * Update IdentifiedArrayTests.swift Co-authored-by: Stephen Celis <stephen.celis@gmail.com>

view details

Stephen Celis

commit sha ffe34956acd2ab3c5ce9687691a86c3265d0c066

Fix Recursive Reducer (#267)

view details

Stephen Celis

commit sha 6be95987deb3c7decaac842c434319b90342a87a

Document ScrollViewReader problem (#268)

view details

Michael Brown

commit sha e5234c24c3feada0e4d65d333ad16ce57ceb9704

Better error messages for uncompleted effects. (#270)

view details

nmccann

commit sha 937b7c4ed32fe062fb2b20298778a67447f66a16

Added some tests for Shared State case study. (#262) * Added some tests for Shared State case study. * Expanded upon tests by also validating that state is mirrored State is expected to be mirrored (or shared) between the Counter and Profile - the tests have been updated to verify this. * Modified tests to focus more on what is changing between steps Co-authored-by: Noah McCann <>

view details

Michael Brown

commit sha 43bd98dc9a8cb27e9ecdf13260da206b21c179fe

Adds Hashable conformance to a bunch of our motion/location types (#265) * Add hashable conformances to location/motion types. * clean up * clean up * clean up * clean * wip * fix * fix

view details

Stephen Celis

commit sha 4cb5144b38af903af2158f84ab8b5c3292f9af64

Swift Package Index fixes (#272) * Swift Package Index fixes * format * Remove list

view details

Stephen Celis

commit sha d22860165d9d3ad31e32fec00cf4940e895c079e

Localizable Alerts and Action Sheets (#275) * Localizable Alerts and Action Sheets Fixes #237. * Tests/fixes * Update LocalizedStringKey.swift * Fix

view details

Jefferson Setiawan

commit sha 5ef9b474bc64c5f13da435583eff9572ad34ffd2

add reverse implementation (#276)

view details

Michael Brown

commit sha 459f3b1ae897c0c7a6a19c85f0fc30b946eade5d

Drive Test Store with a real Store (#278) * Failing test * Drive Test Store using Store * Update TestStore.swift * format * Track state after send * Use proper snapshot * Fix? * fix

view details

Michael Brown

commit sha c0e5c0dcda6b3638f5b0817e18096a0371f85548

Update CI to use 11.7 instead of 11.6 (#281)

view details

Michael Brown

commit sha 8e49f0364125253e719e37bba78f97467197d760

Test Store Ergonomics (#285) * Test Store Ergonomics * fix merge * fix

view details

Brandon Williams

commit sha 9836fec287ddd698edb686dce975615681acfce9

Buffer actions when sent recursively (#287) * wip * wip * explicit test store * test * test * clean up Co-authored-by: Stephen Celis <stephen@stephencelis.com>

view details

Stephen Celis

commit sha 2e24b258179cf53781e948b6848c1b05780f7434

Fix Tic Tac Toe Optional Bug (#291)

view details

Michael Brown

commit sha 7a4a168b8994d928e93f22ab40669f52cc63d3f2

Fixes after updating with upstream.

view details

Michael Brown

commit sha f76ea3f0055f917258f935870da5937451072a3b

Fix merge bugs in ComposableCoreLocation.

view details

Michael Brown

commit sha ab1ddd74d58bf11dd2ea663c358f71b78c9887af

Use Xcode 12 release for CI.

view details

Michael Brown

commit sha 5310c2b2974f267233b654ed56ad70dbbb76a499

Remove Xcode 12 from CI until ReactiveSwift can be built with it :(

view details

Michael Brown

commit sha 2be283bdc325ba59c93de9f63369477eb30da8c9

Fix some more merge bugs. Add back Xcode 12 CI! Update ReactiveSwift version to 6.4.0 (for Xcode 12).

view details

Michael Brown

commit sha 5142335efe9bbf67b424ae6c1eb2979662582e26

Add explicit product reference for CasePaths dependency.

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha a46869cee65774a048c778c41345f2e9cac1d567

Remove Xcode 11.4 from CI matrix.

view details

push time in a month

pull request commentpointfreeco/swift-composable-architecture

Fixes bug with LocalizedStringKeyTests

Just made the change that @ole suggested 👍

mluisbrown

comment created time in a month

push eventmluisbrown/swift-composable-architecture

Michael Brown

commit sha 1a7f2dbf7034f12e90ba4211864ddcb28ab8fac9

Changed test locale to "en_US_POSIX"

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 04d6de7b33ec3cc6db4c63409fb957802c085c15

Fix VoiceMemosTests timing issue.

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha baa6e6de736c0fa0c3c34bf67cdb19233e2a0b6f

Changes to help the Xcode 12 compiler along 🙈

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 5142335efe9bbf67b424ae6c1eb2979662582e26

Add explicit product reference for CasePaths dependency.

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 2be283bdc325ba59c93de9f63369477eb30da8c9

Fix some more merge bugs. Add back Xcode 12 CI! Update ReactiveSwift version to 6.4.0 (for Xcode 12).

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 5310c2b2974f267233b654ed56ad70dbbb76a499

Remove Xcode 12 from CI until ReactiveSwift can be built with it :(

view details

push time in a month

issue commenttrading-point/reactiveswift-composable-architecture

Nested properties keyPath support for Produced values

Ok, I see. In that case, since your proposed solution could bring the API closer to the original TCA, it sounds like a great idea 😄

Do you want to create a PR with your draft solution?

Extend ReactiveSwift to use protocols // Maybe it's nice, but seems like a joke That would be a massive undertaking, and probably not possible without a re-write!

Rewrite TCA to the OpenCombine It's an option, but it should be for a separate fork. The benefit of this fork is not just that you can use iOS < 13, but that you can use ReactiveSwift, which is battle tested OSS project.

So your solution to use KeyPathContainers looks great 👍

maximkrouk

comment created time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha ab1ddd74d58bf11dd2ea663c358f71b78c9887af

Use Xcode 12 release for CI.

view details

push time in a month

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha f76ea3f0055f917258f935870da5937451072a3b

Fix merge bugs in ComposableCoreLocation.

view details

push time in a month

PR opened pointfreeco/swift-composable-architecture

Fixes bug with LocalizedStringKeyTests

Currently, when you run the LocalizedStringKeyTests on a machine which is not using the en_US locale, they will fail:

("You are 1 000th in line.") is not equal to ("You are 1,000th in line.")

I currently have a custom locale where the number grouping symbol is a space, but many European locales use . for grouping and , for decimals. It would also fail for these locales.

The fix I made was to force the en_US locale for the NumberFormatter used in the test.

Whilst I was investigating this, I also found that the formatted() function in the LocalizedStringKey extension ignores the locale parameter passed, so I changed it to not ignore this parameter.

+2 -1

0 comment

2 changed files

pr created time in a month

push eventmluisbrown/swift-composable-architecture

Brandon Williams

commit sha 80f44fba4cc500590b38a8f0bdaef138ff1351dc

Case study for tvOS focus. (#226) * Case study for tvOS focus. * clean up * clean up * fix ios 13 * move random to env Co-authored-by: Stephen Celis <stephen@stephencelis.com>

view details

mbrandonw

commit sha 8cc8492b9f3930491e74d2579584c1e9d20bedb0

Run swift-format

view details

David Bou

commit sha f0c5b487ce395eea89b2bbf10e258ad86120f779

Add keyFrames Effect in animations case study (#231)

view details

mbrandonw

commit sha 35807cef6eac3ef6838d704ef6d84d1f5d6ef237

Run swift-format

view details

Morten Heiberg

commit sha 339feec7db39f22466efcde5e71f60b609082064

Fix TicTacToe auth error localization (#234)

view details

Stephen Celis

commit sha 1a88844722c9ef68fe8ca0badef469e8662589d3

Add swift-doc action (#241) * Add swift-doc action * alphabetize * Update documentation.yml

view details

Stephen Celis

commit sha 456fc76bf6b0c79e48d088e121bcb18a3fe933d2

Update documentation.yml (#242)

view details

Brandon Williams

commit sha ea55ef174e67f381ce909b3de55ba99a2c6c1bfc

Fix fireAndForget on iOS 13.2 (#240) * Fix fireAndForget on iOS 13.2 * Drop Xcode 11.2.1, too flakey

view details

Stephen Celis

commit sha e75904c180f9c29c1cead9886fdfeb85e2773a67

Store can use @Published again (#239) * Store can use @Published again As of the third beta, assign(to:) takes an `inout Publisher.Publisher`, so it no longer surfaces an escape hatch through which one could mutate a store's state. Fixes #238. * Fix tests. * Update ci.yml

view details

Stephen Celis

commit sha ea03db23745f9d79d2b78b5e5e55cf763a7dc54b

Update documentation.yml (#243)

view details

Stephen Celis

commit sha 2bf1be6bcfa91dbe9af84e22d54445e168409e8c

Fix iOS 14 Cancellation Crash (#244) * wip * wip Co-authored-by: Brandon Williams <mbw234@gmail.com>

view details

stephencelis

commit sha 6a5b8f276fdc5549172fc41ef3b33be883453079

Run swift-format

view details

Stephen Celis

commit sha af1dcf09cf497a4e039736f3ee6e529bfb7a64fc

Restore original cancellation logic (#245) * Revert "Run swift-format" This reverts commit 6a5b8f276fdc5549172fc41ef3b33be883453079. * Revert "Fix iOS 14 Cancellation Crash (#244)" This reverts commit 2bf1be6bcfa91dbe9af84e22d54445e168409e8c. * Xcode 12 CI * Update ci.yml

view details

Stephen Celis

commit sha 0edf66bf577d26511a0d3658d3d0a72c88a9f876

Link to docs (#246)

view details

Mateusz Matoszko

commit sha 830854166fd3969771d1a0f389e479311af61002

Remove let when handling numberFactResponse action (#247)

view details

Stephen Celis

commit sha 7f482acbf4c108655ae269a6445831ce1890762e

Alert bug exploration (#249) * wip * Fix * revert * Fix tests * Better debug output * organize * alphabetize * Fix mac Co-authored-by: Brandon Williams <mbw234@gmail.com>

view details

Stephen Celis

commit sha 07580be907a5f5c9ca744465e0bab2492f1c189e

Revert "Update documentation.yml" (#250) This reverts commit 455af2de133b82f8d3339552e056a5051868cb25.

view details

Al Skipp

commit sha dfae33e9c9052c38d6b14867048dd9c22a32effd

Typo fixes (#251) * Removes duplicated word in case study readMe * Typo fix

view details

Stephen Celis

commit sha 86843a4dcc0753bc9ab648e1d0677e394065ddd2

Lift TCA acronym out of folded FAQ? (#252)

view details

Jefferson Setiawan

commit sha fffefb9c22bf5b283d1121843e07649769dc6d6c

Add implementation of shuffle on IdentifiedArray (#254) * add shuffle * Update Tests/ComposableArchitectureTests/IdentifiedArrayTests.swift * Update IdentifiedArrayTests.swift Co-authored-by: Stephen Celis <stephen.celis@gmail.com>

view details

push time in a month

issue commenttrading-point/reactiveswift-composable-architecture

Nested properties keyPath support for Produced values

Hey @maximkrouk, sorry for the delay in replying.

In my use of TCA I haven't found the need for this feature yet. I'm not sure of the value of adding this to project, at least not at this point.

I would like to keep the API here as close as possible to the original TCA. Have you raised this issue on that repo also?

maximkrouk

comment created time in a month

delete branch trading-point/reactiveswift-composable-architecture

delete branch : michael/older-ios-usage

delete time in 2 months

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha a7638a8cb16240b93e3f02e6cb9105ee3677da19

* Add documentation about usage with OSes that don't support SwiftUI and Combine * Removed unnecessary imports of Combine * ObservableObjectPublisher cleanup

view details

Michael Brown

commit sha 03691877f47852625139820b5c8e9543137f8f87

Merge pull request #22 from trading-point/michael/older-ios-usage Add documentation about usage with OSes that don't support SwiftUI and Combine

view details

push time in 2 months

PR opened trading-point/reactiveswift-composable-architecture

Add documentation about usage with OSes that don't support SwiftUI and Combine
  • Add documentation about usage with OSes that don't support SwiftUI and Combine
  • Removed unnecessary imports of Combine
  • ObservableObjectPublisher cleanup
+13 -2

0 comment

3 changed files

pr created time in 2 months

startedcongnd/FMPhotoPicker

started time in 2 months

created tagtrading-point/reactiveswift-composable-architecture

tag0.7.1

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.

created time in 2 months

delete branch trading-point/reactiveswift-composable-architecture

delete branch : michael/deprecate-publisher

delete time in 2 months

push eventtrading-point/reactiveswift-composable-architecture

Michael Brown

commit sha 5a57075423eca65f24ab57d7fa908c3531bbe580

Added deprecation for ViewStore

view details

Michael Brown

commit sha 83e5c1e56ecf33496a6c1847af96c1abb31970db

Merge pull request #21 from trading-point/michael/deprecate-publisher Added deprecation for ViewStore `publisher`

view details

push time in 2 months

PR merged trading-point/reactiveswift-composable-architecture

Added deprecation for ViewStore `publisher`

ViewStore's publisher property was renamed to producer in #14 but no deprecation was added, making this a breaking changed 🙈 In #19 this was further changed to produced, and deprecations were added for that change, so this is to also add deprecation for people still using publisher, so as to avoid a breaking change.

+12 -3

0 comment

1 changed file

mluisbrown

pr closed time in 2 months

more