From 710147502d056340d8b10befd314d42d2f112fc7 Mon Sep 17 00:00:00 2001 From: Gemma Barlow Date: Wed, 25 Sep 2024 14:34:16 -0400 Subject: [PATCH] Restore Library Evolution support for Xcode 16 (#279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update xctest-dynamic-overlay to 1.4.1 * Restore ‘Build for Library Evolution’ target This partially reverts commit 4b65e0323c94a6f67f462b52c10d1fdc146e6ea4. *waves* Hi - we’re depending on this. * Update version of swift-syntax * Update to build DependenciesMacros for Library Evolution * Address a syntax error in Xcode 16 “switch covers known cases, but 'AccessorBlockSyntax.Accessors' may have additional unknown values” * Revert back to `macos-14` This partially reverts commit 7c5590d2a6c918b964e8ed406e6d2e6d6f017851. --- .github/workflows/ci.yml | 2 ++ Makefile | 7 +++++++ Package.resolved | 10 +++++----- .../DependencyClientMacro.swift | 1 + 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ddc26c0..dd1e470d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,8 @@ jobs: run: make test-swift - name: Build platforms ${{ matrix.config }} run: CONFIG=${{ matrix.config }} make build-all-platforms + - name: Build for library evolution + run: make build-for-library-evolution ubuntu: strategy: diff --git a/Makefile b/Makefile index 3920739d..8a76ba11 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,13 @@ build-for-library-evolution: -Xswiftc -emit-module-interface \ -Xswiftc -enable-library-evolution + swift build \ + -c release \ + --target DependenciesMacros \ + -Xswiftc -emit-module-interface \ + -Xswiftc -enable-library-evolution \ + -Xswiftc -DRESILIENT_LIBRARIES # Required to build swift-syntax; see https://github.com/swiftlang/swift-syntax/pull/2540 + build-for-static-stdlib-docker: @docker run \ -v "$(PWD):$(PWD)" \ diff --git a/Package.resolved b/Package.resolved index 354bb108..8f5d4c31 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "b70d24a284d4a26856cfef0d2ef69b0e2326a2fa8a91e22c08eba0cad0f59bcd", + "originHash" : "ac879199bc109c96e02f389573ce5b101fa5c8a274b809fc57dba0d4736f5b6f", "pins" : [ { "identity" : "combine-schedulers", @@ -69,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/swiftlang/swift-syntax", "state" : { - "revision" : "515f79b522918f83483068d99c68daeb5116342d", - "version" : "600.0.0-prerelease-2024-09-04" + "revision" : "cb53fa1bd3219b0b23ded7dfdd3b2baff266fd25", + "version" : "600.0.0" } }, { @@ -78,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", "state" : { - "revision" : "bc2a151366f2cd0e347274544933bc2acb00c9fe", - "version" : "1.4.0" + "revision" : "27d767d643fa2cf083d0a73d74fa84cacb53e85c", + "version" : "1.4.1" } } ], diff --git a/Sources/DependenciesMacrosPlugin/DependencyClientMacro.swift b/Sources/DependenciesMacrosPlugin/DependencyClientMacro.swift index 942aa6b3..62646fec 100644 --- a/Sources/DependenciesMacrosPlugin/DependencyClientMacro.swift +++ b/Sources/DependenciesMacrosPlugin/DependencyClientMacro.swift @@ -120,6 +120,7 @@ public enum DependencyClientMacro: MemberAttributeMacro, MemberMacro { if accessors.contains(where: { $0.accessorSpecifier.tokenKind == .keyword(.get) }) { continue } + @unknown default: return [] } }