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 Regex, reference master (d3ba02), with Swift 6.0 for macOS (SPM) on 1 Nov 2024 07:00:22 UTC.

Swift 6 data race errors: 5

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/sharplet/Regex.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sharplet/Regex
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at d3ba024 Merge pull request #74 from sharplet/disambiguate-options
Cloned https://github.com/sharplet/Regex.git
Revision (git rev-parse @):
d3ba024b643b5e8ed4451617195f4fa180c88cb1
SUCCESS checkout https://github.com/sharplet/Regex.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": "regex",
      "name": "Regex",
      "url": "https://github.com/sharplet/Regex.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Regex",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/sharplet/Regex.git
[1/1254] Fetching regex
Fetched https://github.com/sharplet/Regex.git from cache (1.79s)
Creating working copy for https://github.com/sharplet/Regex.git
Working copy of https://github.com/sharplet/Regex.git resolved at master (d3ba024)
warning: '.resolve-product-dependencies': dependency 'regex' 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/sharplet/Regex.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/9] Compiling Regex ThreadLocal.swift
[4/9] Compiling Regex String+ReplaceMatching.swift
[5/9] Emitting module Regex
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:12:23: warning: static property 'ignoreCase' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 10 |     ///     let a = Regex("a", options: .ignoreCase)
 11 |     ///     a.allMatches(in: "aA").map { $0.matchedString } // ["a", "A"]
 12 |     public static let ignoreCase = Options(rawValue: 1)
    |                       |- warning: static property 'ignoreCase' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'ignoreCase' 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 |     /// Ignore any metacharacters in the pattern, treating every character as
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:21:23: warning: static property 'ignoreMetacharacters' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 19 |     ///     let parens = Regex("()", options: .ignoreMetacharacters)
 20 |     ///     parens.matches("()") // true
 21 |     public static let ignoreMetacharacters = Options(rawValue: 1 << 1)
    |                       |- warning: static property 'ignoreMetacharacters' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'ignoreMetacharacters' 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
 22 |
 23 |     /// By default, "^" matches the beginning of the string and "$" matches the
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:31:23: warning: static property 'anchorsMatchLines' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 29 |     ///     let foo = Regex("^foo", options: .anchorsMatchLines)
 30 |     ///     foo.allMatches(in: "foo\nbar\nfoo\n").count // 2
 31 |     public static let anchorsMatchLines = Options(rawValue: 1 << 2)
    |                       |- warning: static property 'anchorsMatchLines' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'anchorsMatchLines' 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
 32 |
 33 |     /// Usually, "." matches all characters except newlines (\n). Using this
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:40:23: warning: static property 'dotMatchesLineSeparators' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 38 |     ///     let newLines = Regex("test.test", options: .dotMatchesLineSeparators)
 39 |     ///     newLines.allMatches(in: "test\ntest").count // 1
 40 |     public static let dotMatchesLineSeparators = Options(rawValue: 1 << 3)
    |                       |- warning: static property 'dotMatchesLineSeparators' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'dotMatchesLineSeparators' 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
 41 |
 42 |     /// Ignore whitespace and #-prefixed comments in the pattern.
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:48:23: warning: static property 'allowCommentsAndWhitespace' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 46 |     ///     let newLines = Regex("test test # this is a regex", options: .allowCommentsAndWhitespace)
 47 |     ///     newLines.allMatches(in: "testtest").count // 2
 48 |     public static let allowCommentsAndWhitespace = Options(rawValue: 1 << 4)
    |                       |- warning: static property 'allowCommentsAndWhitespace' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'allowCommentsAndWhitespace' 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 |     // MARK: OptionSetType
[6/9] Compiling Regex Regex.swift
[7/9] Compiling Regex Options.swift
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:12:23: warning: static property 'ignoreCase' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 10 |     ///     let a = Regex("a", options: .ignoreCase)
 11 |     ///     a.allMatches(in: "aA").map { $0.matchedString } // ["a", "A"]
 12 |     public static let ignoreCase = Options(rawValue: 1)
    |                       |- warning: static property 'ignoreCase' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'ignoreCase' 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 |     /// Ignore any metacharacters in the pattern, treating every character as
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:21:23: warning: static property 'ignoreMetacharacters' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 19 |     ///     let parens = Regex("()", options: .ignoreMetacharacters)
 20 |     ///     parens.matches("()") // true
 21 |     public static let ignoreMetacharacters = Options(rawValue: 1 << 1)
    |                       |- warning: static property 'ignoreMetacharacters' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'ignoreMetacharacters' 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
 22 |
 23 |     /// By default, "^" matches the beginning of the string and "$" matches the
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:31:23: warning: static property 'anchorsMatchLines' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 29 |     ///     let foo = Regex("^foo", options: .anchorsMatchLines)
 30 |     ///     foo.allMatches(in: "foo\nbar\nfoo\n").count // 2
 31 |     public static let anchorsMatchLines = Options(rawValue: 1 << 2)
    |                       |- warning: static property 'anchorsMatchLines' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'anchorsMatchLines' 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
 32 |
 33 |     /// Usually, "." matches all characters except newlines (\n). Using this
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:40:23: warning: static property 'dotMatchesLineSeparators' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 38 |     ///     let newLines = Regex("test.test", options: .dotMatchesLineSeparators)
 39 |     ///     newLines.allMatches(in: "test\ntest").count // 1
 40 |     public static let dotMatchesLineSeparators = Options(rawValue: 1 << 3)
    |                       |- warning: static property 'dotMatchesLineSeparators' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'dotMatchesLineSeparators' 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
 41 |
 42 |     /// Ignore whitespace and #-prefixed comments in the pattern.
/Users/admin/builder/spi-builder-workspace/Source/Regex/Options.swift:48:23: warning: static property 'allowCommentsAndWhitespace' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
  3 | extension Regex {
  4 |   /// `Options` defines alternate behaviours of regular expressions when matching.
  5 |   public struct Options: OptionSet {
    |                 `- note: consider making struct 'Options' conform to the 'Sendable' protocol
  6 |     /// Ignores the case of letters when matching.
  7 |     ///
    :
 46 |     ///     let newLines = Regex("test test # this is a regex", options: .allowCommentsAndWhitespace)
 47 |     ///     newLines.allMatches(in: "testtest").count // 2
 48 |     public static let allowCommentsAndWhitespace = Options(rawValue: 1 << 4)
    |                       |- warning: static property 'allowCommentsAndWhitespace' is not concurrency-safe because non-'Sendable' type 'Regex.Options' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'allowCommentsAndWhitespace' 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 |     // MARK: OptionSetType
[8/9] Compiling Regex MatchResult.swift
[9/9] Compiling Regex Foundation+Ranges.swift
Build complete! (8.12s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Regex",
  "name" : "Regex",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Regex",
      "targets" : [
        "Regex"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "4.2",
    "5"
  ],
  "targets" : [
    {
      "c99name" : "RegexTests",
      "module_type" : "SwiftTarget",
      "name" : "RegexTests",
      "path" : "Tests/RegexTests",
      "sources" : [
        "Assertions.swift",
        "CodableTests.swift",
        "OptionsTests.swift",
        "RegexTests.swift",
        "StringReplacementTests.swift",
        "Support.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Regex"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Regex",
      "module_type" : "SwiftTarget",
      "name" : "Regex",
      "path" : "Source/Regex",
      "product_memberships" : [
        "Regex"
      ],
      "sources" : [
        "Foundation+Ranges.swift",
        "MatchResult.swift",
        "Options.swift",
        "Regex.swift",
        "String+ReplaceMatching.swift",
        "ThreadLocal.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.2"
}
Done.