Build Information
Successful build of Inject with Swift 6.0 (beta) for macOS (SPM).
Swift 6 data race errors: 3
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/MaximBazarov/Inject.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/MaximBazarov/Inject
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 94c4d40 Update README.md
Cloned https://github.com/MaximBazarov/Inject.git
Revision (git rev-parse @):
94c4d40a5e09606f078720c4cc6aa194defb5d3d
SPI manifest file found: $workDir/.spi.yml
SUCCESS checkout https://github.com/MaximBazarov/Inject.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/MaximBazarov/Inject.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/14] Compiling Inject Strategy.swift
/Users/admin/builder/spi-builder-workspace/Sources/Strategy.swift:53:16: warning: static property 'singleton' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
17 | /// ``Injection`` uses Strategy to define the way instances should be created,
18 | /// shared and when they should be deallocated.
19 | public struct Strategy {
| `- note: consider making struct 'Strategy' conform to the 'Sendable' protocol
20 | let create: InstantiationStrategy
21 | let destroy: DeallocationStrategy
:
51 | public extension Strategy {
52 | /// Instance is shared and never deallocated
53 | static let singleton = Strategy(create: .shared, destroy: .neverDeallocated)
| |- warning: static property 'singleton' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'singleton' 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
54 |
55 | /// Instance is shared but deallocates when no one is using(referring) it.
/Users/admin/builder/spi-builder-workspace/Sources/Strategy.swift:56:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
17 | /// ``Injection`` uses Strategy to define the way instances should be created,
18 | /// shared and when they should be deallocated.
19 | public struct Strategy {
| `- note: consider making struct 'Strategy' conform to the 'Sendable' protocol
20 | let create: InstantiationStrategy
21 | let destroy: DeallocationStrategy
:
54 |
55 | /// Instance is shared but deallocates when no one is using(referring) it.
56 | static let shared = Strategy(create: .shared, destroy: .whenLastConsumerLeave)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
57 |
58 | /// A new instance created for every consumer and deallocates when this consumer deallocates.
/Users/admin/builder/spi-builder-workspace/Sources/Strategy.swift:59:16: warning: static property 'onDemand' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
17 | /// ``Injection`` uses Strategy to define the way instances should be created,
18 | /// shared and when they should be deallocated.
19 | public struct Strategy {
| `- note: consider making struct 'Strategy' conform to the 'Sendable' protocol
20 | let create: InstantiationStrategy
21 | let destroy: DeallocationStrategy
:
57 |
58 | /// A new instance created for every consumer and deallocates when this consumer deallocates.
59 | static let onDemand = Strategy(create: .perConsumer, destroy: .whenLastConsumerLeave)
| |- warning: static property 'onDemand' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'onDemand' 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
60 | }
61 |
[4/15] Compiling Inject Instance.swift
[5/15] Compiling Inject Injected-PropertyWrapper.swift
[6/15] Compiling Inject DependencyKey.swift
[7/15] Compiling Inject Injectable.swift
[8/15] Emitting module Inject
/Users/admin/builder/spi-builder-workspace/Sources/Strategy.swift:53:16: warning: static property 'singleton' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
17 | /// ``Injection`` uses Strategy to define the way instances should be created,
18 | /// shared and when they should be deallocated.
19 | public struct Strategy {
| `- note: consider making struct 'Strategy' conform to the 'Sendable' protocol
20 | let create: InstantiationStrategy
21 | let destroy: DeallocationStrategy
:
51 | public extension Strategy {
52 | /// Instance is shared and never deallocated
53 | static let singleton = Strategy(create: .shared, destroy: .neverDeallocated)
| |- warning: static property 'singleton' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'singleton' 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
54 |
55 | /// Instance is shared but deallocates when no one is using(referring) it.
/Users/admin/builder/spi-builder-workspace/Sources/Strategy.swift:56:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
17 | /// ``Injection`` uses Strategy to define the way instances should be created,
18 | /// shared and when they should be deallocated.
19 | public struct Strategy {
| `- note: consider making struct 'Strategy' conform to the 'Sendable' protocol
20 | let create: InstantiationStrategy
21 | let destroy: DeallocationStrategy
:
54 |
55 | /// Instance is shared but deallocates when no one is using(referring) it.
56 | static let shared = Strategy(create: .shared, destroy: .whenLastConsumerLeave)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
57 |
58 | /// A new instance created for every consumer and deallocates when this consumer deallocates.
/Users/admin/builder/spi-builder-workspace/Sources/Strategy.swift:59:16: warning: static property 'onDemand' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
17 | /// ``Injection`` uses Strategy to define the way instances should be created,
18 | /// shared and when they should be deallocated.
19 | public struct Strategy {
| `- note: consider making struct 'Strategy' conform to the 'Sendable' protocol
20 | let create: InstantiationStrategy
21 | let destroy: DeallocationStrategy
:
57 |
58 | /// A new instance created for every consumer and deallocates when this consumer deallocates.
59 | static let onDemand = Strategy(create: .perConsumer, destroy: .whenLastConsumerLeave)
| |- warning: static property 'onDemand' is not concurrency-safe because non-'Sendable' type 'Strategy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'onDemand' 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
60 | }
61 |
[9/15] Compiling Inject DefaultValues.swift
[10/15] Compiling Inject Dependency.swift
[11/15] Compiling Inject Scope.swift
[12/15] Compiling Inject Context.swift
[13/15] Compiling Inject Lifespan.swift
[14/15] Compiling Inject Injection.swift
[15/15] Compiling Inject Telemetry.swift
Build complete! (21.81s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "Inject",
"name" : "Inject",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "watchos",
"version" : "8.0"
},
{
"name" : "tvos",
"version" : "15.0"
}
],
"products" : [
{
"name" : "Inject",
"targets" : [
"Inject"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "Tests",
"module_type" : "SwiftTarget",
"name" : "Tests",
"path" : "Tests",
"sources" : [
"Override_Tests.swift",
"Strategy_Tests.swift"
],
"target_dependencies" : [
"Inject"
],
"type" : "test"
},
{
"c99name" : "Inject",
"module_type" : "SwiftTarget",
"name" : "Inject",
"path" : "Sources",
"product_memberships" : [
"Inject"
],
"sources" : [
"Deprecating/DefaultValues.swift",
"Deprecating/Dependency.swift",
"Deprecating/DependencyKey.swift",
"Deprecating/Injectable.swift",
"Deprecating/Injected-PropertyWrapper.swift",
"Deprecating/Lifespan.swift",
"Deprecating/Scope.swift",
"Injection.swift",
"Instance.swift",
"Strategy.swift",
"Telemetry/Context.swift",
"Telemetry/Telemetry.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
Done.