Skip to content

Commit

Permalink
Merge pull request #11 from faberNovel/feature/structured_concurrency
Browse files Browse the repository at this point in the history
Feature/structured concurrency
  • Loading branch information
alexandre-pod authored Jul 1, 2024
2 parents 9e545e3 + 2df3fb5 commit 673444e
Show file tree
Hide file tree
Showing 23 changed files with 439 additions and 269 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ jobs:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.5
- uses: actions/checkout@v3
- name: Bundle install
run: bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
bundler: "Gemfile.lock"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Bundle install Example
working-directory: ./Example
run: bundle install
uses: ruby/setup-ruby@v1
with:
working-directory: ./Example
ruby-version: '3.2.2'
bundler: "Gemfile.lock"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Pod install
working-directory: ./Example
run: bundle exec pod install
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:

if: contains(github.ref, 'release') # allow to filter on release branches only
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.5
- uses: actions/checkout@v3
- name: Bundle install
run: bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
bundler: "Gemfile.lock"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Prepare release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_CI }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.5
- name: Bundle install
run: bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
bundler: "Gemfile.lock"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_CI }}
Expand Down
6 changes: 3 additions & 3 deletions ADCoordinator.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ This library provides a base class `Coordinator` and a mecanism to retain and re
s.author = { 'Pierre Felgines' => 'pierre.felgines@fabernovel.com' }
s.source = { :git => '/~https://github.com/faberNovel/Coordinator.git', :tag => "v#{s.version}" }
s.social_media_url = 'https://twitter.com/fabernovel'
s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '10.0'
s.ios.deployment_target = '13.0'
s.tvos.deployment_target = '13.0'
s.framework = 'Foundation', 'UIKit'
s.swift_version = '5.1'
s.swift_version = '5.7'
s.source_files = 'ADCoordinator/Classes/**/*'
end
3 changes: 2 additions & 1 deletion ADCoordinator/Classes/Coordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ extension UIViewController: NativeNavigator {}

public typealias NativeNavigatorObject = NativeNavigator & NSObject

@preconcurrency @MainActor
open class Coordinator {

/**
Expand Down Expand Up @@ -54,7 +55,7 @@ open class Coordinator {

extension Coordinator: Equatable {

public static func == (lhs: Coordinator, rhs: Coordinator) -> Bool {
public nonisolated static func == (lhs: Coordinator, rhs: Coordinator) -> Bool {
return lhs === rhs
}
}
Expand Down
2 changes: 2 additions & 0 deletions ADCoordinator/Classes/NativeNavigator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

import Foundation

@preconcurrency @MainActor
public protocol NativeNavigator: AnyObject {}

@preconcurrency @MainActor
private enum ContextAssociatedKeys {
fileprivate static var deallocObserver: UInt8 = 0
}
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added
- Add Support for Swift Concurrency

### Removed

- Remove support for iOS 10, 11 and 12
- Remove support for tvOS 10, 11 and 12

### Changed

- Add @MainActor attribute to Coordinator
- Add @MainActor attribute to NativeNavigator
- Update Example project to pass strict concurrency checks

## [1.0.2] - 2021-09-10

- Add SPM compatibility
Expand Down
Loading

0 comments on commit 673444e

Please sign in to comment.