Build Information
Successful build of iap-pure-client, reference 0.4.0 (e7f60d
), with Swift 6.0 for macOS (SPM) on 3 Nov 2024 14:30:44 UTC.
Swift 6 data race errors: 3
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/buhe/iap-pure-client.git
Reference: 0.4.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/buhe/iap-pure-client
* tag 0.4.0 -> FETCH_HEAD
HEAD is now at e7f60d7 Merge branch 'main' of https://github.com/buhe/iap-pure-client
Cloned https://github.com/buhe/iap-pure-client.git
Revision (git rev-parse @):
e7f60d71db3684f3dd0dd56a04556c220126fbe0
SUCCESS checkout https://github.com/buhe/iap-pure-client.git at 0.4.0
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "iap-pure-client",
"name": "iap-pure-client",
"url": "https://github.com/buhe/iap-pure-client.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/iap-pure-client",
"dependencies": [
]
}
]
}
Fetching https://github.com/buhe/iap-pure-client.git
[1/83] Fetching iap-pure-client
Fetched https://github.com/buhe/iap-pure-client.git from cache (0.68s)
Creating working copy for https://github.com/buhe/iap-pure-client.git
Working copy of https://github.com/buhe/iap-pure-client.git resolved at 0.4.0 (e7f60d7)
warning: '.resolve-product-dependencies': dependency 'iap-pure-client' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/buhe/iap-pure-client.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/7] Compiling IAP iap_pure_client.swift
[4/7] Compiling IAP IAPMaganer.swift
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:12:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPManager' may have shared mutable state; this is an error in the Swift 6 language mode
7 | import StoreKit
8 |
9 | public class IAPManager: NSObject, ObservableObject {
| `- note: class 'IAPManager' does not conform to the 'Sendable' protocol
10 |
11 | var callback: ((_ pid: String) -> Void)? = nil
12 | public static let shared = IAPManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | @Published public var products = [SKProduct]()
14 | fileprivate var productRequest: SKProductsRequest!
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:62:37: warning: mutation of captured var 'vaild' in concurrently-executing code; this is an error in the Swift 6 language mode
60 | if utcMilliseconds > expires {
61 | // timeout
62 | vaild = false
| `- warning: mutation of captured var 'vaild' in concurrently-executing code; this is an error in the Swift 6 language mode
63 | }
64 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:66:33: warning: mutation of captured var 'vaild' in concurrently-executing code; this is an error in the Swift 6 language mode
64 | } else {
65 | print("no latest_receipt_info. ")
66 | vaild = false
| `- warning: mutation of captured var 'vaild' in concurrently-executing code; this is an error in the Swift 6 language mode
67 | }
68 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:70:29: warning: mutation of captured var 'vaild' in concurrently-executing code; this is an error in the Swift 6 language mode
68 | } catch {
69 | print("Pasre server error: \(error)")
70 | vaild = false
| `- warning: mutation of captured var 'vaild' in concurrently-executing code; this is an error in the Swift 6 language mode
71 | }
72 | }
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:118:13: warning: capture of 'self' with non-sendable type 'IAPManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
7 | import StoreKit
8 |
9 | public class IAPManager: NSObject, ObservableObject {
| `- note: class 'IAPManager' does not conform to the 'Sendable' protocol
10 |
11 | var callback: ((_ pid: String) -> Void)? = nil
:
116 | }
117 | DispatchQueue.main.async {
118 | self.products = response.products
| `- warning: capture of 'self' with non-sendable type 'IAPManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPViewModel.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPViewModel' may have shared mutable state; this is an error in the Swift 6 language mode
6 | import SwiftUI
7 |
8 | public class IAPViewModel :ObservableObject {
| `- note: class 'IAPViewModel' does not conform to the 'Sendable' protocol
9 | @Published public var loading = false
10 |
11 | public static let shared: IAPViewModel = IAPViewModel()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPViewModel' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | }
13 |
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | }
117 | DispatchQueue.main.async {
118 | self.products = response.products
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
[5/7] Compiling IAP IAPViewModel.swift
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPViewModel.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPViewModel' may have shared mutable state; this is an error in the Swift 6 language mode
6 | import SwiftUI
7 |
8 | public class IAPViewModel :ObservableObject {
| `- note: class 'IAPViewModel' does not conform to the 'Sendable' protocol
9 | @Published public var loading = false
10 |
11 | public static let shared: IAPViewModel = IAPViewModel()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPViewModel' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | }
13 |
[6/7] Emitting module IAP
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPCache.swift:11:23: warning: static property 'five' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | public struct IAPCache {
11 | public static var five = IAPCache()
| |- warning: static property 'five' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'five' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'five' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | var cacheRetry: Int
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:12:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPManager' may have shared mutable state; this is an error in the Swift 6 language mode
7 | import StoreKit
8 |
9 | public class IAPManager: NSObject, ObservableObject {
| `- note: class 'IAPManager' does not conform to the 'Sendable' protocol
10 |
11 | var callback: ((_ pid: String) -> Void)? = nil
12 | public static let shared = IAPManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | @Published public var products = [SKProduct]()
14 | fileprivate var productRequest: SKProductsRequest!
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPViewModel.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPViewModel' may have shared mutable state; this is an error in the Swift 6 language mode
6 | import SwiftUI
7 |
8 | public class IAPViewModel :ObservableObject {
| `- note: class 'IAPViewModel' does not conform to the 'Sendable' protocol
9 | @Published public var loading = false
10 |
11 | public static let shared: IAPViewModel = IAPViewModel()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPViewModel' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | }
13 |
[7/7] Compiling IAP IAPCache.swift
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPCache.swift:11:23: warning: static property 'five' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | public struct IAPCache {
11 | public static var five = IAPCache()
| |- warning: static property 'five' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'five' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'five' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | var cacheRetry: Int
/Users/admin/builder/spi-builder-workspace/Sources/IAP/IAPMaganer.swift:12:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPManager' may have shared mutable state; this is an error in the Swift 6 language mode
7 | import StoreKit
8 |
9 | public class IAPManager: NSObject, ObservableObject {
| `- note: class 'IAPManager' does not conform to the 'Sendable' protocol
10 |
11 | var callback: ((_ pid: String) -> Void)? = nil
12 | public static let shared = IAPManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'IAPManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | @Published public var products = [SKProduct]()
14 | fileprivate var productRequest: SKProductsRequest!
Build complete! (11.91s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "iap-pure-client",
"name" : "iap-pure-client",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "macos",
"version" : "12.0"
}
],
"products" : [
{
"name" : "IAP",
"targets" : [
"IAP"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "iap_pure_clientTests",
"module_type" : "SwiftTarget",
"name" : "iap-pure-clientTests",
"path" : "Tests/iap-pure-clientTests",
"sources" : [
"iap_pure_clientTests.swift"
],
"target_dependencies" : [
"IAP"
],
"type" : "test"
},
{
"c99name" : "IAP",
"module_type" : "SwiftTarget",
"name" : "IAP",
"path" : "Sources/IAP",
"product_memberships" : [
"IAP"
],
"sources" : [
"IAPCache.swift",
"IAPMaganer.swift",
"IAPViewModel.swift",
"iap_pure_client.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7.1"
}
Done.