Build Information
Successful build of UpgradeAlert, reference main (9afcb0
), with Swift 6.0 for macOS (SPM) on 6 Nov 2024 18:29:16 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/sentryco/UpgradeAlert.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sentryco/UpgradeAlert
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 9afcb06 Minor tweaks
Cloned https://github.com/sentryco/UpgradeAlert.git
Revision (git rev-parse @):
9afcb0662e5408ddc7eeaf2be0836b2255447808
SUCCESS checkout https://github.com/sentryco/UpgradeAlert.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": "upgradealert",
"name": "UpgradeAlert",
"url": "https://github.com/sentryco/UpgradeAlert.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/UpgradeAlert",
"dependencies": [
]
}
]
}
Fetching https://github.com/sentryco/UpgradeAlert.git
[1/395] Fetching upgradealert
Fetched https://github.com/sentryco/UpgradeAlert.git from cache (0.98s)
Creating working copy for https://github.com/sentryco/UpgradeAlert.git
Working copy of https://github.com/sentryco/UpgradeAlert.git resolved at main (9afcb06)
warning: '.resolve-product-dependencies': dependency 'upgradealert' 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/sentryco/UpgradeAlert.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/14] Compiling UpgradeAlert AppInfo.swift
[4/14] Compiling UpgradeAlert LookupResult.swift
[5/14] Compiling UpgradeAlert UAOutcome.swift
[6/15] Compiling UpgradeAlert UAConfig.swift
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/helper/UAConfig.swift:63:22: warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
5 | * - Description: This struct configures the behavior and presentation of upgrade alerts within the application, allowing customization of alert titles, messages, and button labels based on the upgrade requirements.
6 | */
7 | public struct UAConfig {
| `- note: consider making struct 'UAConfig' conform to the 'Sendable' protocol
8 | /**
9 | * Determines whether the upgrade is mandatory or optional.
:
61 | * configuration is not necessary.
62 | */
63 | public static let defaultConfig: UAConfig = {
| |- warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultConfig' 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
64 | .init(
65 | isRequired: false, // By default, upgrades are not mandatory.
[7/15] Compiling UpgradeAlert UIApplication+Ext.swift
[8/15] Compiling UpgradeAlert UAError.swift
[9/15] Compiling UpgradeAlert ComparisonResult.swift
[10/15] Compiling UpgradeAlert Bundle+Ext.swift
[11/15] Compiling UpgradeAlert NSAlert+Ext.swift
[12/15] Compiling UpgradeAlert UIAlertController+Ext.swift
[13/15] Emitting module UpgradeAlert
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert+Variables.swift:55:22: warning: static property 'defaultComplete' is not concurrency-safe because non-'Sendable' type 'UpgradeAlert.Complete' (aka '(UAOutcome) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
53 | * interaction.
54 | */
55 | public static let defaultComplete: Complete = { (outcome: UAOutcome) in
| |- warning: static property 'defaultComplete' is not concurrency-safe because non-'Sendable' type 'UpgradeAlert.Complete' (aka '(UAOutcome) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultComplete' 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
56 | Swift.print("default complete - outcome: \(String(describing: outcome))")
57 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert+Variables.swift:69:22: warning: static property 'config' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
67 | * - Note: By default, it uses the default configuration defined in UAConfig.
68 | */
69 | public static var config: UAConfig = .defaultConfig
| |- warning: static property 'config' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'config' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'config' 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
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/helper/UAConfig.swift:63:22: warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
5 | * - Description: This struct configures the behavior and presentation of upgrade alerts within the application, allowing customization of alert titles, messages, and button labels based on the upgrade requirements.
6 | */
7 | public struct UAConfig {
| `- note: consider making struct 'UAConfig' conform to the 'Sendable' protocol
8 | /**
9 | * Determines whether the upgrade is mandatory or optional.
:
61 | * configuration is not necessary.
62 | */
63 | public static let defaultConfig: UAConfig = {
| |- warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultConfig' 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
64 | .init(
65 | isRequired: false, // By default, upgrades are not mandatory.
[14/15] Compiling UpgradeAlert UpgradeAlert+Variables.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert+Variables.swift:55:22: warning: static property 'defaultComplete' is not concurrency-safe because non-'Sendable' type 'UpgradeAlert.Complete' (aka '(UAOutcome) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
53 | * interaction.
54 | */
55 | public static let defaultComplete: Complete = { (outcome: UAOutcome) in
| |- warning: static property 'defaultComplete' is not concurrency-safe because non-'Sendable' type 'UpgradeAlert.Complete' (aka '(UAOutcome) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultComplete' 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
56 | Swift.print("default complete - outcome: \(String(describing: outcome))")
57 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert+Variables.swift:69:22: warning: static property 'config' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
67 | * - Note: By default, it uses the default configuration defined in UAConfig.
68 | */
69 | public static var config: UAConfig = .defaultConfig
| |- warning: static property 'config' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'config' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'config' 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
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/helper/UAConfig.swift:63:22: warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
5 | * - Description: This struct configures the behavior and presentation of upgrade alerts within the application, allowing customization of alert titles, messages, and button labels based on the upgrade requirements.
6 | */
7 | public struct UAConfig {
| `- note: consider making struct 'UAConfig' conform to the 'Sendable' protocol
8 | /**
9 | * Determines whether the upgrade is mandatory or optional.
:
61 | * configuration is not necessary.
62 | */
63 | public static let defaultConfig: UAConfig = {
| |- warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultConfig' 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
64 | .init(
65 | isRequired: false, // By default, upgrades are not mandatory.
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:48:16: warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 | error == nil // Check if there is no error
47 | else {
48 | complete?(.error(error: error ?? .bundleErr(desc: "Err, bundle.version"))); // If there is an error, complete with error
| |- warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') 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'
49 | return // Return from the function
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:48:16: warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in an isolated closure; this is an error in the Swift 6 language mode
46 | error == nil // Check if there is no error
47 | else {
48 | complete?(.error(error: error ?? .bundleErr(desc: "Err, bundle.version"))); // If there is an error, complete with error
| |- warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
49 | return // Return from the function
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:30: warning: capture of 'appInfo' with non-sendable type 'AppInfo' in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| `- warning: capture of 'appInfo' with non-sendable type 'AppInfo' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/helper/AppInfo.swift:17:15: note: consider making struct 'AppInfo' conform to the 'Sendable' protocol
15 | * - Fixme: ⚠️️ Add more detailed documentation for this struct and its properties.
16 | */
17 | public struct AppInfo: Decodable {
| `- note: consider making struct 'AppInfo' conform to the 'Sendable' protocol
18 | /**
19 | * The current version of the application.
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:49: warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| |- warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') 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'
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:103:13: warning: capture of 'completion' with non-sendable type '((AppInfo?, UAError?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 | throw NSError(domain: "no app info", code: 0) // If there is no app info, throw an NSError with the description "no app info"
102 | }
103 | completion?(info, nil)
| |- warning: capture of 'completion' with non-sendable type '((AppInfo?, UAError?) -> Void)?' 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'
104 | } catch {
105 | // Handle potential errors during data fetching and decoding
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:158:15: warning: call to main actor-isolated static method 'present(question:text:okTitle:cancelTitle:view:complete:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
131 | * - complete: called after user press cancel or ok button ( A closure that is called when the user interacts with the alert. It returns an optional Complete object that describes the user's action (e.g., whether they chose to update now, update later, or encountered an error)
132 | */
133 | public static func showAlert(appInfo: AppInfo, complete: Complete? = defaultComplete) { // Fix mark ios
| `- note: add '@MainActor' to make static method 'showAlert(appInfo:complete:)' part of global actor 'MainActor'
134 | #if os(iOS)
135 | // Create an alert with the app information
:
156 | alert.present()
157 | #elseif os(macOS)
158 | NSAlert.present(
| `- warning: call to main actor-isolated static method 'present(question:text:okTitle:cancelTitle:view:complete:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
159 | question: config.alertTitle, // Set the alert question from the config
160 | text: config.alertMessage(nil, appInfo.version), // Set the alert text from the config and the app version
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/ext/NSAlert+Ext.swift:26:25: note: calls to static method 'present(question:text:okTitle:cancelTitle:view:complete:)' from outside of its actor context are implicitly asynchronous
24 | * the user clicked the OK button and false otherwise.
25 | */
26 | internal static func present(question: String, text: String, okTitle: String? = "OK", cancelTitle: String? = "Cancel", view: NSView? = nil, complete: ((_ answer: Bool) -> Void)?) {
| `- note: calls to static method 'present(question:text:okTitle:cancelTitle:view:complete:)' from outside of its actor context are implicitly asynchronous
27 | let alert: NSAlert = .init() // Initializes a new NSAlert object.
28 | alert.messageText = question // Sets the primary message text of the alert.
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:30: warning: sending 'appInfo' risks causing data races; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| |- warning: sending 'appInfo' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'appInfo' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:49: warning: sending 'complete' risks causing data races; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| |- warning: sending 'complete' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'complete' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:158:15: warning: sending task-isolated value of type '(Bool) -> Void' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
156 | alert.present()
157 | #elseif os(macOS)
158 | NSAlert.present(
| `- warning: sending task-isolated value of type '(Bool) -> Void' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
159 | question: config.alertTitle, // Set the alert question from the config
160 | text: config.alertMessage(nil, appInfo.version), // Set the alert text from the config and the app version
[15/15] Compiling UpgradeAlert UpgradeAlert.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert+Variables.swift:55:22: warning: static property 'defaultComplete' is not concurrency-safe because non-'Sendable' type 'UpgradeAlert.Complete' (aka '(UAOutcome) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
53 | * interaction.
54 | */
55 | public static let defaultComplete: Complete = { (outcome: UAOutcome) in
| |- warning: static property 'defaultComplete' is not concurrency-safe because non-'Sendable' type 'UpgradeAlert.Complete' (aka '(UAOutcome) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultComplete' 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
56 | Swift.print("default complete - outcome: \(String(describing: outcome))")
57 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert+Variables.swift:69:22: warning: static property 'config' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
67 | * - Note: By default, it uses the default configuration defined in UAConfig.
68 | */
69 | public static var config: UAConfig = .defaultConfig
| |- warning: static property 'config' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'config' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'config' 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
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/helper/UAConfig.swift:63:22: warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
5 | * - Description: This struct configures the behavior and presentation of upgrade alerts within the application, allowing customization of alert titles, messages, and button labels based on the upgrade requirements.
6 | */
7 | public struct UAConfig {
| `- note: consider making struct 'UAConfig' conform to the 'Sendable' protocol
8 | /**
9 | * Determines whether the upgrade is mandatory or optional.
:
61 | * configuration is not necessary.
62 | */
63 | public static let defaultConfig: UAConfig = {
| |- warning: static property 'defaultConfig' is not concurrency-safe because non-'Sendable' type 'UAConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultConfig' 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
64 | .init(
65 | isRequired: false, // By default, upgrades are not mandatory.
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:48:16: warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 | error == nil // Check if there is no error
47 | else {
48 | complete?(.error(error: error ?? .bundleErr(desc: "Err, bundle.version"))); // If there is an error, complete with error
| |- warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') 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'
49 | return // Return from the function
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:48:16: warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in an isolated closure; this is an error in the Swift 6 language mode
46 | error == nil // Check if there is no error
47 | else {
48 | complete?(.error(error: error ?? .bundleErr(desc: "Err, bundle.version"))); // If there is an error, complete with error
| |- warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
49 | return // Return from the function
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:30: warning: capture of 'appInfo' with non-sendable type 'AppInfo' in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| `- warning: capture of 'appInfo' with non-sendable type 'AppInfo' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/helper/AppInfo.swift:17:15: note: consider making struct 'AppInfo' conform to the 'Sendable' protocol
15 | * - Fixme: ⚠️️ Add more detailed documentation for this struct and its properties.
16 | */
17 | public struct AppInfo: Decodable {
| `- note: consider making struct 'AppInfo' conform to the 'Sendable' protocol
18 | /**
19 | * The current version of the application.
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:49: warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| |- warning: capture of 'complete' with non-sendable type 'UpgradeAlert.Complete?' (aka 'Optional<(UAOutcome) -> ()>') 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'
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:103:13: warning: capture of 'completion' with non-sendable type '((AppInfo?, UAError?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 | throw NSError(domain: "no app info", code: 0) // If there is no app info, throw an NSError with the description "no app info"
102 | }
103 | completion?(info, nil)
| |- warning: capture of 'completion' with non-sendable type '((AppInfo?, UAError?) -> Void)?' 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'
104 | } catch {
105 | // Handle potential errors during data fetching and decoding
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:158:15: warning: call to main actor-isolated static method 'present(question:text:okTitle:cancelTitle:view:complete:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
131 | * - complete: called after user press cancel or ok button ( A closure that is called when the user interacts with the alert. It returns an optional Complete object that describes the user's action (e.g., whether they chose to update now, update later, or encountered an error)
132 | */
133 | public static func showAlert(appInfo: AppInfo, complete: Complete? = defaultComplete) { // Fix mark ios
| `- note: add '@MainActor' to make static method 'showAlert(appInfo:complete:)' part of global actor 'MainActor'
134 | #if os(iOS)
135 | // Create an alert with the app information
:
156 | alert.present()
157 | #elseif os(macOS)
158 | NSAlert.present(
| `- warning: call to main actor-isolated static method 'present(question:text:okTitle:cancelTitle:view:complete:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
159 | question: config.alertTitle, // Set the alert question from the config
160 | text: config.alertMessage(nil, appInfo.version), // Set the alert text from the config and the app version
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/ext/NSAlert+Ext.swift:26:25: note: calls to static method 'present(question:text:okTitle:cancelTitle:view:complete:)' from outside of its actor context are implicitly asynchronous
24 | * the user clicked the OK button and false otherwise.
25 | */
26 | internal static func present(question: String, text: String, okTitle: String? = "OK", cancelTitle: String? = "Cancel", view: NSView? = nil, complete: ((_ answer: Bool) -> Void)?) {
| `- note: calls to static method 'present(question:text:okTitle:cancelTitle:view:complete:)' from outside of its actor context are implicitly asynchronous
27 | let alert: NSAlert = .init() // Initializes a new NSAlert object.
28 | alert.messageText = question // Sets the primary message text of the alert.
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:30: warning: sending 'appInfo' risks causing data races; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| |- warning: sending 'appInfo' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'appInfo' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:65:49: warning: sending 'complete' risks causing data races; this is an error in the Swift 6 language mode
63 | // If an update is needed, show an alert on the main thread
64 | DispatchQueue.main.async {
65 | Self.showAlert(appInfo: appInfo, complete: complete)
| |- warning: sending 'complete' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'complete' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/UpgradeAlert/UpgradeAlert.swift:158:15: warning: sending task-isolated value of type '(Bool) -> Void' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
156 | alert.present()
157 | #elseif os(macOS)
158 | NSAlert.present(
| `- warning: sending task-isolated value of type '(Bool) -> Void' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
159 | question: config.alertTitle, // Set the alert question from the config
160 | text: config.alertMessage(nil, appInfo.version), // Set the alert text from the config and the app version
Build complete! (14.46s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "UpgradeAlert",
"name" : "UpgradeAlert",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "macos",
"version" : "12.0"
}
],
"products" : [
{
"name" : "UpgradeAlert",
"targets" : [
"UpgradeAlert"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "UpgradeAlertTests",
"module_type" : "SwiftTarget",
"name" : "UpgradeAlertTests",
"path" : "Tests/UpgradeAlertTests",
"sources" : [
"UpgradeAlertTests.swift"
],
"target_dependencies" : [
"UpgradeAlert"
],
"type" : "test"
},
{
"c99name" : "UpgradeAlert",
"module_type" : "SwiftTarget",
"name" : "UpgradeAlert",
"path" : "Sources/UpgradeAlert",
"product_memberships" : [
"UpgradeAlert"
],
"sources" : [
"UpgradeAlert+Variables.swift",
"UpgradeAlert.swift",
"ext/Bundle+Ext.swift",
"ext/NSAlert+Ext.swift",
"ext/UIAlertController+Ext.swift",
"ext/UIApplication+Ext.swift",
"helper/AppInfo.swift",
"helper/LookupResult.swift",
"helper/UAConfig.swift",
"helper/UAError.swift",
"helper/UAOutcome.swift",
"util/ComparisonResult.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Done.