This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 xml-coding with Swift 6.0 for Linux.

Swift 6 data race errors: 7

Build Command

bash -c docker run --rm -v "checkouts-4606859-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/adam-fowler/xml-coding.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/adam-fowler/xml-coding
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at b6a2ae2 Fix decoding of optional attributes (#6)
Cloned https://github.com/adam-fowler/xml-coding.git
Revision (git rev-parse @):
b6a2ae25464959f41cd167047ee47fe5bb681c6c
SUCCESS checkout https://github.com/adam-fowler/xml-coding.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $workDir
https://github.com/adam-fowler/xml-coding.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/8] Emitting module XMLCoding
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:39:27: warning: static property 'nodeCompactEmptyElement' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
 38 |         /// if an XML Element has no children then output as `<element />`. Default is to output `<element></element>`
 39 |         public static let nodeCompactEmptyElement = Options(rawValue: 1 << 0)
    |                           |- warning: static property 'nodeCompactEmptyElement' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodeCompactEmptyElement' 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
 40 |         /// output XML as human readable
 41 |         public static let nodePrettyPrint = Options(rawValue: 1 << 4)
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:41:27: warning: static property 'nodePrettyPrint' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 39 |         public static let nodeCompactEmptyElement = Options(rawValue: 1 << 0)
 40 |         /// output XML as human readable
 41 |         public static let nodePrettyPrint = Options(rawValue: 1 << 4)
    |                           |- warning: static property 'nodePrettyPrint' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodePrettyPrint' 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
 42 |         /// flag that XML Node should be output as CDATA
 43 |         public static let nodeIsCDATA = Options(rawValue: 1 << 5)
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:43:27: warning: static property 'nodeIsCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 41 |         public static let nodePrettyPrint = Options(rawValue: 1 << 4)
 42 |         /// flag that XML Node should be output as CDATA
 43 |         public static let nodeIsCDATA = Options(rawValue: 1 << 5)
    |                           |- warning: static property 'nodeIsCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodeIsCDATA' 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
 44 |
 45 |         /// when parsing XML preserve the whitespace sections
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:46:27: warning: static property 'nodePreserveWhitespace' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 44 |
 45 |         /// when parsing XML preserve the whitespace sections
 46 |         public static let nodePreserveWhitespace = Options(rawValue: 1 << 16)
    |                           |- warning: static property 'nodePreserveWhitespace' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodePreserveWhitespace' 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
 47 |         /// when parsing XML preserve the CDATA text elements
 48 |         public static let nodePreserveCDATA = Options(rawValue: 1 << 18)
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:48:27: warning: static property 'nodePreserveCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 46 |         public static let nodePreserveWhitespace = Options(rawValue: 1 << 16)
 47 |         /// when parsing XML preserve the CDATA text elements
 48 |         public static let nodePreserveCDATA = Options(rawValue: 1 << 18)
    |                           |- warning: static property 'nodePreserveCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodePreserveCDATA' 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
 49 |
 50 |         public init(rawValue: Int) {
/host/spi-builder-workspace/Sources/XMLCoding/XMLDecoder.swift:753:17: warning: var '_iso8601Formatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
751 | // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
752 | @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
753 | fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
    |                 |- warning: var '_iso8601Formatter' 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 '_iso8601Formatter' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate '_iso8601Formatter' 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
754 |     let formatter = ISO8601DateFormatter()
755 |     formatter.formatOptions = .withInternetDateTime
/host/spi-builder-workspace/Sources/XMLCoding/XMLEncoder.swift:693:17: warning: var '_iso8601Formatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
691 | // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
692 | @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
693 | fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
    |                 |- warning: var '_iso8601Formatter' 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 '_iso8601Formatter' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate '_iso8601Formatter' 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
694 |     let formatter = ISO8601DateFormatter()
695 |     formatter.formatOptions = .withInternetDateTime
[4/8] Compiling XMLCoding CodableProperties.swift
[5/8] Compiling XMLCoding XMLDecoder.swift
/host/spi-builder-workspace/Sources/XMLCoding/XMLDecoder.swift:753:17: warning: var '_iso8601Formatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
751 | // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
752 | @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
753 | fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
    |                 |- warning: var '_iso8601Formatter' 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 '_iso8601Formatter' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate '_iso8601Formatter' 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
754 |     let formatter = ISO8601DateFormatter()
755 |     formatter.formatOptions = .withInternetDateTime
[6/8] Compiling XMLCoding CollectionCoders.swift
[7/8] Compiling XMLCoding XMLEncoder.swift
/host/spi-builder-workspace/Sources/XMLCoding/XMLEncoder.swift:693:17: warning: var '_iso8601Formatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
691 | // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
692 | @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
693 | fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
    |                 |- warning: var '_iso8601Formatter' 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 '_iso8601Formatter' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate '_iso8601Formatter' 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
694 |     let formatter = ISO8601DateFormatter()
695 |     formatter.formatOptions = .withInternetDateTime
[8/8] Compiling XMLCoding XML.swift
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:39:27: warning: static property 'nodeCompactEmptyElement' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
 38 |         /// if an XML Element has no children then output as `<element />`. Default is to output `<element></element>`
 39 |         public static let nodeCompactEmptyElement = Options(rawValue: 1 << 0)
    |                           |- warning: static property 'nodeCompactEmptyElement' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodeCompactEmptyElement' 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
 40 |         /// output XML as human readable
 41 |         public static let nodePrettyPrint = Options(rawValue: 1 << 4)
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:41:27: warning: static property 'nodePrettyPrint' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 39 |         public static let nodeCompactEmptyElement = Options(rawValue: 1 << 0)
 40 |         /// output XML as human readable
 41 |         public static let nodePrettyPrint = Options(rawValue: 1 << 4)
    |                           |- warning: static property 'nodePrettyPrint' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodePrettyPrint' 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
 42 |         /// flag that XML Node should be output as CDATA
 43 |         public static let nodeIsCDATA = Options(rawValue: 1 << 5)
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:43:27: warning: static property 'nodeIsCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 41 |         public static let nodePrettyPrint = Options(rawValue: 1 << 4)
 42 |         /// flag that XML Node should be output as CDATA
 43 |         public static let nodeIsCDATA = Options(rawValue: 1 << 5)
    |                           |- warning: static property 'nodeIsCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodeIsCDATA' 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
 44 |
 45 |         /// when parsing XML preserve the whitespace sections
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:46:27: warning: static property 'nodePreserveWhitespace' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 44 |
 45 |         /// when parsing XML preserve the whitespace sections
 46 |         public static let nodePreserveWhitespace = Options(rawValue: 1 << 16)
    |                           |- warning: static property 'nodePreserveWhitespace' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodePreserveWhitespace' 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
 47 |         /// when parsing XML preserve the CDATA text elements
 48 |         public static let nodePreserveCDATA = Options(rawValue: 1 << 18)
/host/spi-builder-workspace/Sources/XMLCoding/XML.swift:48:27: warning: static property 'nodePreserveCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
 33 |
 34 |     /// Options for parsing and outputting XML Data
 35 |     public struct Options : OptionSet {
    |                   `- note: consider making struct 'Options' conform to the 'Sendable' protocol
 36 |         public let rawValue: Int
 37 |
    :
 46 |         public static let nodePreserveWhitespace = Options(rawValue: 1 << 16)
 47 |         /// when parsing XML preserve the CDATA text elements
 48 |         public static let nodePreserveCDATA = Options(rawValue: 1 << 18)
    |                           |- warning: static property 'nodePreserveCDATA' is not concurrency-safe because non-'Sendable' type 'XML.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'nodePreserveCDATA' 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
 49 |
 50 |         public init(rawValue: Int) {
Build complete! (9.11s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "xml-coding",
  "name" : "xml-coding",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "XMLCoding",
      "targets" : [
        "XMLCoding"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "XMLCodingTests",
      "module_type" : "SwiftTarget",
      "name" : "XMLCodingTests",
      "path" : "Tests/XMLCodingTests",
      "sources" : [
        "XMLEncoderTests.swift",
        "XMLTests.swift"
      ],
      "target_dependencies" : [
        "XMLCoding"
      ],
      "type" : "test"
    },
    {
      "c99name" : "XMLCoding",
      "module_type" : "SwiftTarget",
      "name" : "XMLCoding",
      "path" : "Sources/XMLCoding",
      "product_memberships" : [
        "XMLCoding"
      ],
      "sources" : [
        "CodableProperties/CodableProperties.swift",
        "CodableProperties/CollectionCoders.swift",
        "XML.swift",
        "XMLDecoder.swift",
        "XMLEncoder.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.