From f714efd2714938928660cd1c842de23ff0fec8c0 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Mon, 11 Nov 2024 11:09:41 -0300 Subject: [PATCH 1/4] ci: fix Xcode 16 version (#599) * fix ci * bump macOS to 15 * add separate step for macos-14 * remove custom name --- .github/workflows/ci.yml | 48 +++++++++++++++++++------ .github/workflows/integration-tests.yml | 4 +-- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24b143a3..2c99cadb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,30 +15,58 @@ concurrency: jobs: xcodebuild: - name: xcodebuild + runs-on: macos-15 + strategy: + matrix: + command: [test, ""] + platform: [IOS, MAC_CATALYST, MACOS, TVOS, VISIONOS, WATCHOS] + exclude: + - { platform: VISIONOS } + include: + - { command: test, skip_release: 1 } + steps: + - uses: actions/checkout@v4 + - name: Cache derived data + uses: actions/cache@v3 + with: + path: | + ~/.derivedData + key: | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} + restore-keys: | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.command }}- + - name: Set IgnoreFileSystemDeviceInodeChanges flag + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - name: Update mtime for incremental builds + uses: chetan/git-restore-mtime-action@v2 + - run: make dot-env + - name: Debug + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild + - name: Release + if: matrix.skip_release != '1' + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild + + xcodebuild-macOS-14: runs-on: macos-14 strategy: matrix: command: [test, ""] platform: [IOS, MAC_CATALYST, MACOS, TVOS, VISIONOS, WATCHOS] - xcode: ["15.4", "16.0"] exclude: - { platform: VISIONOS } include: - { command: test, skip_release: 1 } steps: - uses: actions/checkout@v4 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - name: Cache derived data uses: actions/cache@v3 with: path: | ~/.derivedData key: | - deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} restore-keys: | - deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.command }}- - name: Set IgnoreFileSystemDeviceInodeChanges flag run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - name: Update mtime for incremental builds @@ -67,9 +95,9 @@ jobs: path: | .build key: | - build-spm-linux-${{ matrix.swift-verion }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Package.resolved') }} + build-spm-linux-${{ matrix.swift-version }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Package.resolved') }} restore-keys: | - build-spm-linux-${{ matrix.swift-verion }}- + build-spm-linux-${{ matrix.swift-version }}- - run: make dot-env - name: Run tests run: swift test --skip IntegrationTests @@ -86,7 +114,7 @@ jobs: examples: name: Examples - runs-on: macos-14 + runs-on: macos-15 steps: - uses: actions/checkout@v4 - name: Cache derived data @@ -98,7 +126,7 @@ jobs: restore-keys: | deriveddata-examples- - name: Select Xcode 16 - run: sudo xcode-select -s /Applications/Xcode_16.app + run: sudo xcode-select -s /Applications/Xcode_16.0.app - name: Set IgnoreFileSystemDeviceInodeChanges flag run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - name: Update mtime for incremental builds diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 70234556..6ca1cb80 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -13,14 +13,14 @@ concurrency: jobs: integration-tests: - runs-on: macos-14 + runs-on: macos-15 name: Integration Tests steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Select Xcode 16 - run: sudo xcode-select -s /Applications/Xcode_16.app + run: sudo xcode-select -s /Applications/Xcode_16.0.app - name: Run tests run: make test-integration env: From 425a99f6994788059f5da5ab07f86a806526e8b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:22:00 -0300 Subject: [PATCH 2/4] chore(deps): bump github.com/apple/swift-crypto from 3.9.0 to 3.9.1 (#598) Bumps [github.com/apple/swift-crypto](https://github.com/apple/swift-crypto) from 3.9.0 to 3.9.1. - [Release notes](https://github.com/apple/swift-crypto/releases) - [Commits](https://github.com/apple/swift-crypto/compare/3.9.0...3.9.1) --- updated-dependencies: - dependency-name: github.com/apple/swift-crypto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index b2ac9da7..7fb4c598 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-crypto.git", "state" : { - "revision" : "8fa345c2081cfbd4851dffff5dd5bed48efe6081", - "version" : "3.9.0" + "revision" : "06dc63c6d8da54ee11ceb268cde1fa68161afc96", + "version" : "3.9.1" } }, { From d67b7cf850d43c2a8ecf39feedfc39528f55f139 Mon Sep 17 00:00:00 2001 From: Stephen Thomas <101900691+stephenth0ma5@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:23:24 -0600 Subject: [PATCH 3/4] fix(auth): `URLError` coercion for `RetryableError` causing session to be deleted (#597) * Fixes url error coercion * Include non-url errors --- Sources/Auth/Internal/SessionManager.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Auth/Internal/SessionManager.swift b/Sources/Auth/Internal/SessionManager.swift index 80cfc0ae..684bbce7 100644 --- a/Sources/Auth/Internal/SessionManager.swift +++ b/Sources/Auth/Internal/SessionManager.swift @@ -106,7 +106,9 @@ private actor LiveSessionManager { // Need to do this check here, because not all RetryableError's should be retried. // URLError conforms to RetryableError, but only a subset of URLError should be retried, // the same is true for AuthError. - if let error = error as? any RetryableError, error.shouldRetry { + if let error = error as? URLError, error.shouldRetry { + throw error + } else if let error = error as? any RetryableError, error.shouldRetry { throw error } else { remove() From 691bde7ca02fb70eed77d4750904fc9be45bd007 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:24:10 -0300 Subject: [PATCH 4/4] chore(main): release 2.22.1 (#601) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ Sources/Helpers/Version.swift | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c4563a87..d1a01fd1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.22.0" + ".": "2.22.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a61aacc..db8404be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.22.1](https://github.com/supabase/supabase-swift/compare/v2.22.0...v2.22.1) (2024-11-12) + + +### Bug Fixes + +* **auth:** `URLError` coercion for `RetryableError` causing session to be deleted ([#597](https://github.com/supabase/supabase-swift/issues/597)) ([d67b7cf](https://github.com/supabase/supabase-swift/commit/d67b7cf850d43c2a8ecf39feedfc39528f55f139)) + ## [2.22.0](https://github.com/supabase/supabase-swift/compare/v2.21.0...v2.22.0) (2024-11-06) diff --git a/Sources/Helpers/Version.swift b/Sources/Helpers/Version.swift index e39581d3..52eb16e0 100644 --- a/Sources/Helpers/Version.swift +++ b/Sources/Helpers/Version.swift @@ -1 +1 @@ -package let version = "2.22.0" // {x-release-please-version} +package let version = "2.22.1" // {x-release-please-version}