The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of Noted, reference 2.2.1 (323d0f), with Swift 6.0 for macOS (SPM) on 16 Sep 2024 01:42:07 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ml-archive/Noted.git
Reference: 2.2.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/ml-archive/Noted
 * tag               2.2.1      -> FETCH_HEAD
HEAD is now at 323d0fb Merge pull request #23 from nodes-ios/feature/SPMsupport
Cloned https://github.com/ml-archive/Noted.git
Revision (git rev-parse @):
323d0fb906d593fb7d17ad176c65e3cc9e9b8b8b
SUCCESS checkout https://github.com/ml-archive/Noted.git at 2.2.1
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/ml-archive/Noted.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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-117DEE11B69C53C9.txt
[3/7] Compiling Noted NoteType.swift
[4/7] Compiling Noted Noted.swift
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:12:23: warning: static property 'defaultInstance' is not concurrency-safe because non-'Sendable' type 'Noted' may have shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class Noted {
   |              `- note: class 'Noted' does not conform to the 'Sendable' protocol
11 |
12 |     public static let defaultInstance = Noted()
   |                       |- warning: static property 'defaultInstance' is not concurrency-safe because non-'Sendable' type 'Noted' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'defaultInstance' with '@MainActor' if property should only be accessed from the main actor
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 |     private let notedQueue = DispatchQueue(label: "com.nodes.noted", attributes: .concurrent)
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:31:13: warning: capture of 'self' with non-sendable type 'Noted' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class Noted {
   |              `- note: class 'Noted' does not conform to the 'Sendable' protocol
11 |
12 |     public static let defaultInstance = Noted()
   :
29 |     public func add(observer: NoteObserver) {
30 |         notedQueue.async(group: nil, qos: .default, flags: .barrier) {
31 |             self._observers.add(observer)
   |             `- warning: capture of 'self' with non-sendable type 'Noted' in a `@Sendable` closure; this is an error in the Swift 6 language mode
32 |         }
33 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:31:33: warning: capture of 'observer' with non-sendable type 'any NoteObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
29 |     public func add(observer: NoteObserver) {
30 |         notedQueue.async(group: nil, qos: .default, flags: .barrier) {
31 |             self._observers.add(observer)
   |                                 `- warning: capture of 'observer' with non-sendable type 'any NoteObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
32 |         }
33 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteObserver.swift:11:17: note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteObserver: AnyObject {
   |                 `- note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
12 |     func didReceive(note: NoteType)
13 |     var noteFilter: NoteFilter { get }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:37:34: warning: capture of 'self' with non-sendable type 'Noted' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class Noted {
   |              `- note: class 'Noted' does not conform to the 'Sendable' protocol
11 |
12 |     public static let defaultInstance = Noted()
   :
35 |     public func remove(observer: NoteObserver) {
36 |         notedQueue.async(group: nil, qos: .default, flags: .barrier) {
37 |             if let foundEntry = (self._observers.allObjects).first(where: {$0 === observer}) {
   |                                  `- warning: capture of 'self' with non-sendable type 'Noted' in a `@Sendable` closure; this is an error in the Swift 6 language mode
38 |                 self._observers.remove(foundEntry)
39 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:37:83: warning: capture of 'observer' with non-sendable type 'any NoteObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 |     public func remove(observer: NoteObserver) {
36 |         notedQueue.async(group: nil, qos: .default, flags: .barrier) {
37 |             if let foundEntry = (self._observers.allObjects).first(where: {$0 === observer}) {
   |                                                                                   `- warning: capture of 'observer' with non-sendable type 'any NoteObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
38 |                 self._observers.remove(foundEntry)
39 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteObserver.swift:11:17: note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteObserver: AnyObject {
   |                 `- note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
12 |     func didReceive(note: NoteType)
13 |     var noteFilter: NoteFilter { get }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:37:83: warning: capture of 'observer' with non-sendable type 'any NoteObserver' in an isolated closure; this is an error in the Swift 6 language mode
35 |     public func remove(observer: NoteObserver) {
36 |         notedQueue.async(group: nil, qos: .default, flags: .barrier) {
37 |             if let foundEntry = (self._observers.allObjects).first(where: {$0 === observer}) {
   |                                                                                   `- warning: capture of 'observer' with non-sendable type 'any NoteObserver' in an isolated closure; this is an error in the Swift 6 language mode
38 |                 self._observers.remove(foundEntry)
39 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteObserver.swift:11:17: note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteObserver: AnyObject {
   |                 `- note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
12 |     func didReceive(note: NoteType)
13 |     var noteFilter: NoteFilter { get }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:46:29: warning: capture of 'self' with non-sendable type 'Noted' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class Noted {
   |              `- note: class 'Noted' does not conform to the 'Sendable' protocol
11 |
12 |     public static let defaultInstance = Noted()
   :
44 |     public func post(note: NoteType) {
45 |         notedQueue.async {
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
   |                             `- warning: capture of 'self' with non-sendable type 'Noted' in a `@Sendable` closure; this is an error in the Swift 6 language mode
47 |                 DispatchQueue.main.async {
48 |                     receiver.didReceive(note: note)
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:46:87: warning: capture of 'note' with non-sendable type 'any NoteType' in a `@Sendable` closure; this is an error in the Swift 6 language mode
44 |     public func post(note: NoteType) {
45 |         notedQueue.async {
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
   |                                                                                       `- warning: capture of 'note' with non-sendable type 'any NoteType' in a `@Sendable` closure; this is an error in the Swift 6 language mode
47 |                 DispatchQueue.main.async {
48 |                     receiver.didReceive(note: note)
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteType.swift:11:17: note: protocol 'NoteType' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteType { }
   |                 `- note: protocol 'NoteType' does not conform to the 'Sendable' protocol
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:46:87: warning: capture of 'note' with non-sendable type 'any NoteType' in an isolated closure; this is an error in the Swift 6 language mode
44 |     public func post(note: NoteType) {
45 |         notedQueue.async {
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
   |                                                                                       `- warning: capture of 'note' with non-sendable type 'any NoteType' in an isolated closure; this is an error in the Swift 6 language mode
47 |                 DispatchQueue.main.async {
48 |                     receiver.didReceive(note: note)
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteType.swift:11:17: note: protocol 'NoteType' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteType { }
   |                 `- note: protocol 'NoteType' does not conform to the 'Sendable' protocol
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:48:21: warning: capture of 'receiver' with non-sendable type 'any NoteObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
47 |                 DispatchQueue.main.async {
48 |                     receiver.didReceive(note: note)
   |                     `- warning: capture of 'receiver' with non-sendable type 'any NoteObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 |                 }
50 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteObserver.swift:11:17: note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteObserver: AnyObject {
   |                 `- note: protocol 'NoteObserver' does not conform to the 'Sendable' protocol
12 |     func didReceive(note: NoteType)
13 |     var noteFilter: NoteFilter { get }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:48:47: warning: capture of 'note' with non-sendable type 'any NoteType' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
47 |                 DispatchQueue.main.async {
48 |                     receiver.didReceive(note: note)
   |                                               `- warning: capture of 'note' with non-sendable type 'any NoteType' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 |                 }
50 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/NoteType.swift:11:17: note: protocol 'NoteType' does not conform to the 'Sendable' protocol
 9 | import Foundation
10 |
11 | public protocol NoteType { }
   |                 `- note: protocol 'NoteType' does not conform to the 'Sendable' protocol
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:48:21: warning: sending 'receiver' risks causing data races; this is an error in the Swift 6 language mode
45 |         notedQueue.async {
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
47 |                 DispatchQueue.main.async {
   |                                          `- note: access can happen concurrently
48 |                     receiver.didReceive(note: note)
   |                     |- warning: sending 'receiver' risks causing data races; this is an error in the Swift 6 language mode
   |                     `- note: 'receiver' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
49 |                 }
50 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:48:47: warning: sending 'note' risks causing data races; this is an error in the Swift 6 language mode
45 |         notedQueue.async {
46 |             for receiver in self.observers.filter({ !$0.noteFilter.shouldFilter(note: note) }) {
47 |                 DispatchQueue.main.async {
   |                                          `- note: access can happen concurrently
48 |                     receiver.didReceive(note: note)
   |                                               |- warning: sending 'note' risks causing data races; this is an error in the Swift 6 language mode
   |                                               `- note: 'note' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
49 |                 }
50 |             }
[5/7] Emitting module Noted
/Users/admin/builder/spi-builder-workspace/Sources/Noted/Noted.swift:12:23: warning: static property 'defaultInstance' is not concurrency-safe because non-'Sendable' type 'Noted' may have shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class Noted {
   |              `- note: class 'Noted' does not conform to the 'Sendable' protocol
11 |
12 |     public static let defaultInstance = Noted()
   |                       |- warning: static property 'defaultInstance' is not concurrency-safe because non-'Sendable' type 'Noted' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'defaultInstance' with '@MainActor' if property should only be accessed from the main actor
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 |     private let notedQueue = DispatchQueue(label: "com.nodes.noted", attributes: .concurrent)
[6/7] Compiling Noted NoteFilter.swift
[7/7] Compiling Noted NoteObserver.swift
Build complete! (7.63s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Noted",
  "name" : "Noted",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "8.0"
    }
  ],
  "products" : [
    {
      "name" : "Noted",
      "targets" : [
        "Noted"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "NotedTests",
      "module_type" : "SwiftTarget",
      "name" : "NotedTests",
      "path" : "NotedTests",
      "sources" : [
        "NotedTests.swift",
        "Test Objects/TestFilter.swift",
        "Test Objects/TestNote.swift",
        "Test Objects/TestNotification.swift",
        "Test Objects/TestObserver.swift"
      ],
      "target_dependencies" : [
        "Noted"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Noted",
      "module_type" : "SwiftTarget",
      "name" : "Noted",
      "path" : "Sources/Noted",
      "product_memberships" : [
        "Noted"
      ],
      "sources" : [
        "NoteFilter.swift",
        "NoteObserver.swift",
        "NoteType.swift",
        "Noted.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.