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 Fuzi, reference master (e853de), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 11:15:06 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 -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/cezheng/Fuzi.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/cezheng/Fuzi
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at e853de3 Fix typo in README.md
Cloned https://github.com/cezheng/Fuzi.git
Revision (git rev-parse @):
e853de3bdeb6fd458bcab6daa4d56e68ff80c531
SUCCESS checkout https://github.com/cezheng/Fuzi.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": "fuzi",
      "name": "Fuzi",
      "url": "https://github.com/cezheng/Fuzi.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Fuzi",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/cezheng/Fuzi.git
[1/1310] Fetching fuzi
Fetched https://github.com/cezheng/Fuzi.git from cache (1.04s)
Creating working copy for https://github.com/cezheng/Fuzi.git
Working copy of https://github.com/cezheng/Fuzi.git resolved at master (e853de3)
warning: '.resolve-product-dependencies': dependency 'fuzi' 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/cezheng/Fuzi.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Fuzi",
  "name" : "Fuzi",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Fuzi",
      "targets" : [
        "Fuzi"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FuziTests",
      "module_type" : "SwiftTarget",
      "name" : "FuziTests",
      "path" : "Tests",
      "sources" : [
        "AtomTests.swift",
        "CSSTests.swift",
        "DefaultNamespaceXPathTests.swift",
        "HTMLTests.swift",
        "VMAPTests.swift",
        "XMLTests.swift",
        "XPathFunctionResultTests.swift"
      ],
      "target_dependencies" : [
        "Fuzi"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Fuzi",
      "module_type" : "SwiftTarget",
      "name" : "Fuzi",
      "path" : "Sources",
      "product_memberships" : [
        "Fuzi"
      ],
      "sources" : [
        "Document.swift",
        "Element.swift",
        "Error.swift",
        "Helpers.swift",
        "Node.swift",
        "NodeSet.swift",
        "Queryable.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
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/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/10] Compiling Fuzi Document.swift
[4/10] Compiling Fuzi Error.swift
[5/10] Compiling Fuzi Element.swift
/Users/admin/builder/spi-builder-workspace/Sources/Element.swift:72:7: warning: reference to var 'xmlFree' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 70 |     if let xmlValue = xmlValue {
 71 |       value = ^-^xmlValue
 72 |       xmlFree(xmlValue)
    |       `- warning: reference to var 'xmlFree' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 73 |     }
 74 |     return value
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
[6/10] Compiling Fuzi NodeSet.swift
/Users/admin/builder/spi-builder-workspace/Sources/NodeSet.swift:104:21: warning: static property 'emptySet' is not concurrency-safe because non-'Sendable' type 'XPathNodeSet' may have shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// XPath selector result node set
102 | open class XPathNodeSet: NodeSet {
    |            `- note: class 'XPathNodeSet' does not conform to the 'Sendable' protocol
103 |   /// Empty node set
104 |   public static let emptySet = XPathNodeSet(cXPath: nil, document: nil)
    |                     |- warning: static property 'emptySet' is not concurrency-safe because non-'Sendable' type 'XPathNodeSet' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: annotate 'emptySet' 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
105 |
106 |   fileprivate var cXPath: xmlXPathObjectPtr?
[7/10] Emitting module Fuzi
/Users/admin/builder/spi-builder-workspace/Sources/Node.swift:129:5: warning: reference to var 'xmlFree' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
127 |     let key = xmlNodeGetContent(self.cNode)
128 |     let stringValue = ^-^key ?? ""
129 |     xmlFree(key)
    |     `- warning: reference to var 'xmlFree' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
130 |     return stringValue
131 |   }()
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
/Users/admin/builder/spi-builder-workspace/Sources/NodeSet.swift:104:21: warning: static property 'emptySet' is not concurrency-safe because non-'Sendable' type 'XPathNodeSet' may have shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// XPath selector result node set
102 | open class XPathNodeSet: NodeSet {
    |            `- note: class 'XPathNodeSet' does not conform to the 'Sendable' protocol
103 |   /// Empty node set
104 |   public static let emptySet = XPathNodeSet(cXPath: nil, document: nil)
    |                     |- warning: static property 'emptySet' is not concurrency-safe because non-'Sendable' type 'XPathNodeSet' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: annotate 'emptySet' 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
105 |
106 |   fileprivate var cXPath: xmlXPathObjectPtr?
[8/10] Compiling Fuzi Queryable.swift
/Users/admin/builder/spi-builder-workspace/Sources/NodeSet.swift:104:21: warning: static property 'emptySet' is not concurrency-safe because non-'Sendable' type 'XPathNodeSet' may have shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// XPath selector result node set
102 | open class XPathNodeSet: NodeSet {
    |            `- note: class 'XPathNodeSet' does not conform to the 'Sendable' protocol
103 |   /// Empty node set
104 |   public static let emptySet = XPathNodeSet(cXPath: nil, document: nil)
    |                     |- warning: static property 'emptySet' is not concurrency-safe because non-'Sendable' type 'XPathNodeSet' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: annotate 'emptySet' 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
105 |
106 |   fileprivate var cXPath: xmlXPathObjectPtr?
[9/10] Compiling Fuzi Node.swift
/Users/admin/builder/spi-builder-workspace/Sources/Node.swift:129:5: warning: reference to var 'xmlFree' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
127 |     let key = xmlNodeGetContent(self.cNode)
128 |     let stringValue = ^-^key ?? ""
129 |     xmlFree(key)
    |     `- warning: reference to var 'xmlFree' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
130 |     return stringValue
131 |   }()
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
[10/10] Compiling Fuzi Helpers.swift
Build complete! (9.35s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Fuzi",
  "name" : "Fuzi",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Fuzi",
      "targets" : [
        "Fuzi"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FuziTests",
      "module_type" : "SwiftTarget",
      "name" : "FuziTests",
      "path" : "Tests",
      "sources" : [
        "AtomTests.swift",
        "CSSTests.swift",
        "DefaultNamespaceXPathTests.swift",
        "HTMLTests.swift",
        "VMAPTests.swift",
        "XMLTests.swift",
        "XPathFunctionResultTests.swift"
      ],
      "target_dependencies" : [
        "Fuzi"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Fuzi",
      "module_type" : "SwiftTarget",
      "name" : "Fuzi",
      "path" : "Sources",
      "product_memberships" : [
        "Fuzi"
      ],
      "sources" : [
        "Document.swift",
        "Element.swift",
        "Error.swift",
        "Helpers.swift",
        "Node.swift",
        "NodeSet.swift",
        "Queryable.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.