Build Information
Successful build of MacPreviewUtils, reference 1.0.0 (3d5259
), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 14:37:20 UTC.
Swift 6 data race errors: 12
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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.58.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/insidegui/MacPreviewUtils.git
Reference: 1.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/insidegui/MacPreviewUtils
* tag 1.0.0 -> FETCH_HEAD
HEAD is now at 3d52597 Make NSScreen extension public
Cloned https://github.com/insidegui/MacPreviewUtils.git
Revision (git rev-parse @):
3d52597e5b6b65698b96e037539d2058c4668815
SUCCESS checkout https://github.com/insidegui/MacPreviewUtils.git at 1.0.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": "macpreviewutils",
"name": "MacPreviewUtils",
"url": "https://github.com/insidegui/MacPreviewUtils.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/MacPreviewUtils",
"dependencies": [
]
}
]
}
Fetching https://github.com/insidegui/MacPreviewUtils.git
[1/216] Fetching macpreviewutils
Fetched https://github.com/insidegui/MacPreviewUtils.git from cache (1.24s)
Creating working copy for https://github.com/insidegui/MacPreviewUtils.git
Working copy of https://github.com/insidegui/MacPreviewUtils.git resolved at 1.0.0 (3d52597)
warning: '.resolve-product-dependencies': dependency 'macpreviewutils' 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/insidegui/MacPreviewUtils.git
{
"dependencies" : [
],
"manifest_display_name" : "MacPreviewUtils",
"name" : "MacPreviewUtils",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "11.0"
}
],
"products" : [
{
"name" : "MacPreviewUtils",
"targets" : [
"MacPreviewUtils",
"MacPreviewUtilsObjC"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "MacPreviewUtilsObjC",
"module_type" : "ClangTarget",
"name" : "MacPreviewUtilsObjC",
"path" : "Sources/MacPreviewUtilsObjC",
"product_memberships" : [
"MacPreviewUtils"
],
"sources" : [
"FixTranslucencyInPreviews.m"
],
"target_dependencies" : [
"MacPreviewUtils"
],
"type" : "library"
},
{
"c99name" : "MacPreviewUtils",
"module_type" : "SwiftTarget",
"name" : "MacPreviewUtils",
"path" : "Sources/MacPreviewUtils",
"product_memberships" : [
"MacPreviewUtils"
],
"sources" : [
"Helpers/MacPreviewUtilsWindow.swift",
"Helpers/NSApplication+ActivatePreview.swift",
"Helpers/PreviewWindow.swift",
"Helpers/RuntimeWarnings.swift",
"Helpers/ViewModifier+Warning.swift",
"Logging/PreviewConsoleModifier.swift",
"Logging/PreviewConsoleView.swift",
"Logging/ProcessPipe.swift",
"PinToDisplay.swift",
"ProcessInfo+Preview.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/3] Write sources
[1/3] Write swift-version--7754E27361AE5C74.txt
[3/13] Compiling MacPreviewUtils ProcessPipe.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/ProcessPipe.swift:19:16: warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | @available(macOS 12.0, *)
6 | final class ProcessPipe {
| `- note: class 'ProcessPipe' does not conform to the 'Sendable' protocol
7 |
8 | enum MessageSource: Int {
:
17 | }
18 |
19 | static let current = ProcessPipe()
| |- warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'current' 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
20 |
21 | private(set) var messages = [Message]()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/ProcessPipe.swift:31: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
29 | activated = true
30 |
31 | 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
32 | await read(stdoutPipe, as: .stdout)
| `- note: closure captures 'self' which is accessible to code in the current task
33 | }
34 | }
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/ProcessPipe.swift:49:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
47 |
48 | await MainActor.run {
49 | newMessage.send(message)
| |- 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
50 | messages.append(message)
51 | }
[4/13] Compiling MacPreviewUtils PinToDisplay.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:59:16: warning: static property 'mainDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
57 | public extension DisplaySelector {
58 | /// A predicate that matches the Mac's current main display.
59 | static let mainDisplay: DisplaySelector = {
| |- warning: static property 'mainDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'mainDisplay' 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
60 | DisplaySelector { $0 == NSScreen.main }
61 | }()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:64:16: warning: static property 'externalDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
62 | /// A predicate that matches the first external display that's connected to the Mac.
63 | /// "External display" is any display that's not the current main display for the Mac.
64 | static let externalDisplay: DisplaySelector = {
| |- warning: static property 'externalDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'externalDisplay' 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
65 | DisplaySelector { $0 != NSScreen.main }
66 | }()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:68:16: warning: static property 'sidecarDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
66 | }()
67 | /// A predicate that matches the first Sidecar display that's available.
68 | static let sidecarDisplay: DisplaySelector = "sidecar"
| |- warning: static property 'sidecarDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'sidecarDisplay' 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
69 | /// A predicate that matches the built-in display on Mac laptops.
70 | static let builtInDisplay: DisplaySelector = "built-in"
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:70:16: warning: static property 'builtInDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
68 | static let sidecarDisplay: DisplaySelector = "sidecar"
69 | /// A predicate that matches the built-in display on Mac laptops.
70 | static let builtInDisplay: DisplaySelector = "built-in"
| |- warning: static property 'builtInDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'builtInDisplay' 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
71 | }
72 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:87:27: warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
85 |
86 | /// The preview will only be shown pinned to the specified display when it's running in interactive mode (play button in Xcode's canvas).
87 | public static let interactiveOnly = Options(rawValue: 1 << 0)
| |- warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'interactiveOnly' 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
88 |
89 | /// The preview window will ignore safe areas like the Dock and Menu Bar.
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:93:27: warning: static property 'ignoreSafeArea' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
91 | /// - note: If you'd like to have an interactive preview that overlaps with the macOS Menu Bar,
92 | /// you must set both ``ignoreSafeArea`` and ``hideTitleBar``.
93 | public static let ignoreSafeArea = Options(rawValue: 1 << 1)
| |- warning: static property 'ignoreSafeArea' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ignoreSafeArea' 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
94 |
95 | /// The preview window will have its title bar hidden when running in interactive mode.
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:99:27: warning: static property 'hideTitleBar' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
97 | /// - note: If you'd like to have an interactive preview that overlaps with the macOS Menu Bar,
98 | /// you must set both ``ignoreSafeArea`` and ``hideTitleBar``.
99 | public static let hideTitleBar = Options(rawValue: 1 << 2)
| |- warning: static property 'hideTitleBar' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'hideTitleBar' 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
100 | }
101 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:194:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
192 |
193 | struct DisplaySelectorEnvironmentKey: EnvironmentKey {
194 | static var defaultValue = DisplaySelector.mainDisplay
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
195 | }
196 |
[5/14] Compiling MacPreviewUtils PreviewConsoleModifier.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/PreviewConsoleModifier.swift:39:27: warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PreviewConsoleModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
29 |
30 | /// Configures the behavior of ``PreviewConsoleModifier``.
31 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
32 | public let rawValue: UInt
33 |
:
37 |
38 | /// The preview console will only be shown when it's running in interactive mode (play button in Xcode's canvas).
39 | public static let interactiveOnly = Options(rawValue: 1 << 0)
| |- warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PreviewConsoleModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'interactiveOnly' 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
40 | }
41 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/ProcessPipe.swift:19:16: warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | @available(macOS 12.0, *)
6 | final class ProcessPipe {
| `- note: class 'ProcessPipe' does not conform to the 'Sendable' protocol
7 |
8 | enum MessageSource: Int {
:
17 | }
18 |
19 | static let current = ProcessPipe()
| |- warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'current' 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
20 |
21 | private(set) var messages = [Message]()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:59:16: warning: static property 'mainDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
57 | public extension DisplaySelector {
58 | /// A predicate that matches the Mac's current main display.
59 | static let mainDisplay: DisplaySelector = {
| |- warning: static property 'mainDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'mainDisplay' 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
60 | DisplaySelector { $0 == NSScreen.main }
61 | }()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:70:16: warning: static property 'builtInDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
68 | static let sidecarDisplay: DisplaySelector = "sidecar"
69 | /// A predicate that matches the built-in display on Mac laptops.
70 | static let builtInDisplay: DisplaySelector = "built-in"
| |- warning: static property 'builtInDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'builtInDisplay' 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
71 | }
72 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:87:27: warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
85 |
86 | /// The preview will only be shown pinned to the specified display when it's running in interactive mode (play button in Xcode's canvas).
87 | public static let interactiveOnly = Options(rawValue: 1 << 0)
| |- warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'interactiveOnly' 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
88 |
89 | /// The preview window will ignore safe areas like the Dock and Menu Bar.
[6/14] Compiling MacPreviewUtils ViewModifier+Warning.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Helpers/RuntimeWarnings.swift:33:7: warning: let 'rw' is not concurrency-safe because non-'Sendable' type '(dso: UnsafeMutableRawPointer, log: OSLog)' may have shared mutable state; this is an error in the Swift 6 language mode
31 | //
32 | // Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc
33 | let rw = (
| |- warning: let 'rw' is not concurrency-safe because non-'Sendable' type '(dso: UnsafeMutableRawPointer, log: OSLog)' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'rw' 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
34 | dso: { () -> UnsafeMutableRawPointer in
35 | var info = Dl_info()
[7/14] Compiling MacPreviewUtils PreviewWindow.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Helpers/PreviewWindow.swift:13:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | private struct PreviewWindowEnvironmentKey: EnvironmentKey {
13 | static var defaultValue: NSWindow?
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
14 | }
15 |
[8/14] Compiling MacPreviewUtils RuntimeWarnings.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Helpers/RuntimeWarnings.swift:33:7: warning: let 'rw' is not concurrency-safe because non-'Sendable' type '(dso: UnsafeMutableRawPointer, log: OSLog)' may have shared mutable state; this is an error in the Swift 6 language mode
31 | //
32 | // Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc
33 | let rw = (
| |- warning: let 'rw' is not concurrency-safe because non-'Sendable' type '(dso: UnsafeMutableRawPointer, log: OSLog)' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'rw' 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
34 | dso: { () -> UnsafeMutableRawPointer in
35 | var info = Dl_info()
[9/14] Compiling MacPreviewUtils NSApplication+ActivatePreview.swift
[10/14] Compiling MacPreviewUtils PreviewConsoleView.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/ProcessPipe.swift:19:16: warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | @available(macOS 12.0, *)
6 | final class ProcessPipe {
| `- note: class 'ProcessPipe' does not conform to the 'Sendable' protocol
7 |
8 | enum MessageSource: Int {
:
17 | }
18 |
19 | static let current = ProcessPipe()
| |- warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'current' 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
20 |
21 | private(set) var messages = [Message]()
[11/14] Emitting module MacPreviewUtils
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Helpers/PreviewWindow.swift:13:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | private struct PreviewWindowEnvironmentKey: EnvironmentKey {
13 | static var defaultValue: NSWindow?
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
14 | }
15 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Helpers/RuntimeWarnings.swift:33:7: warning: let 'rw' is not concurrency-safe because non-'Sendable' type '(dso: UnsafeMutableRawPointer, log: OSLog)' may have shared mutable state; this is an error in the Swift 6 language mode
31 | //
32 | // Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc
33 | let rw = (
| |- warning: let 'rw' is not concurrency-safe because non-'Sendable' type '(dso: UnsafeMutableRawPointer, log: OSLog)' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'rw' 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
34 | dso: { () -> UnsafeMutableRawPointer in
35 | var info = Dl_info()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/PreviewConsoleModifier.swift:39:27: warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PreviewConsoleModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
29 |
30 | /// Configures the behavior of ``PreviewConsoleModifier``.
31 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
32 | public let rawValue: UInt
33 |
:
37 |
38 | /// The preview console will only be shown when it's running in interactive mode (play button in Xcode's canvas).
39 | public static let interactiveOnly = Options(rawValue: 1 << 0)
| |- warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PreviewConsoleModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'interactiveOnly' 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
40 | }
41 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/Logging/ProcessPipe.swift:19:16: warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | @available(macOS 12.0, *)
6 | final class ProcessPipe {
| `- note: class 'ProcessPipe' does not conform to the 'Sendable' protocol
7 |
8 | enum MessageSource: Int {
:
17 | }
18 |
19 | static let current = ProcessPipe()
| |- warning: static property 'current' is not concurrency-safe because non-'Sendable' type 'ProcessPipe' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'current' 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
20 |
21 | private(set) var messages = [Message]()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:59:16: warning: static property 'mainDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
57 | public extension DisplaySelector {
58 | /// A predicate that matches the Mac's current main display.
59 | static let mainDisplay: DisplaySelector = {
| |- warning: static property 'mainDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'mainDisplay' 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
60 | DisplaySelector { $0 == NSScreen.main }
61 | }()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:64:16: warning: static property 'externalDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
62 | /// A predicate that matches the first external display that's connected to the Mac.
63 | /// "External display" is any display that's not the current main display for the Mac.
64 | static let externalDisplay: DisplaySelector = {
| |- warning: static property 'externalDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'externalDisplay' 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
65 | DisplaySelector { $0 != NSScreen.main }
66 | }()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:68:16: warning: static property 'sidecarDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
66 | }()
67 | /// A predicate that matches the first Sidecar display that's available.
68 | static let sidecarDisplay: DisplaySelector = "sidecar"
| |- warning: static property 'sidecarDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'sidecarDisplay' 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
69 | /// A predicate that matches the built-in display on Mac laptops.
70 | static let builtInDisplay: DisplaySelector = "built-in"
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:70:16: warning: static property 'builtInDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
27 |
28 | /// Type used to filter the available displays on a Mac in order to select a given display for SwiftUI previews.
29 | public struct DisplaySelector: ExpressibleByStringLiteral {
| `- note: consider making struct 'DisplaySelector' conform to the 'Sendable' protocol
30 |
31 | /// The closure that's executed for each available display.
:
68 | static let sidecarDisplay: DisplaySelector = "sidecar"
69 | /// A predicate that matches the built-in display on Mac laptops.
70 | static let builtInDisplay: DisplaySelector = "built-in"
| |- warning: static property 'builtInDisplay' is not concurrency-safe because non-'Sendable' type 'DisplaySelector' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'builtInDisplay' 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
71 | }
72 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:87:27: warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
85 |
86 | /// The preview will only be shown pinned to the specified display when it's running in interactive mode (play button in Xcode's canvas).
87 | public static let interactiveOnly = Options(rawValue: 1 << 0)
| |- warning: static property 'interactiveOnly' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'interactiveOnly' 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
88 |
89 | /// The preview window will ignore safe areas like the Dock and Menu Bar.
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:93:27: warning: static property 'ignoreSafeArea' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
91 | /// - note: If you'd like to have an interactive preview that overlaps with the macOS Menu Bar,
92 | /// you must set both ``ignoreSafeArea`` and ``hideTitleBar``.
93 | public static let ignoreSafeArea = Options(rawValue: 1 << 1)
| |- warning: static property 'ignoreSafeArea' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ignoreSafeArea' 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
94 |
95 | /// The preview window will have its title bar hidden when running in interactive mode.
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:99:27: warning: static property 'hideTitleBar' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
77 |
78 | /// Configures the behavior of the ``PinToDisplayModifier``.
79 | public struct Options: OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
80 | public let rawValue: UInt
81 |
:
97 | /// - note: If you'd like to have an interactive preview that overlaps with the macOS Menu Bar,
98 | /// you must set both ``ignoreSafeArea`` and ``hideTitleBar``.
99 | public static let hideTitleBar = Options(rawValue: 1 << 2)
| |- warning: static property 'hideTitleBar' is not concurrency-safe because non-'Sendable' type 'PinToDisplayModifier.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'hideTitleBar' 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
100 | }
101 |
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/PinToDisplay.swift:194:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
192 |
193 | struct DisplaySelectorEnvironmentKey: EnvironmentKey {
194 | static var defaultValue = DisplaySelector.mainDisplay
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
195 | }
196 |
[12/14] Compiling MacPreviewUtils MacPreviewUtilsWindow.swift
[13/14] Compiling MacPreviewUtils ProcessInfo+Preview.swift
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/ProcessInfo+Preview.swift:25:38: warning: main actor-isolated property 'windows' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
23 | /// `PreviewHostingWindow` is used for non-interactive previews, but this modifier requires interactive previews.
24 | /// This might break in the future since it relies on implementation details of SwiftUI previews.
25 | return !NSApplication.shared.windows.contains(where: { $0.className.contains("PreviewHostingWindow") })
| `- warning: main actor-isolated property 'windows' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | #else
27 | return false
AppKit.NSApplication:69:25: note: property declared here
67 | open func enumerateWindowsWithOptions(_ options: NSApplication.WindowListOptions = [], usingBlock block: (NSWindow, UnsafeMutablePointer<ObjCBool>) -> Void)
68 | open func preventWindowOrdering()
69 | @MainActor open var windows: [NSWindow] { get }
| `- note: property declared here
70 | open func setWindowsNeedUpdate(_ needUpdate: Bool)
71 | open func updateWindows()
/Users/admin/builder/spi-builder-workspace/Sources/MacPreviewUtils/ProcessInfo+Preview.swift:25:31: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
23 | /// `PreviewHostingWindow` is used for non-interactive previews, but this modifier requires interactive previews.
24 | /// This might break in the future since it relies on implementation details of SwiftUI previews.
25 | return !NSApplication.shared.windows.contains(where: { $0.className.contains("PreviewHostingWindow") })
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | #else
27 | return false
AppKit.NSApplication:2:20: note: class property declared here
1 | @MainActor open class NSApplication : NSResponder, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElementProtocol, NSAccessibilityProtocol {
2 | open class var shared: NSApplication { get }
| `- note: class property declared here
3 | @available(swift, obsoleted: 3, renamed: "shared")
4 | open class var sharedApplication: NSApplication { get }
[13/14] Compiling MacPreviewUtilsObjC FixTranslucencyInPreviews.m
Build complete! (23.35s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "MacPreviewUtils",
"name" : "MacPreviewUtils",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "11.0"
}
],
"products" : [
{
"name" : "MacPreviewUtils",
"targets" : [
"MacPreviewUtils",
"MacPreviewUtilsObjC"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "MacPreviewUtilsObjC",
"module_type" : "ClangTarget",
"name" : "MacPreviewUtilsObjC",
"path" : "Sources/MacPreviewUtilsObjC",
"product_memberships" : [
"MacPreviewUtils"
],
"sources" : [
"FixTranslucencyInPreviews.m"
],
"target_dependencies" : [
"MacPreviewUtils"
],
"type" : "library"
},
{
"c99name" : "MacPreviewUtils",
"module_type" : "SwiftTarget",
"name" : "MacPreviewUtils",
"path" : "Sources/MacPreviewUtils",
"product_memberships" : [
"MacPreviewUtils"
],
"sources" : [
"Helpers/MacPreviewUtilsWindow.swift",
"Helpers/NSApplication+ActivatePreview.swift",
"Helpers/PreviewWindow.swift",
"Helpers/RuntimeWarnings.swift",
"Helpers/ViewModifier+Warning.swift",
"Logging/PreviewConsoleModifier.swift",
"Logging/PreviewConsoleView.swift",
"Logging/ProcessPipe.swift",
"PinToDisplay.swift",
"ProcessInfo+Preview.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
Done.