Build Information
Successful build of DSFColorSampler with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 1
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/dagronf/DSFColorSampler.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/dagronf/DSFColorSampler
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at b7b082e Update podspec
Cloned https://github.com/dagronf/DSFColorSampler.git
Revision (git rev-parse @):
b7b082edd6e42e56d09a4e59c71ca40815ae258b
SUCCESS checkout https://github.com/dagronf/DSFColorSampler.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/dagronf/DSFColorSampler.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a 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-6F35C1178C84523A.txt
[3/4] Compiling DSFColorSampler DSFColorSampler.swift
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:131:21: warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
129 | // Private
130 |
131 | private static var shared = DSFColorSampler()
| |- warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
132 | private var screenPickerWindow: DSFColorSamplerWindow?
133 | private var selectionHandlerBlock: ColorSelectedBlock?
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:150:29: warning: call to main actor-isolated initializer 'init(contentRect:styleMask:backing:defer:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
| `- warning: call to main actor-isolated initializer 'init(contentRect:styleMask:backing:defer:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
152 | styleMask: .borderless,
:
235 | }
236 |
237 | override public init(
| `- note: calls to initializer 'init(contentRect:styleMask:backing:defer:)' from outside of its actor context are implicitly asynchronous
238 | contentRect: NSRect,
239 | styleMask style: NSWindow.StyleMask,
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:156:28: warning: main actor-isolated property 'delegate' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
:
154 | defer: true
155 | )
156 | self.screenPickerWindow!.delegate = self
| `- warning: main actor-isolated property 'delegate' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
157 |
158 | NotificationCenter.default.addObserver(
AppKit.NSWindow:57:30: note: mutation of this property is only permitted within the actor
55 | open var excludedFromWindowsMenu: Bool { get set }
56 | open var contentView: NSView? { get set }
57 | @MainActor weak open var delegate: (any NSWindowDelegate)? { get set }
| `- note: mutation of this property is only permitted within the actor
58 | open var windowNumber: Int { get }
59 | open var styleMask: NSWindow.StyleMask { get set }
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:172:24: warning: call to main actor-isolated instance method 'activate(ignoringOtherApps:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
:
170 | )
171 |
172 | NSApplication.shared.activate(ignoringOtherApps: true)
| `- warning: call to main actor-isolated instance method 'activate(ignoringOtherApps:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
173 | self.screenPickerWindow!.makeKeyAndOrderFront(self)
174 | self.screenPickerWindow!.orderedIndex = 0
AppKit.NSApplication:25:26: note: calls to instance method 'activate(ignoringOtherApps:)' from outside of its actor context are implicitly asynchronous
23 | open func deactivate()
24 | @available(macOS, introduced: 10.0, deprecated: 100000, message: "This method will be deprecated in a future release. Use NSApp.activate instead.")
25 | @MainActor open func activate(ignoringOtherApps flag: Bool)
| `- note: calls to instance method 'activate(ignoringOtherApps:)' from outside of its actor context are implicitly asynchronous
26 | @available(swift, obsoleted: 3, renamed: "activate(ignoringOtherApps:)")
27 | @available(macOS, introduced: 10.0, deprecated: 100000, message: "This method will be deprecated in a future release. Use NSApp.activate instead.")
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:172:17: warning: main actor-isolated class property 'shared' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
:
170 | )
171 |
172 | NSApplication.shared.activate(ignoringOtherApps: true)
| `- warning: main actor-isolated class property 'shared' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
173 | self.screenPickerWindow!.makeKeyAndOrderFront(self)
174 | self.screenPickerWindow!.orderedIndex = 0
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 }
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:173:28: warning: call to main actor-isolated instance method 'makeKeyAndOrderFront' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
:
171 |
172 | NSApplication.shared.activate(ignoringOtherApps: true)
173 | self.screenPickerWindow!.makeKeyAndOrderFront(self)
| `- warning: call to main actor-isolated instance method 'makeKeyAndOrderFront' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
174 | self.screenPickerWindow!.orderedIndex = 0
175 |
AppKit.NSWindow:142:26: note: calls to instance method 'makeKeyAndOrderFront' from outside of its actor context are implicitly asynchronous
140 | open var canHide: Bool { get set }
141 | open func center()
142 | @MainActor open func makeKeyAndOrderFront(_ sender: Any?)
| `- note: calls to instance method 'makeKeyAndOrderFront' from outside of its actor context are implicitly asynchronous
143 | open func orderFront(_ sender: Any?)
144 | open func orderBack(_ sender: Any?)
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:174:28: warning: main actor-isolated property 'orderedIndex' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
:
172 | NSApplication.shared.activate(ignoringOtherApps: true)
173 | self.screenPickerWindow!.makeKeyAndOrderFront(self)
174 | self.screenPickerWindow!.orderedIndex = 0
| `- warning: main actor-isolated property 'orderedIndex' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
175 |
176 | // prepare image for window's contentView in advance
AppKit.NSWindow:19:25: note: mutation of this property is only permitted within the actor
17 | @available(swift, obsoleted: 3, renamed: "isZoomable")
18 | open var zoomable: Bool { get }
19 | @MainActor open var orderedIndex: Int { get set }
| `- note: mutation of this property is only permitted within the actor
20 | open func setIsMiniaturized(_ flag: Bool)
21 | open func setIsVisible(_ flag: Bool)
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:177:28: warning: call to main actor-isolated instance method 'mouseMoved(with:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
147 | }
148 |
149 | func run() {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
150 | self.screenPickerWindow = DSFColorSamplerWindow(
151 | contentRect: NSRect(x: 0, y: 0, width: 125, height: 125),
:
175 |
176 | // prepare image for window's contentView in advance
177 | self.screenPickerWindow!.mouseMoved(with: NSEvent())
| `- warning: call to main actor-isolated instance method 'mouseMoved(with:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
178 | NSCursor.hide()
179 | }
:
252 | }
253 |
254 | override open func mouseMoved(with event: NSEvent) {
| `- note: calls to instance method 'mouseMoved(with:)' from outside of its actor context are implicitly asynchronous
255 | let point = NSEvent.mouseLocation
256 | let captureSize: CGFloat = self.frame.size.width / self.pixelZoom
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:173:28: warning: sending task-isolated value of type 'DSFColorSampler' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
171 |
172 | NSApplication.shared.activate(ignoringOtherApps: true)
173 | self.screenPickerWindow!.makeKeyAndOrderFront(self)
| `- warning: sending task-isolated value of type 'DSFColorSampler' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
174 | self.screenPickerWindow!.orderedIndex = 0
175 |
[4/4] Emitting module DSFColorSampler
/Users/admin/builder/spi-builder-workspace/Sources/DSFColorSampler/DSFColorSampler.swift:131:21: warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
129 | // Private
130 |
131 | private static var shared = DSFColorSampler()
| |- warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
132 | private var screenPickerWindow: DSFColorSamplerWindow?
133 | private var selectionHandlerBlock: ColorSelectedBlock?
Build complete! (22.41s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "DSFColorSampler",
"name" : "DSFColorSampler",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.13"
}
],
"products" : [
{
"name" : "DSFColorSampler",
"targets" : [
"DSFColorSampler"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "DSFColorSampler",
"module_type" : "SwiftTarget",
"name" : "DSFColorSampler",
"path" : "Sources/DSFColorSampler",
"product_memberships" : [
"DSFColorSampler"
],
"sources" : [
"DSFColorSampler.swift"
],
"type" : "library"
}
],
"tools_version" : "5.4"
}
Done.