Build Information
Successful build of PortfolioKit, reference main (f9f9ea
), with Swift 6.0 for macOS (SPM) on 3 Nov 2024 23:07:27 UTC.
Swift 6 data race errors: 1
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/mcrich23/portfoliokit.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mcrich23/portfoliokit
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at f9f9ea4 Update PortfolioKit.swift
Cloned https://github.com/mcrich23/portfoliokit.git
Revision (git rev-parse @):
f9f9ea4f7a1d3fb41087b866fdbe5cc4bb892a11
SUCCESS checkout https://github.com/mcrich23/portfoliokit.git at main
========================================
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": "portfoliokit",
"name": "PortfolioKit",
"url": "https://github.com/mcrich23/portfoliokit.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/portfoliokit",
"dependencies": [
]
}
]
}
Fetching https://github.com/mcrich23/portfoliokit.git
[1/126] Fetching portfoliokit
Fetched https://github.com/mcrich23/portfoliokit.git from cache (1.18s)
Creating working copy for https://github.com/mcrich23/portfoliokit.git
Working copy of https://github.com/mcrich23/portfoliokit.git resolved at main (f9f9ea4)
warning: '.resolve-product-dependencies': dependency 'portfoliokit' 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/mcrich23/portfoliokit.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/6] Compiling PortfolioKit Data Types.swift
[4/6] Compiling PortfolioKit PortfolioKit.swift
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
18 | import StoreKit
19 |
20 | public class PortfolioKit: ObservableObject {
| `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
21 | var builtInStorekitEnabled: Bool {
22 | #if os(macOS)
:
26 | #endif
27 | }
28 | public static let shared = PortfolioKit()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' 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
29 | @Published public private(set) var portfolios: [Portfolio] = []
30 |
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:77:87: warning: capture of 'image' with non-sendable type 'PortfolioImage' (aka 'NSImage') in a `@Sendable` closure; this is an error in the Swift 6 language mode
75 | if let image {
76 | DispatchQueue.main.async {
77 | let newPortfolio = Portfolio(name: portfolio.name, image: image, url: url, urlButtonName: portfolio.urlButtonName, bundleID: portfolio.bundleId)
| `- warning: capture of 'image' with non-sendable type 'PortfolioImage' (aka 'NSImage') in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | self.portfolios.append(newPortfolio)
79 |
AppKit.NSImage:1:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
1 | open class NSImage : NSObject {
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
2 | public /*not inherited*/ init?(named name: NSImage.Name)
3 | @available(*, unavailable, renamed: "init(named:)", message: "Not available in Swift")
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:78:29: warning: capture of 'self' with non-sendable type 'PortfolioKit' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | import StoreKit
19 |
20 | public class PortfolioKit: ObservableObject {
| `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
21 | var builtInStorekitEnabled: Bool {
22 | #if os(macOS)
:
76 | DispatchQueue.main.async {
77 | let newPortfolio = Portfolio(name: portfolio.name, image: image, url: url, urlButtonName: portfolio.urlButtonName, bundleID: portfolio.bundleId)
78 | self.portfolios.append(newPortfolio)
| `- warning: capture of 'self' with non-sendable type 'PortfolioKit' in a `@Sendable` closure; this is an error in the Swift 6 language mode
79 |
80 | self.loadProduct(newPortfolio) { productViewController in
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:81:48: warning: capture of 'self' with non-sendable type 'PortfolioKit' in an isolated closure; this is an error in the Swift 6 language mode
18 | import StoreKit
19 |
20 | public class PortfolioKit: ObservableObject {
| `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
21 | var builtInStorekitEnabled: Bool {
22 | #if os(macOS)
:
79 |
80 | self.loadProduct(newPortfolio) { productViewController in
81 | if let index = self.portfolios.firstIndex(where: { $0.id == newPortfolio.id }) {
| `- warning: capture of 'self' with non-sendable type 'PortfolioKit' in an isolated closure; this is an error in the Swift 6 language mode
82 | #if os(iOS)
83 | self.portfolios[index].storekitProduct = productViewController
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:132:17: warning: capture of 'completion' with non-sendable type '(PortfolioImage?) -> Void' (aka '(Optional<NSImage>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
130 | URLSession.shared.dataTask(with: url) { data, response, error in
131 | guard let data = data, error == nil else {
132 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(PortfolioImage?) -> Void' (aka '(Optional<NSImage>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
133 | return
134 | }
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:60:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
58 |
59 | public func config(with url: URL, showCurrentApp: Bool = false) {
60 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | try await config(with: url, showCurrentApp: showCurrentApp)
| `- note: closure captures 'self' which is accessible to code in the current task
62 | }
63 | }
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:77:87: warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
75 | if let image {
76 | DispatchQueue.main.async {
77 | let newPortfolio = Portfolio(name: portfolio.name, image: image, url: url, urlButtonName: portfolio.urlButtonName, bundleID: portfolio.bundleId)
| |- warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'image' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
78 | self.portfolios.append(newPortfolio)
79 |
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:78:29: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
76 | DispatchQueue.main.async {
77 | let newPortfolio = Portfolio(name: portfolio.name, image: image, url: url, urlButtonName: portfolio.urlButtonName, bundleID: portfolio.bundleId)
78 | self.portfolios.append(newPortfolio)
| |- 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
79 |
80 | self.loadProduct(newPortfolio) { productViewController in
[5/6] Compiling PortfolioKit PortfolioView.swift
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
18 | import StoreKit
19 |
20 | public class PortfolioKit: ObservableObject {
| `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
21 | var builtInStorekitEnabled: Bool {
22 | #if os(macOS)
:
26 | #endif
27 | }
28 | public static let shared = PortfolioKit()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' 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
29 | @Published public private(set) var portfolios: [Portfolio] = []
30 |
[6/6] Emitting module PortfolioKit
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
18 | import StoreKit
19 |
20 | public class PortfolioKit: ObservableObject {
| `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
21 | var builtInStorekitEnabled: Bool {
22 | #if os(macOS)
:
26 | #endif
27 | }
28 | public static let shared = PortfolioKit()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' 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
29 | @Published public private(set) var portfolios: [Portfolio] = []
30 |
Build complete! (12.54s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "PortfolioKit",
"name" : "PortfolioKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "tvos",
"version" : "14.0"
}
],
"products" : [
{
"name" : "PortfolioKit",
"targets" : [
"PortfolioKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "PortfolioKitTests",
"module_type" : "SwiftTarget",
"name" : "PortfolioKitTests",
"path" : "Tests",
"sources" : [
"PackageKitTests/PackageKitTests.swift"
],
"target_dependencies" : [
"PortfolioKit"
],
"type" : "test"
},
{
"c99name" : "PortfolioKit",
"module_type" : "SwiftTarget",
"name" : "PortfolioKit",
"path" : "Sources",
"product_memberships" : [
"PortfolioKit"
],
"sources" : [
"PortfolioKit/Data Types.swift",
"PortfolioKit/PortfolioKit.swift",
"PortfolioKit/PortfolioView.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
Done.