Build Information
Successful build of SwiftMoment with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 5
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/akosma/SwiftMoment.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/akosma/SwiftMoment
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 4cd4ee8 Merge pull request #97 from psi-gh/master
Cloned https://github.com/akosma/SwiftMoment.git
Revision (git rev-parse @):
4cd4ee886328f9514c20f050b81d1725337ddd33
SUCCESS checkout https://github.com/akosma/SwiftMoment.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/akosma/SwiftMoment.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/11] Compiling SwiftMoment MomentFromNow.swift
[4/11] Compiling SwiftMoment TimeUnit.swift
[5/11] Compiling SwiftMoment Operators.swift
[6/11] Compiling SwiftMoment MomentCache.swift
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:17:7: warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'MomentCache.Key' to 'Hashable' by implementing 'hash(into:)' instead
15 | let locale: Locale
16 |
17 | var hashValue: Int {
| `- warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'MomentCache.Key' to 'Hashable' by implementing 'hash(into:)' instead
18 | return tz.hashValue ^ locale.hashValue
19 | }
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:26:21: warning: static property 'calendarCache' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | // our cache and the lock to access it
26 | private static var calendarCache = [Key:Calendar]()
| |- warning: static property 'calendarCache' 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 'calendarCache' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'calendarCache' 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
27 | private static var lock = NSLock()
28 |
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:27:21: warning: static property 'lock' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
25 | // our cache and the lock to access it
26 | private static var calendarCache = [Key:Calendar]()
27 | private static var lock = NSLock()
| |- warning: static property 'lock' 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 'lock' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lock' 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
28 |
29 | // create calendars on demand; in most cases, will return the same calendar
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:46:13: warning: static property 'defaultTimezone' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
44 | static var defaultCalendar : Calendar = { Calendar.autoupdatingCurrent }()
45 | static var defaultLocale : Locale = { Locale.autoupdatingCurrent }()
46 | static var defaultTimezone : TimeZone = { TimeZone.autoupdatingCurrent }()
| |- warning: static property 'defaultTimezone' 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 'defaultTimezone' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultTimezone' 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
47 | }
48 |
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:45:13: warning: static property 'defaultLocale' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
43 |
44 | static var defaultCalendar : Calendar = { Calendar.autoupdatingCurrent }()
45 | static var defaultLocale : Locale = { Locale.autoupdatingCurrent }()
| |- warning: static property 'defaultLocale' 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 'defaultLocale' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultLocale' 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
46 | static var defaultTimezone : TimeZone = { TimeZone.autoupdatingCurrent }()
47 | }
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:44:13: warning: static property 'defaultCalendar' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
42 | }
43 |
44 | static var defaultCalendar : Calendar = { Calendar.autoupdatingCurrent }()
| |- warning: static property 'defaultCalendar' 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 'defaultCalendar' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultCalendar' 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
45 | static var defaultLocale : Locale = { Locale.autoupdatingCurrent }()
46 | static var defaultTimezone : TimeZone = { TimeZone.autoupdatingCurrent }()
[7/11] Compiling SwiftMoment LazyBox.swift
[8/11] Compiling SwiftMoment Extensions.swift
[9/11] Compiling SwiftMoment Duration.swift
[10/11] Compiling SwiftMoment Moment.swift
[11/11] Emitting module SwiftMoment
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:17:7: warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'MomentCache.Key' to 'Hashable' by implementing 'hash(into:)' instead
15 | let locale: Locale
16 |
17 | var hashValue: Int {
| `- warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'MomentCache.Key' to 'Hashable' by implementing 'hash(into:)' instead
18 | return tz.hashValue ^ locale.hashValue
19 | }
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:26:21: warning: static property 'calendarCache' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | // our cache and the lock to access it
26 | private static var calendarCache = [Key:Calendar]()
| |- warning: static property 'calendarCache' 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 'calendarCache' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'calendarCache' 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
27 | private static var lock = NSLock()
28 |
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:27:21: warning: static property 'lock' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
25 | // our cache and the lock to access it
26 | private static var calendarCache = [Key:Calendar]()
27 | private static var lock = NSLock()
| |- warning: static property 'lock' 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 'lock' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lock' 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
28 |
29 | // create calendars on demand; in most cases, will return the same calendar
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:46:13: warning: static property 'defaultTimezone' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
44 | static var defaultCalendar : Calendar = { Calendar.autoupdatingCurrent }()
45 | static var defaultLocale : Locale = { Locale.autoupdatingCurrent }()
46 | static var defaultTimezone : TimeZone = { TimeZone.autoupdatingCurrent }()
| |- warning: static property 'defaultTimezone' 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 'defaultTimezone' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultTimezone' 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
47 | }
48 |
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:45:13: warning: static property 'defaultLocale' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
43 |
44 | static var defaultCalendar : Calendar = { Calendar.autoupdatingCurrent }()
45 | static var defaultLocale : Locale = { Locale.autoupdatingCurrent }()
| |- warning: static property 'defaultLocale' 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 'defaultLocale' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultLocale' 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
46 | static var defaultTimezone : TimeZone = { TimeZone.autoupdatingCurrent }()
47 | }
/Users/admin/builder/spi-builder-workspace/SwiftMoment/SwiftMoment/MomentCache.swift:44:13: warning: static property 'defaultCalendar' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
42 | }
43 |
44 | static var defaultCalendar : Calendar = { Calendar.autoupdatingCurrent }()
| |- warning: static property 'defaultCalendar' 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 'defaultCalendar' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultCalendar' 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
45 | static var defaultLocale : Locale = { Locale.autoupdatingCurrent }()
46 | static var defaultTimezone : TimeZone = { TimeZone.autoupdatingCurrent }()
Build complete! (18.92s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "SwiftMoment",
"name" : "SwiftMoment",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "SwiftMoment",
"targets" : [
"SwiftMoment"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SwiftMomentTests",
"module_type" : "SwiftTarget",
"name" : "SwiftMomentTests",
"path" : ".",
"sources" : [
"SwiftMoment/SwiftMomentTests/DurationTests.swift",
"SwiftMoment/SwiftMomentTests/ExtensionsTests.swift",
"SwiftMoment/SwiftMomentTests/FromNowTests.swift",
"SwiftMoment/SwiftMomentTests/LinuxMain.swift",
"SwiftMoment/SwiftMomentTests/MomentTests.swift",
"SwiftMoment/SwiftMomentTests/XCTestManifests.swift"
],
"target_dependencies" : [
"SwiftMoment"
],
"type" : "test"
},
{
"c99name" : "SwiftMoment",
"module_type" : "SwiftTarget",
"name" : "SwiftMoment",
"path" : ".",
"product_memberships" : [
"SwiftMoment"
],
"sources" : [
"SwiftMoment/SwiftMoment/Duration.swift",
"SwiftMoment/SwiftMoment/Extensions.swift",
"SwiftMoment/SwiftMoment/LazyBox.swift",
"SwiftMoment/SwiftMoment/Moment.swift",
"SwiftMoment/SwiftMoment/MomentCache.swift",
"SwiftMoment/SwiftMoment/MomentFromNow.swift",
"SwiftMoment/SwiftMoment/Operators.swift",
"SwiftMoment/SwiftMoment/TimeUnit.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Done.