Skip to content

Commit

Permalink
Create a Makefile target simulating building for Library Evolution; a…
Browse files Browse the repository at this point in the history
…ddress issues with Xcode 16 running it (#199)

* Add a Makefile target build-for-library-evolution

Replicates an issue I’m seeing in our project

* Update xctest-dynamic-overlay to 1.4.1

* Update swift-syntax

* Add param to build-for-library-evolution

* Corrects issue seen via `make build-for-library-evolution`

* Correct a small syntax error

* Add job to CI, covering Library Evolution Makefile target

* Revert to macos-14
  • Loading branch information
gemmakbarlow authored Sep 25, 2024
1 parent 26887d3 commit 7ada838
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ jobs:
- name: Run tests
run: make test-swift

macos-library-evolution:
name: macOS Library Evolution (Xcode ${{ matrix.xcode }})
runs-on: macos-latest
strategy:
matrix:
xcode:
- '15.4'
- '16.0'
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Print Swift version
run: swift --version
- name: Build for Library Evolution
run: make build-for-library-evolution

linux:
strategy:
matrix:
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ test-swift:
-c release \
--parallel

build-for-library-evolution:
swift build \
-c release \
--target CasePaths \
-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

format:
swift format --in-place --recursive .

Expand Down
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-syntax",
"state" : {
"revision" : "4c6cc0a3b9e8f14b3ae2307c5ccae4de6167ac2c",
"version" : "600.0.0-prerelease-2024-06-12"
"revision" : "cb53fa1bd3219b0b23ded7dfdd3b2baff266fd25",
"version" : "600.0.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "357ca1e5dd31f613a1d43320870ebc219386a495",
"version" : "1.2.2"
"revision" : "27d767d643fa2cf083d0a73d74fa84cacb53e85c",
"version" : "1.4.1"
}
}
],
Expand Down
1 change: 1 addition & 0 deletions Sources/CasePathsMacros/CasePathableMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ extension AttributeListSyntax.Element {
if let availability = ifConfig.availability {
return .ifConfigDecl(availability)
}
@unknown default: return nil
}
return nil
}
Expand Down

0 comments on commit 7ada838

Please sign in to comment.