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 GOFeatureFlag, reference main (2ede21), with Swift 6.0 for macOS (SPM) on 16 Sep 2024 22:20:42 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/go-feature-flag/openfeature-swift-provider.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/go-feature-flag/openfeature-swift-provider
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 2ede213 typo
Cloned https://github.com/go-feature-flag/openfeature-swift-provider.git
Revision (git rev-parse @):
2ede213a55c2534eecf927bbe131d9551f78c2d1
SUCCESS checkout https://github.com/go-feature-flag/openfeature-swift-provider.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/go-feature-flag/openfeature-swift-provider.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/4] Write sources
[3/4] Write swift-version-117DEE11B69C53C9.txt
[5/31] Emitting module OpenFeature
[6/33] Compiling OpenFeature ErrorCode.swift
[7/33] Compiling OpenFeature OpenFeatureError.swift
[8/33] Compiling OpenFeature BaseEvaluation.swift
[9/33] Compiling OpenFeature Client.swift
[10/33] Compiling OpenFeature ClientMetadata.swift
[11/33] Compiling OpenFeature ProviderEvents.swift
[12/33] Compiling OpenFeature ProviderMetadata.swift
[13/33] Compiling OpenFeature Reason.swift
[14/33] Compiling OpenFeature FlagMetadataValue.swift
[15/33] Compiling OpenFeature FlagValueType.swift
[16/33] Compiling OpenFeature Hook.swift
[17/33] Compiling OpenFeature Features.swift
[18/33] Compiling OpenFeature FlagEvaluationDetails.swift
[19/33] Compiling OpenFeature FlagEvaluationOptions.swift
[20/33] Compiling OpenFeature Structure.swift
[21/33] Compiling OpenFeature Value.swift
[22/33] Compiling OpenFeature EvaluationContext.swift
[23/33] Compiling OpenFeature EventHandler.swift
[24/33] Compiling OpenFeature Features+Defaults.swift
[25/33] Compiling OpenFeature HookContext.swift
[26/33] Compiling OpenFeature HookSupport.swift
[27/33] Compiling OpenFeature MutableContext.swift
[28/33] Compiling OpenFeature FeatureProvider.swift
[29/33] Compiling OpenFeature NoOpProvider.swift
[30/33] Compiling OpenFeature ProviderEvaluation.swift
[31/33] Compiling OpenFeature MutableStructure.swift
[32/33] Compiling OpenFeature OpenFeatureAPI.swift
[33/33] Compiling OpenFeature OpenFeatureClient.swift
[34/43] Compiling OFREP json_value.swift
[35/44] Compiling OFREP bulk_evaluation_status.swift
[36/44] Compiling OFREP ofrep_api.swift
[37/44] Compiling OFREP option_exceptions.swift
[38/44] Emitting module OFREP
[39/44] Compiling OFREP networking_service.swift
[40/44] Compiling OFREP options.swift
[41/44] Compiling OFREP bulk_evalutaion_request.swift
[42/44] Compiling OFREP bulk_evaluation_response.swift
[43/44] Compiling OFREP ofrep_errors.swift
[44/44] Compiling OFREP ofrep.swift
/Users/admin/builder/spi-builder-workspace/Sources/OFREP/ofrep.swift:38:9: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
 36 |     public func initialize(initialContext: (any OpenFeature.EvaluationContext)?) {
 37 |         self.evaluationContext = initialContext
 38 |         Task {
    |         `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
 39 |             do {
 40 |                 let status = try await self.evaluateFlags(context: self.evaluationContext)
/Users/admin/builder/spi-builder-workspace/Sources/OFREP/ofrep.swift:61:9: warning: task-isolated value of type '() async throws -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
 59 |         self.eventHandler.send(.stale)
 60 |         self.evaluationContext = newContext
 61 |         Task {
    |         `- warning: task-isolated value of type '() async throws -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
 62 |             do {
 63 |                 let status = try await self.evaluateFlags(context: newContext)
/Users/admin/builder/spi-builder-workspace/Sources/OFREP/ofrep.swift:273:13: warning: task-isolated value of type '() async throws -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
271 |         timer?.setEventHandler { [weak self] in
272 |             guard let weakSelf = self else { return }
273 |             Task {
    |             `- warning: task-isolated value of type '() async throws -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
274 |                 do {
275 |                     let status = try await weakSelf.evaluateFlags(context: weakSelf.evaluationContext)
[45/58] Compiling GOFeatureFlag data_collector_object_hook.swift
[46/58] Compiling GOFeatureFlag data_collector_string_hook.swift
[47/59] Compiling GOFeatureFlag value_extension.swift
[48/59] Compiling GOFeatureFlag data_collector_request.swift
[49/59] Compiling GOFeatureFlag goff_errors.swift
[50/59] Compiling GOFeatureFlag data_collector_bool_hook.swift
[51/59] Emitting module GOFeatureFlag
[52/59] Compiling GOFeatureFlag data_collector_manager.swift
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:32:13: warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 3 | import Combine
 4 |
 5 | class DataCollectorManager {
   |       `- note: class 'DataCollectorManager' does not conform to the 'Sendable' protocol
 6 |     var events: [FeatureEvent] = []
 7 |     var hooks: [any Hook] = []
   :
30 |     func appendFeatureEvent(event: FeatureEvent) {
31 |         self.queue.async(flags:.barrier) {
32 |             self.events.append(event)
   |             `- warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |         }
34 |     }
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:32:32: warning: capture of 'event' with non-sendable type 'FeatureEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
30 |     func appendFeatureEvent(event: FeatureEvent) {
31 |         self.queue.async(flags:.barrier) {
32 |             self.events.append(event)
   |                                `- warning: capture of 'event' with non-sendable type 'FeatureEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |         }
34 |     }
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/model/feature_event.swift:4:8: note: consider making struct 'FeatureEvent' conform to the 'Sendable' protocol
  2 | import OFREP
  3 |
  4 | struct FeatureEvent: Codable {
    |        `- note: consider making struct 'FeatureEvent' conform to the 'Sendable' protocol
  5 |     // Kind for a feature event is feature.
  6 |     // A feature event will only be generated if the trackEvents attribute of the flag is set to true.
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:40:25: warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 3 | import Combine
 4 |
 5 | class DataCollectorManager {
   |       `- note: class 'DataCollectorManager' does not conform to the 'Sendable' protocol
 6 |     var events: [FeatureEvent] = []
 7 |     var hooks: [any Hook] = []
   :
38 |             Task {
39 |                 do {
40 |                     if !self.events.isEmpty {
   |                         `- warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
41 |                         (_,_) = try await self.goffAPI.postDataCollector(events: self.events)
42 |                         self.events = []
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:40:25: warning: capture of 'self' with non-sendable type 'DataCollectorManager' in an isolated closure; this is an error in the Swift 6 language mode
 3 | import Combine
 4 |
 5 | class DataCollectorManager {
   |       `- note: class 'DataCollectorManager' does not conform to the 'Sendable' protocol
 6 |     var events: [FeatureEvent] = []
 7 |     var hooks: [any Hook] = []
   :
38 |             Task {
39 |                 do {
40 |                     if !self.events.isEmpty {
   |                         `- warning: capture of 'self' with non-sendable type 'DataCollectorManager' in an isolated closure; this is an error in the Swift 6 language mode
41 |                         (_,_) = try await self.goffAPI.postDataCollector(events: self.events)
42 |                         self.events = []
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:23:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
21 |         timer?.setEventHandler { [weak self] in
22 |             guard let weakSelf = self else { return }
23 |             Task {
   |             `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
24 |                 await weakSelf.pushEvents()
25 |             }
[53/59] Compiling GOFeatureFlag goff_api.swift
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:32:13: warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 3 | import Combine
 4 |
 5 | class DataCollectorManager {
   |       `- note: class 'DataCollectorManager' does not conform to the 'Sendable' protocol
 6 |     var events: [FeatureEvent] = []
 7 |     var hooks: [any Hook] = []
   :
30 |     func appendFeatureEvent(event: FeatureEvent) {
31 |         self.queue.async(flags:.barrier) {
32 |             self.events.append(event)
   |             `- warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |         }
34 |     }
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:32:32: warning: capture of 'event' with non-sendable type 'FeatureEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
30 |     func appendFeatureEvent(event: FeatureEvent) {
31 |         self.queue.async(flags:.barrier) {
32 |             self.events.append(event)
   |                                `- warning: capture of 'event' with non-sendable type 'FeatureEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |         }
34 |     }
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/model/feature_event.swift:4:8: note: consider making struct 'FeatureEvent' conform to the 'Sendable' protocol
  2 | import OFREP
  3 |
  4 | struct FeatureEvent: Codable {
    |        `- note: consider making struct 'FeatureEvent' conform to the 'Sendable' protocol
  5 |     // Kind for a feature event is feature.
  6 |     // A feature event will only be generated if the trackEvents attribute of the flag is set to true.
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:40:25: warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 3 | import Combine
 4 |
 5 | class DataCollectorManager {
   |       `- note: class 'DataCollectorManager' does not conform to the 'Sendable' protocol
 6 |     var events: [FeatureEvent] = []
 7 |     var hooks: [any Hook] = []
   :
38 |             Task {
39 |                 do {
40 |                     if !self.events.isEmpty {
   |                         `- warning: capture of 'self' with non-sendable type 'DataCollectorManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
41 |                         (_,_) = try await self.goffAPI.postDataCollector(events: self.events)
42 |                         self.events = []
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:40:25: warning: capture of 'self' with non-sendable type 'DataCollectorManager' in an isolated closure; this is an error in the Swift 6 language mode
 3 | import Combine
 4 |
 5 | class DataCollectorManager {
   |       `- note: class 'DataCollectorManager' does not conform to the 'Sendable' protocol
 6 |     var events: [FeatureEvent] = []
 7 |     var hooks: [any Hook] = []
   :
38 |             Task {
39 |                 do {
40 |                     if !self.events.isEmpty {
   |                         `- warning: capture of 'self' with non-sendable type 'DataCollectorManager' in an isolated closure; this is an error in the Swift 6 language mode
41 |                         (_,_) = try await self.goffAPI.postDataCollector(events: self.events)
42 |                         self.events = []
/Users/admin/builder/spi-builder-workspace/Sources/GOFeatureFlag/controller/data_collector_manager.swift:23:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
21 |         timer?.setEventHandler { [weak self] in
22 |             guard let weakSelf = self else { return }
23 |             Task {
   |             `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
24 |                 await weakSelf.pushEvents()
25 |             }
[54/59] Compiling GOFeatureFlag options.swift
[55/59] Compiling GOFeatureFlag data_collector_response.swift
[56/59] Compiling GOFeatureFlag feature_event.swift
[57/59] Compiling GOFeatureFlag data_collector_double_hook.swift
[58/59] Compiling GOFeatureFlag data_collector_integer_hook.swift
[59/59] Compiling GOFeatureFlag provider.swift
Build complete! (21.14s)
Fetching https://github.com/open-feature/swift-sdk.git
[1/689] Fetching swift-sdk
Fetched https://github.com/open-feature/swift-sdk.git from cache (0.87s)
Computing version for https://github.com/open-feature/swift-sdk.git
Computed https://github.com/open-feature/swift-sdk.git at 0.2.0 (0.69s)
Creating working copy for https://github.com/open-feature/swift-sdk.git
Working copy of https://github.com/open-feature/swift-sdk.git resolved at 0.2.0
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-sdk",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "0.2.0",
            "upper_bound" : "1.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/open-feature/swift-sdk.git"
    }
  ],
  "manifest_display_name" : "GOFeatureFlag",
  "name" : "GOFeatureFlag",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "GOFeatureFlag",
      "targets" : [
        "GOFeatureFlag"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "OFREP",
      "targets" : [
        "OFREP"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "OFREPTests",
      "module_type" : "SwiftTarget",
      "name" : "OFREPTests",
      "path" : "Tests/OFREPTests",
      "sources" : [
        "mock_networking_service.swift",
        "ofrep_api_tests.swift",
        "provider_tests.swift"
      ],
      "target_dependencies" : [
        "OFREP"
      ],
      "type" : "test"
    },
    {
      "c99name" : "OFREP",
      "module_type" : "SwiftTarget",
      "name" : "OFREP",
      "path" : "Sources/OFREP",
      "product_dependencies" : [
        "OpenFeature"
      ],
      "product_memberships" : [
        "GOFeatureFlag",
        "OFREP"
      ],
      "sources" : [
        "controller/ofrep_api.swift",
        "exception/ofrep_errors.swift",
        "exception/option_exceptions.swift",
        "model/bulk_evaluation_response.swift",
        "model/bulk_evaluation_status.swift",
        "model/bulk_evalutaion_request.swift",
        "model/json_value.swift",
        "model/options.swift",
        "ofrep.swift",
        "protocol/networking_service.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "GOFeatureFlagTests",
      "module_type" : "SwiftTarget",
      "name" : "GOFeatureFlagTests",
      "path" : "Tests/GOFeatureFlagTests",
      "sources" : [
        "goff_api_tests.swift",
        "mock_networking_service.swift",
        "provider_tests.swift"
      ],
      "target_dependencies" : [
        "GOFeatureFlag"
      ],
      "type" : "test"
    },
    {
      "c99name" : "GOFeatureFlag",
      "module_type" : "SwiftTarget",
      "name" : "GOFeatureFlag",
      "path" : "Sources/GOFeatureFlag",
      "product_memberships" : [
        "GOFeatureFlag"
      ],
      "sources" : [
        "controller/data_collector_manager.swift",
        "controller/goff_api.swift",
        "exception/goff_errors.swift",
        "hook/data_collector_bool_hook.swift",
        "hook/data_collector_double_hook.swift",
        "hook/data_collector_integer_hook.swift",
        "hook/data_collector_object_hook.swift",
        "hook/data_collector_string_hook.swift",
        "model/data_collector_request.swift",
        "model/data_collector_response.swift",
        "model/feature_event.swift",
        "model/value_extension.swift",
        "options.swift",
        "provider.swift"
      ],
      "target_dependencies" : [
        "OFREP"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Done.