-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update TCA to latest version #228
base: master
Are you sure you want to change the base?
Changes from all commits
ce36bc9
b91c575
54b9898
a3aff9e
798b3c9
54e8e62
59e48fc
ca3e06e
a556b42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,21 +14,40 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
library: | ||
library-macos-14: | ||
name: Build and Run Unit Tests | ||
runs-on: macos-14 | ||
strategy: | ||
matrix: | ||
xcode: ['15.2', '15.4', '16.0'] | ||
xcode: ['15.2', '15.4'] | ||
config: ['debug', 'release'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Select Xcode ${{ matrix.xcode }} | ||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | ||
- name: Run ${{ matrix.config }} tests | ||
run: make CONFIG=${{ matrix.config }} test-library | ||
run: make XCODE=${{ matrix.xcode }} CONFIG=${{ matrix.config }} test-library | ||
|
||
- uses: conradev/xcresulttool@v1.8.0 | ||
- uses: slidoapp/xcresulttool@v3.1.0 | ||
with: | ||
path: TestResults.xcresult | ||
path: TestResults-${{ matrix.xcode }}-${{ matrix.config }}.xcresult | ||
if: success() || failure() | ||
|
||
library-macos-15: | ||
name: Build and Run Unit Tests | ||
runs-on: macos-15 | ||
strategy: | ||
matrix: | ||
xcode: ['16.0'] | ||
config: ['debug', 'release'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Select Xcode ${{ matrix.xcode }} | ||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | ||
- name: Run ${{ matrix.config }} tests | ||
run: make XCODE=${{ matrix.xcode }} CONFIG=${{ matrix.config }} test-library | ||
|
||
- uses: slidoapp/[email protected] | ||
with: | ||
path: TestResults-${{ matrix.xcode }}-${{ matrix.config }}.xcresult | ||
if: success() || failure() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s| | |
s.author = { "Mobile @ Klaviyo" => "[email protected]" } | ||
s.source = { :git => "https://github.com/klaviyo/klaviyo-swift-sdk.git", :tag => s.version.to_s } | ||
s.swift_version = '5.7' | ||
s.platform = :ios, '13.0' | ||
s.platform = :ios, '15.0' | ||
s.source_files = 'Sources/KlaviyoCore/**/*.swift' | ||
s.dependency 'AnyCodable-FlightSchool' | ||
ndurell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
s.dependency 'KlaviyoSDKDependencies', '~>4.0.0' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "KlaviyoSDKDependencies" | ||
s.version = "4.0.0" | ||
s.summary = "Dependency for the Klaviyo SDK" | ||
s.description = <<-DESC | ||
Klaviyo external dependencies all rolled in one package | ||
DESC | ||
s.homepage = "https://github.com/klaviyo/klaviyo-swift-sdk" | ||
s.license = { :type => "MIT", :file => "LICENSE" } | ||
s.author = { "Mobile @ Klaviyo" => "[email protected]" } | ||
s.source = { :git => "https://github.com/klaviyo/klaviyo-swift-sdk.git", :tag => s.version.to_s } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm probably not looking in the right file, but I am curious what dependencies are going in this. I saw in a lower file that both core and this were imported, why is that? Is this where the dependencies of our SDK live? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't have any dependencies after this change in the sdk properly. I've internned pretty much everything except in tests which uses combine schedulers and a few other misc things. |
||
s.swift_version = '5.7' | ||
s.platform = :ios, '15.0' | ||
s.source_files = 'Sources/KlaviyoCore/**/*.swift' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s| | |
s.author = { "Mobile @ Klaviyo" => "[email protected]" } | ||
s.source = { :git => "https://github.com/klaviyo/klaviyo-swift-sdk.git", :tag => s.version.to_s } | ||
s.swift_version = '5.7' | ||
s.platform = :ios, '13.0' | ||
s.platform = :ios, '15.0' | ||
s.source_files = 'Sources/KlaviyoUI/**/*.swift' | ||
# update once modularization changes are merged in. | ||
s.dependency 'KlaviyoSwift', '~> 4.0.0' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// swift-tools-version: 5.6 | ||
// swift-tools-version:5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need two different version of the package to support older versions of swift. |
||
|
||
import CompilerPluginSupport | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "klaviyo-swift-sdk", | ||
platforms: [.iOS(.v13)], | ||
platforms: [.iOS(.v15)], | ||
products: [ | ||
.library( | ||
name: "KlaviyoSwift", | ||
|
@@ -19,40 +20,38 @@ let package = Package( | |
], | ||
dependencies: [ | ||
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.10.0"), | ||
.package( | ||
url: "https://github.com/Flight-School/AnyCodable", | ||
from: "0.6.0"), | ||
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "0.6.1"), | ||
.package(url: "https://github.com/pointfreeco/swift-case-paths", from: "0.10.0"), | ||
.package(url: "https://github.com/pointfreeco/combine-schedulers", from: "0.9.1") | ||
.package(url: "https://github.com/pointfreeco/combine-schedulers", from: "1.0.2"), | ||
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.3.0") | ||
], | ||
targets: [ | ||
.target( | ||
name: "KlaviyoCore", | ||
dependencies: [.product(name: "AnyCodable", package: "AnyCodable")], | ||
dependencies: ["KlaviyoSDKDependencies"], | ||
path: "Sources/KlaviyoCore"), | ||
.testTarget( | ||
name: "KlaviyoCoreTests", | ||
dependencies: [ | ||
"KlaviyoCore", | ||
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"), | ||
.product(name: "CustomDump", package: "swift-custom-dump"), | ||
.product(name: "CasePaths", package: "swift-case-paths") | ||
"KlaviyoSDKDependencies" | ||
]), | ||
.target( | ||
name: "KlaviyoSwift", | ||
dependencies: [.product(name: "AnyCodable", package: "AnyCodable"), "KlaviyoCore"], | ||
dependencies: [ | ||
"KlaviyoCore", | ||
"KlaviyoSDKDependencies" | ||
], | ||
path: "Sources/KlaviyoSwift", | ||
resources: [.copy("PrivacyInfo.xcprivacy")]), | ||
.testTarget( | ||
name: "KlaviyoSwiftTests", | ||
dependencies: [ | ||
"KlaviyoSwift", | ||
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"), | ||
.product(name: "CustomDump", package: "swift-custom-dump"), | ||
.product(name: "CasePaths", package: "swift-case-paths"), | ||
"KlaviyoSDKDependencies", | ||
.product(name: "CombineSchedulers", package: "combine-schedulers"), | ||
"KlaviyoCore" | ||
"KlaviyoCore", | ||
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay") | ||
], | ||
exclude: [ | ||
"__Snapshots__" | ||
|
@@ -70,10 +69,24 @@ let package = Package( | |
name: "KlaviyoUITests", | ||
dependencies: [ | ||
"KlaviyoSwift", | ||
"KlaviyoCore" | ||
"KlaviyoCore", | ||
"KlaviyoSDKDependencies" | ||
]), | ||
.target( | ||
name: "KlaviyoSwiftExtension", | ||
dependencies: [], | ||
path: "Sources/KlaviyoSwiftExtension") | ||
path: "Sources/KlaviyoSwiftExtension"), | ||
|
||
// Vendorized Things | ||
.target( | ||
name: "KlaviyoSDKDependencies", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These will all be combined into one thing soon. |
||
dependencies: [], | ||
path: "Sources/KlaviyoSDKDependencies") | ||
]) | ||
|
||
for target in package.targets { | ||
target.swiftSettings = target.swiftSettings ?? [] | ||
target.swiftSettings?.append(contentsOf: [ | ||
.enableExperimentalFeature("StrictConcurrency") | ||
]) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// swift-tools-version:6.0 | ||
|
||
import CompilerPluginSupport | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "klaviyo-swift-sdk", | ||
platforms: [.iOS(.v15)], | ||
products: [ | ||
.library( | ||
name: "KlaviyoSwift", | ||
targets: ["KlaviyoSwift"]), | ||
.library( | ||
name: "KlaviyoUI", | ||
targets: ["KlaviyoUI"]), | ||
.library( | ||
name: "KlaviyoSwiftExtension", | ||
targets: ["KlaviyoSwiftExtension"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.10.0"), | ||
.package(url: "https://github.com/pointfreeco/combine-schedulers", from: "1.0.2"), | ||
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.3.0") | ||
], | ||
targets: [ | ||
.target( | ||
name: "KlaviyoCore", | ||
dependencies: ["KlaviyoSDKDependencies"], | ||
path: "Sources/KlaviyoCore"), | ||
.testTarget( | ||
name: "KlaviyoCoreTests", | ||
dependencies: [ | ||
"KlaviyoCore", | ||
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"), | ||
"KlaviyoSDKDependencies" | ||
]), | ||
.target( | ||
name: "KlaviyoSwift", | ||
dependencies: [ | ||
"KlaviyoSDKDependencies", | ||
"KlaviyoCore" | ||
], | ||
path: "Sources/KlaviyoSwift", | ||
resources: [.copy("PrivacyInfo.xcprivacy")]), | ||
.testTarget( | ||
name: "KlaviyoSwiftTests", | ||
dependencies: [ | ||
"KlaviyoSwift", | ||
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"), | ||
"KlaviyoSDKDependencies", | ||
.product(name: "CombineSchedulers", package: "combine-schedulers"), | ||
"KlaviyoCore", | ||
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay") | ||
], | ||
exclude: [ | ||
"__Snapshots__" | ||
]), | ||
.target( | ||
name: "KlaviyoUI", | ||
dependencies: ["KlaviyoSwift"], | ||
path: "Sources/KlaviyoUI", | ||
resources: [.process("KlaviyoWebView/Resources")]), | ||
.testTarget( | ||
name: "KlaviyoUITests", | ||
dependencies: [ | ||
"KlaviyoSwift", | ||
"KlaviyoCore", | ||
"KlaviyoSDKDependencies" | ||
]), | ||
.target( | ||
name: "KlaviyoSwiftExtension", | ||
dependencies: [], | ||
path: "Sources/KlaviyoSwiftExtension"), | ||
|
||
// Vendorized Things | ||
.target( | ||
name: "KlaviyoSDKDependencies", | ||
dependencies: [], | ||
path: "Sources/KlaviyoSDKDependencies") | ||
], | ||
swiftLanguageModes: [.v6]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test results need to be unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ripped these changes into my Github actions deprecation branch which has since been merged to master so if you were to rebase/merge changes to this branch the swift.yml and makefile changes would likely match master now