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 swift-jni, reference main (614139), with Swift 6.0 for macOS (SPM) on 11 Apr 2025 19:56:48 UTC.

Swift 6 data race errors: 5

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.2.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.60.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/skiptools/swift-jni.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/skiptools/swift-jni
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 614139a
Cloned https://github.com/skiptools/swift-jni.git
Revision (git rev-parse @):
614139a1ad5d590d89b47ec8385907e9b9284174
SUCCESS checkout https://github.com/skiptools/swift-jni.git at main
========================================
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": "swift-jni",
      "name": "swift-jni",
      "url": "https://github.com/skiptools/swift-jni.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-jni",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/skiptools/swift-jni.git
[1/101] Fetching swift-jni
Fetched https://github.com/skiptools/swift-jni.git from cache (0.64s)
Creating working copy for https://github.com/skiptools/swift-jni.git
Working copy of https://github.com/skiptools/swift-jni.git resolved at main (614139a)
warning: '.resolve-product-dependencies': dependency 'swift-jni' 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/skiptools/swift-jni.git
https://github.com/skiptools/swift-jni.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "swift-jni",
  "name" : "swift-jni",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftJNI",
      "targets" : [
        "SwiftJNI"
      ],
      "type" : {
        "library" : [
          "dynamic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftJNITests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftJNITests",
      "path" : "Tests/SwiftJNITests",
      "sources" : [
        "SwiftJNITests.swift"
      ],
      "target_dependencies" : [
        "SwiftJNI"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftJNI",
      "module_type" : "SwiftTarget",
      "name" : "SwiftJNI",
      "path" : "Sources/SwiftJNI",
      "product_memberships" : [
        "SwiftJNI"
      ],
      "sources" : [
        "SwiftJNI.swift"
      ],
      "target_dependencies" : [
        "CJNI"
      ],
      "type" : "library"
    },
    {
      "c99name" : "CJNI",
      "module_type" : "ClangTarget",
      "name" : "CJNI",
      "path" : "Sources/CJNI",
      "product_memberships" : [
        "SwiftJNI"
      ],
      "sources" : [
        "cjni.c"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.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/5] Write sources
[1/5] Compiling CJNI cjni.c
[2/5] Write swift-version-5BDAB9E9C0126B9D.txt
[4/7] Compiling SwiftJNI SwiftJNI.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:102:23: warning: static property 'jni' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 100 | public class JNI {
 101 |     /// The single shared singleton JNI instance for the process.
 102 |     public static var jni: JNI! { // this should be set in "OnLoad" and so should always exist
     |                       |- warning: static property 'jni' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: convert 'jni' to a 'let' constant to make 'Sendable' shared state immutable
     |                       |- note: annotate 'jni' 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
 103 |         didSet {
 104 |             _ = JClassLoader.globalClassLoader // cache the global class loader on initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:326:23: warning: static property 'kotlincompat' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
 322 |
 323 | /// Java conversion options.
 324 | public struct JConvertibleOptions: OptionSet {
     |               `- note: consider making struct 'JConvertibleOptions' conform to the 'Sendable' protocol
 325 |     /// Optimize for bridging to pure Kotlin code rather than transpiled Swift.
 326 |     public static let kotlincompat = JConvertibleOptions(rawValue: 1 << 0)
     |                       |- warning: static property 'kotlincompat' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'kotlincompat' 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
 327 |     /// Map to a Kotlin container type. Useful for passing an array or dictionary to a known List or Map, even when content might
 328 |     /// not be expected to be `.kotlincompat`.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:329:23: warning: static property 'kotlincompatContainer' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
 322 |
 323 | /// Java conversion options.
 324 | public struct JConvertibleOptions: OptionSet {
     |               `- note: consider making struct 'JConvertibleOptions' conform to the 'Sendable' protocol
 325 |     /// Optimize for bridging to pure Kotlin code rather than transpiled Swift.
 326 |     public static let kotlincompat = JConvertibleOptions(rawValue: 1 << 0)
 327 |     /// Map to a Kotlin container type. Useful for passing an array or dictionary to a known List or Map, even when content might
 328 |     /// not be expected to be `.kotlincompat`.
 329 |     public static let kotlincompatContainer = JConvertibleOptions(rawValue: 1 << 1)
     |                       |- warning: static property 'kotlincompatContainer' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'kotlincompatContainer' 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
 330 |
 331 |     public let rawValue: Int
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:633:23: warning: static property 'errorConverter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 631 |     private static let javaErrorExceptionConstructor = javaErrorExceptionClass.getMethodID(name: "<init>", sig: "(Ljava/lang/String;)V")!
 632 |     /// Handles converting the error pointer into the error that will ultimately be thrown
 633 |     public static var errorConverter: ((JavaObjectPointer, JConvertibleOptions) -> Error?) = { ptr, options in descriptionToError(ptr, options: options) }
     |                       |- warning: static property 'errorConverter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: convert 'errorConverter' to a 'let' constant to make 'Sendable' shared state immutable
     |                       |- note: annotate 'errorConverter' 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
 634 |
 635 |     public static func toError(_ ptr: JavaObjectPointer?, options: JConvertibleOptions) -> Error? {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:1099:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'JVMOptions' may have shared mutable state; this is an error in the Swift 6 language mode
1096 | // MARK: JVM Management
1097 |
1098 | public struct JVMOptions {
     |               `- note: consider making struct 'JVMOptions' conform to the 'Sendable' protocol
1099 |     public static let `default` = JVMOptions()
     |                       |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'JVMOptions' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'default' 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
1100 |
1101 |     public var verboseGarbageCollection = false
[5/7] Emitting module SwiftJNI
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:102:23: warning: static property 'jni' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 100 | public class JNI {
 101 |     /// The single shared singleton JNI instance for the process.
 102 |     public static var jni: JNI! { // this should be set in "OnLoad" and so should always exist
     |                       |- warning: static property 'jni' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: convert 'jni' to a 'let' constant to make 'Sendable' shared state immutable
     |                       |- note: annotate 'jni' 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
 103 |         didSet {
 104 |             _ = JClassLoader.globalClassLoader // cache the global class loader on initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:326:23: warning: static property 'kotlincompat' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
 322 |
 323 | /// Java conversion options.
 324 | public struct JConvertibleOptions: OptionSet {
     |               `- note: consider making struct 'JConvertibleOptions' conform to the 'Sendable' protocol
 325 |     /// Optimize for bridging to pure Kotlin code rather than transpiled Swift.
 326 |     public static let kotlincompat = JConvertibleOptions(rawValue: 1 << 0)
     |                       |- warning: static property 'kotlincompat' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'kotlincompat' 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
 327 |     /// Map to a Kotlin container type. Useful for passing an array or dictionary to a known List or Map, even when content might
 328 |     /// not be expected to be `.kotlincompat`.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:329:23: warning: static property 'kotlincompatContainer' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
 322 |
 323 | /// Java conversion options.
 324 | public struct JConvertibleOptions: OptionSet {
     |               `- note: consider making struct 'JConvertibleOptions' conform to the 'Sendable' protocol
 325 |     /// Optimize for bridging to pure Kotlin code rather than transpiled Swift.
 326 |     public static let kotlincompat = JConvertibleOptions(rawValue: 1 << 0)
 327 |     /// Map to a Kotlin container type. Useful for passing an array or dictionary to a known List or Map, even when content might
 328 |     /// not be expected to be `.kotlincompat`.
 329 |     public static let kotlincompatContainer = JConvertibleOptions(rawValue: 1 << 1)
     |                       |- warning: static property 'kotlincompatContainer' is not concurrency-safe because non-'Sendable' type 'JConvertibleOptions' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'kotlincompatContainer' 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
 330 |
 331 |     public let rawValue: Int
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:633:23: warning: static property 'errorConverter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 631 |     private static let javaErrorExceptionConstructor = javaErrorExceptionClass.getMethodID(name: "<init>", sig: "(Ljava/lang/String;)V")!
 632 |     /// Handles converting the error pointer into the error that will ultimately be thrown
 633 |     public static var errorConverter: ((JavaObjectPointer, JConvertibleOptions) -> Error?) = { ptr, options in descriptionToError(ptr, options: options) }
     |                       |- warning: static property 'errorConverter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: convert 'errorConverter' to a 'let' constant to make 'Sendable' shared state immutable
     |                       |- note: annotate 'errorConverter' 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
 634 |
 635 |     public static func toError(_ ptr: JavaObjectPointer?, options: JConvertibleOptions) -> Error? {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftJNI/SwiftJNI.swift:1099:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'JVMOptions' may have shared mutable state; this is an error in the Swift 6 language mode
1096 | // MARK: JVM Management
1097 |
1098 | public struct JVMOptions {
     |               `- note: consider making struct 'JVMOptions' conform to the 'Sendable' protocol
1099 |     public static let `default` = JVMOptions()
     |                       |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'JVMOptions' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'default' 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
1100 |
1101 |     public var verboseGarbageCollection = false
[5/7] Write Objects.LinkFileList
[6/7] Linking libSwiftJNI.dylib
Build complete! (6.84s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "swift-jni",
  "name" : "swift-jni",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftJNI",
      "targets" : [
        "SwiftJNI"
      ],
      "type" : {
        "library" : [
          "dynamic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftJNITests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftJNITests",
      "path" : "Tests/SwiftJNITests",
      "sources" : [
        "SwiftJNITests.swift"
      ],
      "target_dependencies" : [
        "SwiftJNI"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftJNI",
      "module_type" : "SwiftTarget",
      "name" : "SwiftJNI",
      "path" : "Sources/SwiftJNI",
      "product_memberships" : [
        "SwiftJNI"
      ],
      "sources" : [
        "SwiftJNI.swift"
      ],
      "target_dependencies" : [
        "CJNI"
      ],
      "type" : "library"
    },
    {
      "c99name" : "CJNI",
      "module_type" : "ClangTarget",
      "name" : "CJNI",
      "path" : "Sources/CJNI",
      "product_memberships" : [
        "SwiftJNI"
      ],
      "sources" : [
        "cjni.c"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.