Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some issues building for Library Evolution, Xcode 16 #234

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
matrix:
xcode:
- '15.4'
- '16.0'
variation:
- ios
- macos
Expand All @@ -33,6 +34,8 @@ jobs:
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Skip macro validation
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Run Library Evolution builds
run: make build-for-library-evolution
- name: Run tests
run: make test-${{ matrix.variation }}

Expand Down
58 changes: 58 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PLATFORM_WATCHOS = watchOS Simulator,id=$(call udid_for,watchOS 10.5,Watch)

TEST_RUNNER_CI = $(CI)

OTHER_SWIFT_FLAGS="-DRESILIENT_LIBRARIES"

default: test

test: test-ios test-macos test-tvos test-watchos test-examples
Expand Down Expand Up @@ -65,6 +67,62 @@ test-docs:
|| (echo "xcodebuild docbuild failed:\n\n$(DOC_WARNINGS)" | tr '\1' '\n' \
&& exit 1)

build-for-library-evolution: build-for-library-evolution-ios build-for-library-evolution-macos

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

swift build \
-c release \
--target SwiftUINavigation \
-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

swift build \
-c release \
--target UIKitNavigation \
-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

swift build \
-c release \
--target AppKitNavigation \
-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
stephencelis marked this conversation as resolved.
Show resolved Hide resolved
stephencelis marked this conversation as resolved.
Show resolved Hide resolved

build-for-library-evolution-ios:
xcodebuild build \
-skipMacroValidation \
-workspace SwiftNavigation.xcworkspace \
-scheme SwiftNavigation \
-destination platform="$(PLATFORM_IOS)" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS)

stephencelis marked this conversation as resolved.
Show resolved Hide resolved
xcodebuild build \
-skipMacroValidation \
-workspace SwiftNavigation.xcworkspace \
-scheme SwiftUINavigation \
-destination platform="$(PLATFORM_IOS)" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS)

xcodebuild build \
-skipMacroValidation \
-workspace SwiftNavigation.xcworkspace \
-scheme UIKitNavigation \
-destination platform="$(PLATFORM_IOS)" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS)

format:
swift format \
--ignore-unparsable-files \
Expand Down
10 changes: 5 additions & 5 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"originHash" : "21426c7e67e0003e5a1e08c0f4323d81f8190a1dc8c3b2f9dc9f8fed20da343d",
"originHash" : "7b628d003e1a38cf15bb0292475a64f583c16e6a34d3b2c9226d5ba2dd423bc1",
"pins" : [
{
"identity" : "swift-case-paths",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "642e6aab8e03e5f992d9c83e38c5be98cfad5078",
"version" : "1.5.5"
"branch" : "main",
"revision" : "bc92c4b27f9a84bfb498cdbfdf35d5a357e9161f"
}
},
{
Expand Down Expand Up @@ -78,8 +78,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "96beb108a57f24c8476ae1f309239270772b2940",
"version" : "1.2.5"
"revision" : "27d767d643fa2cf083d0a73d74fa84cacb53e85c",
"version" : "1.4.1"
}
}
],
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-collections", from: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/swift-case-paths", from: "1.5.4"),
.package(url: "https://github.com/pointfreeco/swift-case-paths", branch: "main"),
gemmakbarlow marked this conversation as resolved.
Show resolved Hide resolved
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.2.0"),
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.2"),
.package(url: "https://github.com/pointfreeco/swift-perception", from: "1.3.4"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.2.2"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.4.1"),
],
targets: [
.target(
Expand Down
4 changes: 2 additions & 2 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-collections", from: "1.0.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/swift-case-paths", from: "1.5.4"),
.package(url: "https://github.com/pointfreeco/swift-case-paths", branch: "main"),
gemmakbarlow marked this conversation as resolved.
Show resolved Hide resolved
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.2.0"),
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.2"),
.package(url: "https://github.com/pointfreeco/swift-perception", from: "1.3.4"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.2.2"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.4.1"),
],
targets: [
.target(
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftUINavigation/ConfirmationDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
self = .hidden
case .visible:
self = .visible
@unknown default:
self = .hidden
stephencelis marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,13 @@
}

switch navigationController.path[nextIndex] {
case .eager, .lazy(.codable):
break
case .lazy(.element(let element)):
navigationController.path[nextIndex] = .eager(element)

case .eager, .lazy(.codable):
fallthrough

@unknown default: break
}
return
}
Expand Down Expand Up @@ -385,6 +388,7 @@
return nil
}
return (destination(value as! D), value)
@unknown default: return nil
}
}
if stackController.path.contains(where: {
Expand Down Expand Up @@ -435,7 +439,8 @@
case let .eager(element), let .lazy(.element(element)):
return element.base as! Element
case .lazy(.codable):
fatalError()
fallthrough
@unknown default: fatalError()
}
}
)
Expand Down
2 changes: 2 additions & 0 deletions Sources/UIKitNavigation/Navigation/UIAlertController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
self = .cancel
case .destructive:
self = .destructive
@unknown default:
self = .default
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "151d6b708374929cb6836d4394326869c5f1cb5b52f96fab71af12019da2d6bc",
"pins" : [
{
"identity" : "combine-schedulers",
Expand All @@ -14,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "71344dd930fde41e8f3adafe260adcbb2fc2a3dc",
"version" : "1.5.4"
gemmakbarlow marked this conversation as resolved.
Show resolved Hide resolved
"branch" : "main",
"revision" : "bc92c4b27f9a84bfb498cdbfdf35d5a357e9161f"
}
},
{
Expand Down Expand Up @@ -122,10 +123,10 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "357ca1e5dd31f613a1d43320870ebc219386a495",
"version" : "1.2.2"
"revision" : "27d767d643fa2cf083d0a73d74fa84cacb53e85c",
"version" : "1.4.1"
}
}
],
"version" : 2
"version" : 3
}
Loading