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 CustomTabView with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 2

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/NicFontana/SwiftUI-CustomTabView.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/NicFontana/SwiftUI-CustomTabView
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 6ef1961 chore: update README.md
Cloned https://github.com/NicFontana/SwiftUI-CustomTabView.git
Revision (git rev-parse @):
6ef1961612710f594eeaf669bf09484ccfebecce
SUCCESS checkout https://github.com/NicFontana/SwiftUI-CustomTabView.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/NicFontana/SwiftUI-CustomTabView.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a 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-6F35C1178C84523A.txt
[3/12] Compiling CustomTabView UITabBarControllerRepresentable.swift
[4/12] Compiling CustomTabView TopIndicatorTabBarView.swift
/Users/admin/builder/spi-builder-workspace/Sources/CustomTabView/Example/TopIndicatorTabBarView.swift:83:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 81 |
 82 | struct SizePreferenceKey: PreferenceKey {
 83 |     static var defaultValue: CGSize = .zero
    |                |- warning: static property 'defaultValue' 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 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: annotate 'defaultValue' 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
 84 |     static func reduce(value: inout CGSize, nextValue: () -> CGSize) {}
 85 | }
[5/12] Compiling CustomTabView KeyboardReadable.swift
[6/12] Compiling CustomTabView EnvironmentValues+TabBarPosition.swift
/Users/admin/builder/spi-builder-workspace/Sources/CustomTabView/EnvironmentValues+TabBarPosition.swift:24:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'TabBarPosition' may have shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | /// An enumaration that is used to set the tab bar view position.
11 | public enum TabBarPosition {
   |             `- note: consider making enum 'TabBarPosition' conform to the 'Sendable' protocol
12 |     /// Puts the tab bar next to the content, at one edge of the scene.
13 |     ///
   :
22 |
23 | private struct TabBarPositionEnvironmentKey: EnvironmentKey {
24 |     static let defaultValue: TabBarPosition = .edge(.bottom)
   |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'TabBarPosition' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'defaultValue' 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
25 | }
26 |
[7/12] Compiling CustomTabView Tab.swift
[8/12] Compiling CustomTabView NSTabBarControllerRepresentable.swift
[9/12] Compiling CustomTabView ExampleView.swift
[10/12] Emitting module CustomTabView
/Users/admin/builder/spi-builder-workspace/Sources/CustomTabView/EnvironmentValues+TabBarPosition.swift:24:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'TabBarPosition' may have shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | /// An enumaration that is used to set the tab bar view position.
11 | public enum TabBarPosition {
   |             `- note: consider making enum 'TabBarPosition' conform to the 'Sendable' protocol
12 |     /// Puts the tab bar next to the content, at one edge of the scene.
13 |     ///
   :
22 |
23 | private struct TabBarPositionEnvironmentKey: EnvironmentKey {
24 |     static let defaultValue: TabBarPosition = .edge(.bottom)
   |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'TabBarPosition' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'defaultValue' 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
25 | }
26 |
/Users/admin/builder/spi-builder-workspace/Sources/CustomTabView/Example/TopIndicatorTabBarView.swift:83:16: warning: static property 'defaultValue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 81 |
 82 | struct SizePreferenceKey: PreferenceKey {
 83 |     static var defaultValue: CGSize = .zero
    |                |- warning: static property 'defaultValue' 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 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: annotate 'defaultValue' 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
 84 |     static func reduce(value: inout CGSize, nextValue: () -> CGSize) {}
 85 | }
[11/12] Compiling CustomTabView CustomTabView.swift
/Users/admin/builder/spi-builder-workspace/Sources/CustomTabView/CustomTabView.swift:89:45: warning: call to main actor-isolated initializer 'init(rootView:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 87 |         return NSTabViewControllerRepresentable(
 88 |             selectedTabIndex: selectedTabIndex,
 89 |             controlledViews: children.map { NSHostingController(rootView: $0) }
    |                                             `- warning: call to main actor-isolated initializer 'init(rootView:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 90 |         )
 91 |         #endif
SwiftUI.NSHostingController:7:23: note: calls to initializer 'init(rootView:)' from outside of its actor context are implicitly asynchronous
 5 | @available(visionOS, unavailable)
 6 | @MainActor open class NSHostingController<Content> : NSViewController where Content : View {
 7 |     @MainActor public init(rootView: Content)
   |                       `- note: calls to initializer 'init(rootView:)' from outside of its actor context are implicitly asynchronous
 8 |     @MainActor public init?(coder: NSCoder, rootView: Content)
 9 |     @MainActor required dynamic public init?(coder: NSCoder)
/Users/admin/builder/spi-builder-workspace/Sources/CustomTabView/CustomTabView.swift:89:45: warning: sending '$0' risks causing data races; this is an error in the Swift 6 language mode
 87 |         return NSTabViewControllerRepresentable(
 88 |             selectedTabIndex: selectedTabIndex,
 89 |             controlledViews: children.map { NSHostingController(rootView: $0) }
    |                                             |- warning: sending '$0' risks causing data races; this is an error in the Swift 6 language mode
    |                                             `- note: sending task-isolated '$0' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
 90 |         )
 91 |         #endif
[12/12] Compiling CustomTabView BottomFloatingTabBarView.swift
Build complete! (38.07s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "CustomTabView",
  "name" : "CustomTabView",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "CustomTabView",
      "targets" : [
        "CustomTabView"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CustomTabViewTests",
      "module_type" : "SwiftTarget",
      "name" : "CustomTabViewTests",
      "path" : "Tests/CustomTabViewTests",
      "sources" : [
        "CustomTabViewTests.swift"
      ],
      "target_dependencies" : [
        "CustomTabView"
      ],
      "type" : "test"
    },
    {
      "c99name" : "CustomTabView",
      "module_type" : "SwiftTarget",
      "name" : "CustomTabView",
      "path" : "Sources/CustomTabView",
      "product_memberships" : [
        "CustomTabView"
      ],
      "sources" : [
        "CustomTabView.swift",
        "EnvironmentValues+TabBarPosition.swift",
        "Example/BottomFloatingTabBarView.swift",
        "Example/ExampleView.swift",
        "Example/Tab.swift",
        "Example/TopIndicatorTabBarView.swift",
        "iOS/KeyboardReadable.swift",
        "iOS/UITabBarControllerRepresentable.swift",
        "macOS/NSTabBarControllerRepresentable.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.