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 NetService, reference master (08e1f7), with Swift 6.0 for macOS (SPM) on 1 Nov 2024 10:44:59 UTC.

Swift 6 data race errors: 2

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/bouke/netservice.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/bouke/netservice
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 08e1f76 Merge pull request #41 from Bouke/fix/readcallback
Cloned https://github.com/bouke/netservice.git
Revision (git rev-parse @):
08e1f7663fd4b09b9f4ad165be89704c7cd2e3f8
SUCCESS checkout https://github.com/bouke/netservice.git at master
========================================
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": "netservice",
      "name": "NetService",
      "url": "https://github.com/bouke/netservice.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/netservice",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/bouke/netservice.git
[1/862] Fetching netservice
Fetched https://github.com/bouke/netservice.git from cache (0.84s)
Creating working copy for https://github.com/bouke/netservice.git
Working copy of https://github.com/bouke/netservice.git resolved at master (08e1f76)
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/bouke/netservice.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/7] Write sources
[2/7] Write dns-sd-entitlement.plist
[3/7] Write swift-version--7754E27361AE5C74.txt
[5/15] Compiling NetService Utils.swift
[6/15] Compiling NetService ServiceFlags.swift
[7/15] Compiling NetService FoundationCompat.swift
[8/15] Compiling NetService NetService.swift
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetService.swift:455:27: warning: static property 'noAutoRename' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
444 |
445 |     /// These constants specify options for a network service.
446 |     public struct Options: OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
447 |         public let rawValue: Int
448 |         public init(rawValue: Int) {
    :
453 |         ///
454 |         /// Not implemented.
455 |         public static let noAutoRename = Options(rawValue: 1)
    |                           |- warning: static property 'noAutoRename' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'noAutoRename' 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
456 |
457 |         /// Specifies that a TCP listener should be started for both IPv4 and IPv6 on the port specified by this service. If the listening port can't be opened, the service calls its delegate’s `netService(_:didNotPublish:)` method to report the error.
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetService.swift:464:27: warning: static property 'listenForConnections' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
444 |
445 |     /// These constants specify options for a network service.
446 |     public struct Options: OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
447 |         public let rawValue: Int
448 |         public init(rawValue: Int) {
    :
462 |         ///
463 |         /// Not implemented.
464 |         public static let listenForConnections = Options(rawValue: 2)
    |                           |- warning: static property 'listenForConnections' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'listenForConnections' 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
465 |     }
466 |
[9/15] Compiling NetService NetServiceBrowserDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetServiceBrowserDelegate.swift:4:44: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
  2 |
  3 | /// The `NetServiceBrowserDelegate` protocol defines the optional methods implemented by delegates of `NetServiceBrowser` objects.
  4 | public protocol NetServiceBrowserDelegate: class {
    |                                            `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
  5 |     /// Tells the delegate the sender found a domain.
  6 |     ///
[10/15] Compiling NetService NetServiceBrowser.swift
[11/15] Compiling NetService NetServiceDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetServiceDelegate.swift:4:37: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
 2 |
 3 | /// The `NetServiceDelegate` protocol defines the optional methods implemented by delegates of `NetService` objects.
 4 | public protocol NetServiceDelegate: class {
   |                                     `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
 5 |
 6 |     // MARK: Using Network Services
[12/15] Emitting module NetService
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetService.swift:455:27: warning: static property 'noAutoRename' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
444 |
445 |     /// These constants specify options for a network service.
446 |     public struct Options: OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
447 |         public let rawValue: Int
448 |         public init(rawValue: Int) {
    :
453 |         ///
454 |         /// Not implemented.
455 |         public static let noAutoRename = Options(rawValue: 1)
    |                           |- warning: static property 'noAutoRename' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'noAutoRename' 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
456 |
457 |         /// Specifies that a TCP listener should be started for both IPv4 and IPv6 on the port specified by this service. If the listening port can't be opened, the service calls its delegate’s `netService(_:didNotPublish:)` method to report the error.
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetService.swift:464:27: warning: static property 'listenForConnections' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
444 |
445 |     /// These constants specify options for a network service.
446 |     public struct Options: OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
447 |         public let rawValue: Int
448 |         public init(rawValue: Int) {
    :
462 |         ///
463 |         /// Not implemented.
464 |         public static let listenForConnections = Options(rawValue: 2)
    |                           |- warning: static property 'listenForConnections' is not concurrency-safe because non-'Sendable' type 'NetService.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'listenForConnections' 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
465 |     }
466 |
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetServiceBrowserDelegate.swift:4:44: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
  2 |
  3 | /// The `NetServiceBrowserDelegate` protocol defines the optional methods implemented by delegates of `NetServiceBrowser` objects.
  4 | public protocol NetServiceBrowserDelegate: class {
    |                                            `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
  5 |     /// Tells the delegate the sender found a domain.
  6 |     ///
/Users/admin/builder/spi-builder-workspace/Sources/NetService/NetServiceDelegate.swift:4:37: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
 2 |
 3 | /// The `NetServiceDelegate` protocol defines the optional methods implemented by delegates of `NetService` objects.
 4 | public protocol NetServiceDelegate: class {
   |                                     `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
 5 |
 6 |     // MARK: Using Network Services
[13/20] Compiling dns_sd FoundationCompat.swift
[14/20] Compiling dns_sd main.swift
[15/20] Compiling dns_sd Delegate.swift
[16/20] Emitting module dns_sd
[17/20] Compiling dns_sd Extensions.swift
[17/20] Write Objects.LinkFileList
[18/20] Linking dns-sd
[19/20] Applying dns-sd
Build complete! (9.66s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "NetService",
  "name" : "NetService",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "NetService",
      "targets" : [
        "NetService"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "dns-sd",
      "targets" : [
        "dns-sd"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "dns_sd",
      "module_type" : "SwiftTarget",
      "name" : "dns-sd",
      "path" : "Sources/dns-sd",
      "product_memberships" : [
        "dns-sd"
      ],
      "sources" : [
        "Delegate.swift",
        "Extensions.swift",
        "FoundationCompat.swift",
        "main.swift"
      ],
      "target_dependencies" : [
        "NetService"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "NetServiceTests",
      "module_type" : "SwiftTarget",
      "name" : "NetServiceTests",
      "path" : "Tests/NetServiceTests",
      "sources" : [
        "BrowserTests.swift"
      ],
      "target_dependencies" : [
        "NetService"
      ],
      "type" : "test"
    },
    {
      "c99name" : "NetService",
      "module_type" : "SwiftTarget",
      "name" : "NetService",
      "path" : "Sources/NetService",
      "product_memberships" : [
        "NetService",
        "dns-sd"
      ],
      "sources" : [
        "FoundationCompat.swift",
        "NetService.swift",
        "NetServiceBrowser.swift",
        "NetServiceBrowserDelegate.swift",
        "NetServiceDelegate.swift",
        "ServiceFlags.swift",
        "Utils.swift"
      ],
      "target_dependencies" : [
        "Cdns_sd"
      ],
      "type" : "library"
    },
    {
      "c99name" : "Cdns_sd",
      "module_type" : "SystemLibraryTarget",
      "name" : "Cdns_sd",
      "path" : "Sources/Cdns_sd",
      "product_memberships" : [
        "NetService",
        "dns-sd"
      ],
      "sources" : [
      ],
      "type" : "system-target"
    }
  ],
  "tools_version" : "5.1"
}
Done.