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 PerfectXML, reference master (977d27), with Swift 6.0 for macOS (SPM) on 30 Oct 2024 18:09:22 UTC.

Swift 6 data race errors: 1

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/perfectlysoft/perfect-xml.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/perfectlysoft/perfect-xml
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 977d277 Updated import
Cloned https://github.com/perfectlysoft/perfect-xml.git
Revision (git rev-parse @):
977d27770b74f8e73653b9f569b7dac1bfea4150
SUCCESS checkout https://github.com/perfectlysoft/perfect-xml.git at master
Fetching https://github.com/PerfectlySoft/Perfect-libxml2.git
[1/89] Fetching perfect-libxml2
Fetched https://github.com/PerfectlySoft/Perfect-libxml2.git from cache (0.72s)
Computing version for https://github.com/PerfectlySoft/Perfect-libxml2.git
Computed https://github.com/PerfectlySoft/Perfect-libxml2.git at 3.0.1 (0.63s)
Creating working copy for https://github.com/PerfectlySoft/Perfect-libxml2.git
Working copy of https://github.com/PerfectlySoft/Perfect-libxml2.git resolved at 3.0.1
========================================
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": "perfect-xml",
      "name": "PerfectXML",
      "url": "https://github.com/perfectlysoft/perfect-xml.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/perfect-xml",
      "dependencies": [
        {
          "identity": "perfect-libxml2",
          "name": "libxml2",
          "url": "https://github.com/PerfectlySoft/Perfect-libxml2.git",
          "version": "3.0.1",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Perfect-libxml2",
          "dependencies": [
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/perfectlysoft/perfect-xml.git
[1/227] Fetching perfect-xml
Fetched https://github.com/perfectlysoft/perfect-xml.git from cache (0.73s)
Fetching https://github.com/PerfectlySoft/Perfect-libxml2.git from cache
Fetched https://github.com/PerfectlySoft/Perfect-libxml2.git from cache (0.46s)
Computing version for https://github.com/PerfectlySoft/Perfect-libxml2.git
Computed https://github.com/PerfectlySoft/Perfect-libxml2.git at 3.0.1 (0.03s)
Creating working copy for https://github.com/perfectlysoft/perfect-xml.git
Working copy of https://github.com/perfectlysoft/perfect-xml.git resolved at master (977d277)
Creating working copy for https://github.com/PerfectlySoft/Perfect-libxml2.git
Working copy of https://github.com/PerfectlySoft/Perfect-libxml2.git resolved at 3.0.1
warning: 'perfect-libxml2': ignoring declared target(s) 'libxml2' in the system package
warning: '.resolve-product-dependencies': dependency 'perfect-xml' is not used by any target
Found 1 product dependencies
  - libxml2
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/perfectlysoft/perfect-xml.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/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/8] Compiling PerfectXML XPath.swift
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XPath.swift:84:2: warning: 'public' modifier is redundant for instance method declared in a public extension
 82 | 	/// Execute the XPath and return the result(s).
 83 | 	/// Accepts and array of tuples holding namespace prefixes and uris.
 84 | 	public func extract(path: String, namespaces: [(String, String)] = [(String, String)]()) -> XPathObject {
    |  `- warning: 'public' modifier is redundant for instance method declared in a public extension
 85 | 		guard let ctx = initializeContext() else {
 86 | 			return .none
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XPath.swift:118:2: warning: 'public' modifier is redundant for instance method declared in a public extension
116 | 	/// Execute the XPath and return a single resul tnode or nil.
117 | 	/// Accepts and array of tuples holding namespace prefixes and uris.
118 | 	public func extractOne(path: String, namespaces: [(String, String)] = [(String, String)]()) -> XNode? {
    |  `- warning: 'public' modifier is redundant for instance method declared in a public extension
119 | 		guard case .nodeSet(let nodes) = extract(path: path, namespaces: namespaces) else {
120 | 			return nil
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XPath.swift:77: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
 75 | 			}
 76 | 			defer {
 77 | 				xmlFree(chars)
    |     `- 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
 78 | 			}
 79 | 			return .string(String(validatingUTF8: UnsafeRawPointer(chars).assumingMemoryBound(to: Int8.self)) ?? "")
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XPath.swift:99:8: warning: immutable value 'errorTracker' was never used; consider replacing with '_' or removing it
 97 | 				return
 98 | 			}
 99 | 			let errorTracker: XErrorTracker = Unmanaged.fromOpaque(userData).takeUnretainedValue()
    |        `- warning: immutable value 'errorTracker' was never used; consider replacing with '_' or removing it
100 |
101 | 			print("help")
[4/8] Compiling PerfectXML XMLStream.swift
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLStream.swift:195:4: 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
193 | 		}
194 | 		defer {
195 | 			xmlFree(n)
    |    `- 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
196 | 		}
197 | 		return n.withMemoryRebound(to: Int8.self, capacity: 0) {
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
[5/8] Compiling PerfectXML XMLDOM.swift
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLDOM.swift:269:13: warning: static property 'initialize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
267 | public class XDocument: XNode {
268 |
269 | 	static var initialize: Bool = {
    |             |- warning: static property 'initialize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'initialize' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'initialize' 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
270 | 		xmlInitParser()
271 | 		xmlXPathInit()
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLDOM.swift:105:4: 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
103 | 		}
104 | 		defer {
105 | 			xmlFree(content)
    |    `- 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
106 | 		}
107 | 		return String(validatingUTF8: UnsafeMutableRawPointer(content).assumingMemoryBound(to: Int8.self))
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLDOM.swift:200:4: 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
198 | 		}
199 | 		defer {
200 | 			xmlFree(localPart)
    |    `- 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
201 | 			if nil != prefix {
202 | 				xmlFree(prefix)
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLDOM.swift:202: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
200 | 			xmlFree(localPart)
201 | 			if nil != prefix {
202 | 				xmlFree(prefix)
    |     `- 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
203 | 			}
204 | 		}
libxml2.xmlFree:1:12: note: var declared here
1 | public var xmlFree: xmlFreeFunc!
  |            `- note: var declared here
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLDOM.swift:331:49: warning: initialization of 'UnsafePointer<String.UTF8View.Element>' (aka 'UnsafePointer<UInt8>') results in a dangling pointer
329 | 		_ = XDocument.initialize
330 | 		let src = Array(fromSource.utf8)
331 | 		let p = UnsafeMutablePointer<UInt8>(mutating: UnsafePointer(src))
    |                                                 |             |- note: implicit argument conversion from '[String.UTF8View.Element]' (aka 'Array<UInt8>') to 'UnsafePointer<String.UTF8View.Element>' (aka 'UnsafePointer<UInt8>') produces a pointer valid only for the duration of the call to 'init(_:)'
    |                                                 |             `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                                                 `- warning: initialization of 'UnsafePointer<String.UTF8View.Element>' (aka 'UnsafePointer<UInt8>') results in a dangling pointer
332 | 		guard let doc = htmlParseDoc(p, encoding) else {
333 | 			return nil
[6/8] Compiling PerfectXML SAX.swift
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/SAX.swift:105:14: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
103 | 	public func pushData(_ d: [UInt8]) throws {
104 | 		let ctx = try getCtxt()
105 | 		let code = UnsafePointer(d).withMemoryRebound(to: Int8.self, capacity: d.count) {
    |              |             |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |              |             `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |              `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
106 | 			return xmlParseChunk(ctx, $0, Int32(d.count), 0)
107 | 		}
[7/8] Compiling PerfectXML Codable.swift
[8/8] Emitting module PerfectXML
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XMLDOM.swift:269:13: warning: static property 'initialize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
267 | public class XDocument: XNode {
268 |
269 | 	static var initialize: Bool = {
    |             |- warning: static property 'initialize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'initialize' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'initialize' 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
270 | 		xmlInitParser()
271 | 		xmlXPathInit()
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XPath.swift:84:2: warning: 'public' modifier is redundant for instance method declared in a public extension
 82 | 	/// Execute the XPath and return the result(s).
 83 | 	/// Accepts and array of tuples holding namespace prefixes and uris.
 84 | 	public func extract(path: String, namespaces: [(String, String)] = [(String, String)]()) -> XPathObject {
    |  `- warning: 'public' modifier is redundant for instance method declared in a public extension
 85 | 		guard let ctx = initializeContext() else {
 86 | 			return .none
/Users/admin/builder/spi-builder-workspace/Sources/PerfectXML/XPath.swift:118:2: warning: 'public' modifier is redundant for instance method declared in a public extension
116 | 	/// Execute the XPath and return a single resul tnode or nil.
117 | 	/// Accepts and array of tuples holding namespace prefixes and uris.
118 | 	public func extractOne(path: String, namespaces: [(String, String)] = [(String, String)]()) -> XNode? {
    |  `- warning: 'public' modifier is redundant for instance method declared in a public extension
119 | 		guard case .nodeSet(let nodes) = extract(path: path, namespaces: namespaces) else {
120 | 			return nil
Build complete! (7.73s)
warning: 'perfect-libxml2': ignoring declared target(s) 'libxml2' in the system package
warning: 'spi-builder-workspace': dependency 'perfect-libxml2' is not used by any target
warning: failed to retrieve search paths with pkg-config; maybe pkg-config is not installed
warning: you may be able to install libxml-2.0 using your system-packager:
    brew install libxml2
Build complete.
{
  "dependencies" : [
    {
      "identity" : "perfect-libxml2",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "3.0.0",
            "upper_bound" : "4.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/PerfectlySoft/Perfect-libxml2.git"
    }
  ],
  "manifest_display_name" : "PerfectXML",
  "name" : "PerfectXML",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "PerfectXML",
      "targets" : [
        "PerfectXML"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "PerfectXMLTests",
      "module_type" : "SwiftTarget",
      "name" : "PerfectXMLTests",
      "path" : "Tests/PerfectXMLTests",
      "sources" : [
        "PerfectXMLTests.swift"
      ],
      "target_dependencies" : [
        "PerfectXML"
      ],
      "type" : "test"
    },
    {
      "c99name" : "PerfectXML",
      "module_type" : "SwiftTarget",
      "name" : "PerfectXML",
      "path" : "Sources/PerfectXML",
      "product_memberships" : [
        "PerfectXML"
      ],
      "sources" : [
        "Codable.swift",
        "SAX.swift",
        "XMLDOM.swift",
        "XMLStream.swift",
        "XPath.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.0"
}
Done.