Build Information
Successful build of SwiftCache, reference main (ca608b), with Swift 6.1 for macOS (SPM) on 16 Feb 2026 22:07:22 UTC.
Swift 6 data race errors: 11
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.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 InferSendableFromCapturesBuild Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/SudhirGadhvi/SwiftCache-SDK.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/SudhirGadhvi/SwiftCache-SDK
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at ca608b1 Fix duplicate image entries in README
Cloned https://github.com/SudhirGadhvi/SwiftCache-SDK.git
Revision (git rev-parse @):
ca608b16334c2db42e091d1c5b749d00f77ab2bc
SUCCESS checkout https://github.com/SudhirGadhvi/SwiftCache-SDK.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/SudhirGadhvi/SwiftCache-SDK.git
https://github.com/SudhirGadhvi/SwiftCache-SDK.git
{
"dependencies" : [
],
"manifest_display_name" : "SwiftCache",
"name" : "SwiftCache",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "tvos",
"version" : "14.0"
},
{
"name" : "watchos",
"version" : "7.0"
}
],
"products" : [
{
"name" : "SwiftCache",
"targets" : [
"SwiftCache"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SwiftCacheTests",
"module_type" : "SwiftTarget",
"name" : "SwiftCacheTests",
"path" : "Tests/SwiftCacheTests",
"sources" : [
"SwiftCacheTests.swift"
],
"target_dependencies" : [
"SwiftCache"
],
"type" : "test"
},
{
"c99name" : "SwiftCache",
"module_type" : "SwiftTarget",
"name" : "SwiftCache",
"path" : "Sources/SwiftCache",
"product_memberships" : [
"SwiftCache"
],
"sources" : [
"Core/AdaptiveCachePolicy.swift",
"Core/CacheAnalytics.swift",
"Core/CacheLoader.swift",
"Core/DiskLoader.swift",
"Core/MemoryLoader.swift",
"Core/NetworkLoader.swift",
"Extensions/SwiftCache+Progressive.swift",
"Extensions/UIImageView+SwiftCache.swift",
"Models/CacheConfiguration.swift",
"Models/CacheEntry.swift",
"Models/CancellationToken.swift",
"Models/SwiftCacheError.swift",
"SwiftCache.swift",
"SwiftUI/CachedImage.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.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/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/16] Compiling SwiftCache SwiftCacheError.swift
[4/17] Compiling SwiftCache CancellationToken.swift
[5/17] Compiling SwiftCache SwiftCache.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:110:40: warning: non-sendable result type 'Result<CacheLoadResult, SwiftCacheError>' cannot be sent from actor-isolated context in call to instance method 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
108 | let startTime = CFAbsoluteTimeGetCurrent()
109 |
110 | let result = await loaderChain.load(key: key, url: url, ttl: effectiveTTL)
| `- warning: non-sendable result type 'Result<CacheLoadResult, SwiftCacheError>' cannot be sent from actor-isolated context in call to instance method 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
111 |
112 | let duration = CFAbsoluteTimeGetCurrent() - startTime
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/CacheLoader.swift:49:15: note: consider making struct 'CacheLoadResult' conform to the 'Sendable' protocol
47 |
48 | /// Result payload for successful cache loads with layer metadata.
49 | public struct CacheLoadResult {
| `- note: consider making struct 'CacheLoadResult' conform to the 'Sendable' protocol
50 | public let image: SCImage
51 | public let source: CacheSourceLayer
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:159:39: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
157 |
158 | do {
159 | let image = try await loadImage(from: url, cacheKey: cacheKey, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
160 |
161 | // Check cancellation before completing
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:186:45: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
184 | for url in urls {
185 | group.addTask {
186 | _ = try? await self.loadImage(from: url)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
187 | }
188 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:302:69: warning: non-sendable result type 'CacheConfiguration?' cannot be sent from nonisolated context in call to instance method 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
300 |
301 | let snapshot = adaptiveTelemetry.snapshot()
302 | guard let updatedConfiguration = await adaptivePolicyEngine.recommendConfiguration(
| `- warning: non-sendable result type 'CacheConfiguration?' cannot be sent from nonisolated context in call to instance method 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
303 | current: configuration,
304 | telemetry: snapshot
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:46:29: warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
44 | // Initialize loaders
45 | let config = CacheConfiguration()
46 | self.memoryLoader = MemoryLoader(configuration: config)
| |- warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'config' to actor-isolated callee risks causing data races between actor-isolated and local nonisolated uses
47 | self.diskLoader = DiskLoader(configuration: config)
| `- note: access can happen concurrently
48 | self.networkLoader = NetworkLoader(configuration: config)
49 | self.adaptivePolicyEngine = HeuristicAdaptiveCachePolicyEngine()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:47:27: warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
45 | let config = CacheConfiguration()
46 | self.memoryLoader = MemoryLoader(configuration: config)
47 | self.diskLoader = DiskLoader(configuration: config)
| |- warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'config' to actor-isolated callee risks causing data races between actor-isolated and local nonisolated uses
48 | self.networkLoader = NetworkLoader(configuration: config)
| `- note: access can happen concurrently
49 | self.adaptivePolicyEngine = HeuristicAdaptiveCachePolicyEngine()
50 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:48:30: warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
46 | self.memoryLoader = MemoryLoader(configuration: config)
47 | self.diskLoader = DiskLoader(configuration: config)
48 | self.networkLoader = NetworkLoader(configuration: config)
| |- warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'config' to actor-isolated callee risks causing data races between actor-isolated and local nonisolated uses
49 | self.adaptivePolicyEngine = HeuristicAdaptiveCachePolicyEngine()
50 |
51 | // Create chain: Memory → Disk → Network
52 | self.loaderChain = CacheLoaderChain(
| `- note: access can happen concurrently
53 | loaders: [memoryLoader, diskLoader, networkLoader],
54 | configuration: config
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:70:24: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
68 |
69 | // Recreate loaders with new configuration
70 | memoryLoader = MemoryLoader(configuration: configuration)
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to actor-isolated callee risks causing data races between actor-isolated and 'self'-isolated uses
71 | diskLoader = DiskLoader(configuration: configuration)
72 | networkLoader = NetworkLoader(configuration: configuration)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:71:22: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
69 | // Recreate loaders with new configuration
70 | memoryLoader = MemoryLoader(configuration: configuration)
71 | diskLoader = DiskLoader(configuration: configuration)
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to actor-isolated callee risks causing data races between actor-isolated and 'self'-isolated uses
72 | networkLoader = NetworkLoader(configuration: configuration)
73 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:72:25: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
70 | memoryLoader = MemoryLoader(configuration: configuration)
71 | diskLoader = DiskLoader(configuration: configuration)
72 | networkLoader = NetworkLoader(configuration: configuration)
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to actor-isolated callee risks causing data races between actor-isolated and 'self'-isolated uses
73 |
74 | await loaderChain.setLoaders([memoryLoader, diskLoader, networkLoader])
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:302:69: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
300 |
301 | let snapshot = adaptiveTelemetry.snapshot()
302 | guard let updatedConfiguration = await adaptivePolicyEngine.recommendConfiguration(
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to nonisolated instance method 'recommendConfiguration(current:telemetry:)' risks causing data races between nonisolated and 'self'-isolated uses
303 | current: configuration,
304 | telemetry: snapshot
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:314:24: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
312 |
313 | configuration = updatedConfiguration
314 | memoryLoader = MemoryLoader(configuration: configuration)
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to actor-isolated callee risks causing data races between actor-isolated and 'self'-isolated uses
315 | diskLoader = DiskLoader(configuration: configuration)
316 | networkLoader = NetworkLoader(configuration: configuration)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:315:22: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
313 | configuration = updatedConfiguration
314 | memoryLoader = MemoryLoader(configuration: configuration)
315 | diskLoader = DiskLoader(configuration: configuration)
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to actor-isolated callee risks causing data races between actor-isolated and 'self'-isolated uses
316 | networkLoader = NetworkLoader(configuration: configuration)
317 | await loaderChain.setLoaders([memoryLoader, diskLoader, networkLoader])
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:316:25: warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
314 | memoryLoader = MemoryLoader(configuration: configuration)
315 | diskLoader = DiskLoader(configuration: configuration)
316 | networkLoader = NetworkLoader(configuration: configuration)
| |- warning: sending 'self.configuration' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.configuration' to actor-isolated callee risks causing data races between actor-isolated and 'self'-isolated uses
317 | await loaderChain.setLoaders([memoryLoader, diskLoader, networkLoader])
318 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:387:27: warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
385 | public func storeImage(_ image: SCImage, for key: String, ttl: TimeInterval? = nil) async {
386 | let effectiveTTL = ttl ?? configuration.defaultTTL
387 | await loaderChain.store(image: image, key: key, ttl: effectiveTTL)
| |- warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'image' to actor-isolated instance method 'store(image:key:ttl:)' risks causing data races between actor-isolated and 'self'-isolated uses
388 | }
389 | }
[6/17] Compiling SwiftCache CacheEntry.swift
[7/17] Compiling SwiftCache CacheConfiguration.swift
[8/17] Compiling SwiftCache MemoryLoader.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/MemoryLoader.swift:35:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
33 | }
34 |
35 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
36 | // NSCache is thread-safe, but we're still in actor context for consistency
37 | guard let entry = cache.object(forKey: key as NSString), !entry.isExpired else {
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/MemoryLoader.swift:43:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
41 | }
42 |
43 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
44 | #if canImport(UIKit)
45 | guard let imageData = image.jpegData(compressionQuality: configuration.diskImageQuality) else { return }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/NetworkLoader.swift:34:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
32 | }
33 |
34 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
35 | let request = URLRequest(url: url, cachePolicy: .returnCacheDataElseLoad)
36 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/NetworkLoader.swift:50:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
48 | }
49 |
50 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
51 | // Network loader doesn't store images
52 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
[9/17] Compiling SwiftCache NetworkLoader.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/MemoryLoader.swift:35:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
33 | }
34 |
35 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
36 | // NSCache is thread-safe, but we're still in actor context for consistency
37 | guard let entry = cache.object(forKey: key as NSString), !entry.isExpired else {
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/MemoryLoader.swift:43:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
41 | }
42 |
43 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
44 | #if canImport(UIKit)
45 | guard let imageData = image.jpegData(compressionQuality: configuration.diskImageQuality) else { return }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/NetworkLoader.swift:34:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
32 | }
33 |
34 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
35 | let request = URLRequest(url: url, cachePolicy: .returnCacheDataElseLoad)
36 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/NetworkLoader.swift:50:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
48 | }
49 |
50 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
51 | // Network loader doesn't store images
52 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
[10/17] Compiling SwiftCache SwiftCache+Progressive.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:42:32: warning: non-sendable type 'CacheConfiguration' of property 'configuration' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
40 |
41 | let task = Task {
42 | let config = await configuration
| `- warning: non-sendable type 'CacheConfiguration' of property 'configuration' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
43 |
44 | guard config.enableProgressiveLoading else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:47:43: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
45 | // Progressive loading disabled, just load full image
46 | do {
47 | let image = try await loadImage(from: url, cacheKey: cacheKey, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
48 | await onFullImage(.success(image))
49 | } catch {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:61:47: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
59 | if let thumbnailURL = thumbnailURL {
60 | do {
61 | let thumbnail = try await loadImage(from: thumbnailURL, cacheKey: "\(key)_thumb", ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
62 | await onThumbnail(thumbnail)
63 | } catch {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:70:51: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
68 | if !token.isCancelled {
69 | do {
70 | let fullImage = try await loadImage(from: url, cacheKey: key, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
71 | await onFullImage(.success(fullImage))
72 | } catch {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:79:47: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
77 | // Generate thumbnail from full image
78 | do {
79 | let fullImage = try await loadImage(from: url, cacheKey: key, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
80 |
81 | // Generate and show thumbnail first
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:82:46: warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from actor-isolated context in call to instance method 'generateThumbnail(from:)'; this is an error in the Swift 6 language mode
80 |
81 | // Generate and show thumbnail first
82 | if let thumbnail = await generateThumbnail(from: fullImage) {
| `- warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from actor-isolated context in call to instance method 'generateThumbnail(from:)'; this is an error in the Swift 6 language mode
83 | await onThumbnail(thumbnail)
84 | }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:82:46: warning: sending 'fullImage' risks causing data races; this is an error in the Swift 6 language mode
80 |
81 | // Generate and show thumbnail first
82 | if let thumbnail = await generateThumbnail(from: fullImage) {
| |- warning: sending 'fullImage' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'fullImage' to actor-isolated instance method 'generateThumbnail(from:)' risks causing data races between actor-isolated and local nonisolated uses
83 | await onThumbnail(thumbnail)
84 | }
85 |
86 | // Then show full image
87 | await onFullImage(.success(fullImage))
| `- note: access can happen concurrently
88 | } catch {
89 | await onFullImage(.failure(error as? SwiftCacheError ?? .unknown))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:83:31: warning: sending 'thumbnail' risks causing data races; this is an error in the Swift 6 language mode
81 | // Generate and show thumbnail first
82 | if let thumbnail = await generateThumbnail(from: fullImage) {
83 | await onThumbnail(thumbnail)
| |- warning: sending 'thumbnail' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'thumbnail' to main actor-isolated callee risks causing data races between main actor-isolated and 'self'-isolated uses
84 | }
85 |
[11/17] Compiling SwiftCache UIImageView+SwiftCache.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:42:32: warning: non-sendable type 'CacheConfiguration' of property 'configuration' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
40 |
41 | let task = Task {
42 | let config = await configuration
| `- warning: non-sendable type 'CacheConfiguration' of property 'configuration' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
43 |
44 | guard config.enableProgressiveLoading else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:47:43: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
45 | // Progressive loading disabled, just load full image
46 | do {
47 | let image = try await loadImage(from: url, cacheKey: cacheKey, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
48 | await onFullImage(.success(image))
49 | } catch {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:61:47: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
59 | if let thumbnailURL = thumbnailURL {
60 | do {
61 | let thumbnail = try await loadImage(from: thumbnailURL, cacheKey: "\(key)_thumb", ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
62 | await onThumbnail(thumbnail)
63 | } catch {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:70:51: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
68 | if !token.isCancelled {
69 | do {
70 | let fullImage = try await loadImage(from: url, cacheKey: key, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
71 | await onFullImage(.success(fullImage))
72 | } catch {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:79:47: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
77 | // Generate thumbnail from full image
78 | do {
79 | let fullImage = try await loadImage(from: url, cacheKey: key, ttl: ttl)
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
80 |
81 | // Generate and show thumbnail first
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:82:46: warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from actor-isolated context in call to instance method 'generateThumbnail(from:)'; this is an error in the Swift 6 language mode
80 |
81 | // Generate and show thumbnail first
82 | if let thumbnail = await generateThumbnail(from: fullImage) {
| `- warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from actor-isolated context in call to instance method 'generateThumbnail(from:)'; this is an error in the Swift 6 language mode
83 | await onThumbnail(thumbnail)
84 | }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:82:46: warning: sending 'fullImage' risks causing data races; this is an error in the Swift 6 language mode
80 |
81 | // Generate and show thumbnail first
82 | if let thumbnail = await generateThumbnail(from: fullImage) {
| |- warning: sending 'fullImage' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'fullImage' to actor-isolated instance method 'generateThumbnail(from:)' risks causing data races between actor-isolated and local nonisolated uses
83 | await onThumbnail(thumbnail)
84 | }
85 |
86 | // Then show full image
87 | await onFullImage(.success(fullImage))
| `- note: access can happen concurrently
88 | } catch {
89 | await onFullImage(.failure(error as? SwiftCacheError ?? .unknown))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Extensions/SwiftCache+Progressive.swift:83:31: warning: sending 'thumbnail' risks causing data races; this is an error in the Swift 6 language mode
81 | // Generate and show thumbnail first
82 | if let thumbnail = await generateThumbnail(from: fullImage) {
83 | await onThumbnail(thumbnail)
| |- warning: sending 'thumbnail' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'thumbnail' to main actor-isolated callee risks causing data races between main actor-isolated and 'self'-isolated uses
84 | }
85 |
[12/17] Compiling SwiftCache CacheLoader.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/CacheLoader.swift:76:41: warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from nonisolated context in call to instance method 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
74 | // Try each loader in sequence
75 | for (index, loader) in loaders.enumerated() {
76 | if let image = await loader.load(key: key, url: url, ttl: ttl) {
| `- warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from nonisolated context in call to instance method 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
77 | // Promote to previous layers (e.g., if found on disk, store in memory)
78 | for previousIndex in 0..<index {
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/DiskLoader.swift:53:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
51 | }
52 |
53 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
54 | let fileURL = cacheURL(for: key)
55 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/DiskLoader.swift:76:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
74 | }
75 |
76 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
77 | #if canImport(UIKit)
78 | guard let data = image.jpegData(compressionQuality: configuration.diskImageQuality) else { return }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/CacheLoader.swift:104:31: warning: passing closure as a 'sending' parameter risks causing data races between 'self'-isolated code and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | await withTaskGroup(of: Void.self) { group in
103 | for loader in loaders {
104 | group.addTask {
| `- warning: passing closure as a 'sending' parameter risks causing data races between 'self'-isolated code and concurrent execution of the closure; this is an error in the Swift 6 language mode
105 | await loader.store(image: image, key: key, ttl: ttl)
| `- note: closure captures 'image' which is accessible to 'self'-isolated code
106 | }
107 | }
[13/17] Compiling SwiftCache DiskLoader.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/CacheLoader.swift:76:41: warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from nonisolated context in call to instance method 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
74 | // Try each loader in sequence
75 | for (index, loader) in loaders.enumerated() {
76 | if let image = await loader.load(key: key, url: url, ttl: ttl) {
| `- warning: non-sendable result type 'SCImage?' (aka 'Optional<NSImage>') cannot be sent from nonisolated context in call to instance method 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
77 | // Promote to previous layers (e.g., if found on disk, store in memory)
78 | for previousIndex in 0..<index {
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/DiskLoader.swift:53:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
51 | }
52 |
53 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
54 | let fileURL = cacheURL(for: key)
55 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/DiskLoader.swift:76:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
74 | }
75 |
76 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
77 | #if canImport(UIKit)
78 | guard let data = image.jpegData(compressionQuality: configuration.diskImageQuality) else { return }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/CacheLoader.swift:104:31: warning: passing closure as a 'sending' parameter risks causing data races between 'self'-isolated code and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | await withTaskGroup(of: Void.self) { group in
103 | for loader in loaders {
104 | group.addTask {
| `- warning: passing closure as a 'sending' parameter risks causing data races between 'self'-isolated code and concurrent execution of the closure; this is an error in the Swift 6 language mode
105 | await loader.store(image: image, key: key, ttl: ttl)
| `- note: closure captures 'image' which is accessible to 'self'-isolated code
106 | }
107 | }
[14/17] Compiling SwiftCache AdaptiveCachePolicy.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/AdaptiveCachePolicy.swift:78:17: warning: non-sendable type 'CacheConfiguration?' cannot be returned from actor-isolated implementation to caller of protocol requirement 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
76 | public init() {}
77 |
78 | public func recommendConfiguration(
| `- warning: non-sendable type 'CacheConfiguration?' cannot be returned from actor-isolated implementation to caller of protocol requirement 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
79 | current configuration: CacheConfiguration,
80 | telemetry: CachePolicyTelemetry
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/AdaptiveCachePolicy.swift:78:17: warning: non-sendable parameter type 'CacheConfiguration' cannot be sent from caller of protocol requirement 'recommendConfiguration(current:telemetry:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
76 | public init() {}
77 |
78 | public func recommendConfiguration(
| `- warning: non-sendable parameter type 'CacheConfiguration' cannot be sent from caller of protocol requirement 'recommendConfiguration(current:telemetry:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
79 | current configuration: CacheConfiguration,
80 | telemetry: CachePolicyTelemetry
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
[15/17] Compiling SwiftCache CacheAnalytics.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/AdaptiveCachePolicy.swift:78:17: warning: non-sendable type 'CacheConfiguration?' cannot be returned from actor-isolated implementation to caller of protocol requirement 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
76 | public init() {}
77 |
78 | public func recommendConfiguration(
| `- warning: non-sendable type 'CacheConfiguration?' cannot be returned from actor-isolated implementation to caller of protocol requirement 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
79 | current configuration: CacheConfiguration,
80 | telemetry: CachePolicyTelemetry
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/AdaptiveCachePolicy.swift:78:17: warning: non-sendable parameter type 'CacheConfiguration' cannot be sent from caller of protocol requirement 'recommendConfiguration(current:telemetry:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
76 | public init() {}
77 |
78 | public func recommendConfiguration(
| `- warning: non-sendable parameter type 'CacheConfiguration' cannot be sent from caller of protocol requirement 'recommendConfiguration(current:telemetry:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
79 | current configuration: CacheConfiguration,
80 | telemetry: CachePolicyTelemetry
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
[16/17] Emitting module SwiftCache
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/AdaptiveCachePolicy.swift:78:17: warning: non-sendable type 'CacheConfiguration?' cannot be returned from actor-isolated implementation to caller of protocol requirement 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
76 | public init() {}
77 |
78 | public func recommendConfiguration(
| `- warning: non-sendable type 'CacheConfiguration?' cannot be returned from actor-isolated implementation to caller of protocol requirement 'recommendConfiguration(current:telemetry:)'; this is an error in the Swift 6 language mode
79 | current configuration: CacheConfiguration,
80 | telemetry: CachePolicyTelemetry
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/AdaptiveCachePolicy.swift:78:17: warning: non-sendable parameter type 'CacheConfiguration' cannot be sent from caller of protocol requirement 'recommendConfiguration(current:telemetry:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
76 | public init() {}
77 |
78 | public func recommendConfiguration(
| `- warning: non-sendable parameter type 'CacheConfiguration' cannot be sent from caller of protocol requirement 'recommendConfiguration(current:telemetry:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
79 | current configuration: CacheConfiguration,
80 | telemetry: CachePolicyTelemetry
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Models/CacheConfiguration.swift:12:15: note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
10 |
11 | /// Configuration options for SwiftCache
12 | public struct CacheConfiguration {
| `- note: consider making struct 'CacheConfiguration' conform to the 'Sendable' protocol
13 |
14 | // MARK: - Memory Cache Settings
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/DiskLoader.swift:53:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
51 | }
52 |
53 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
54 | let fileURL = cacheURL(for: key)
55 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/DiskLoader.swift:76:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
74 | }
75 |
76 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
77 | #if canImport(UIKit)
78 | guard let data = image.jpegData(compressionQuality: configuration.diskImageQuality) else { return }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/MemoryLoader.swift:35:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
33 | }
34 |
35 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
36 | // NSCache is thread-safe, but we're still in actor context for consistency
37 | guard let entry = cache.object(forKey: key as NSString), !entry.isExpired else {
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/MemoryLoader.swift:43:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
41 | }
42 |
43 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
44 | #if canImport(UIKit)
45 | guard let imageData = image.jpegData(compressionQuality: configuration.diskImageQuality) else { return }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/NetworkLoader.swift:34:17: warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
32 | }
33 |
34 | public func load(key: String, url: URL, ttl: TimeInterval) async -> SCImage? {
| `- warning: non-sendable type 'SCImage?' (aka 'Optional<NSImage>') cannot be returned from actor-isolated implementation to caller of protocol requirement 'load(key:url:ttl:)'; this is an error in the Swift 6 language mode
35 | let request = URLRequest(url: url, cachePolicy: .returnCacheDataElseLoad)
36 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/Core/NetworkLoader.swift:50:17: warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
48 | }
49 |
50 | public func store(image: SCImage, key: String, ttl: TimeInterval) async {
| `- warning: non-sendable parameter type 'SCImage' (aka 'NSImage') cannot be sent from caller of protocol requirement 'store(image:key:ttl:)' into actor-isolated implementation; this is an error in the Swift 6 language mode
51 | // Network loader doesn't store images
52 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:46:29: warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
44 | // Initialize loaders
45 | let config = CacheConfiguration()
46 | self.memoryLoader = MemoryLoader(configuration: config)
| |- warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'config' to actor-isolated initializer 'init(configuration:)' risks causing data races between actor-isolated and local nonisolated uses
47 | self.diskLoader = DiskLoader(configuration: config)
| `- note: access can happen concurrently
48 | self.networkLoader = NetworkLoader(configuration: config)
49 | self.adaptivePolicyEngine = HeuristicAdaptiveCachePolicyEngine()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:47:27: warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
45 | let config = CacheConfiguration()
46 | self.memoryLoader = MemoryLoader(configuration: config)
47 | self.diskLoader = DiskLoader(configuration: config)
| |- warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'config' to actor-isolated initializer 'init(configuration:)' risks causing data races between actor-isolated and local nonisolated uses
48 | self.networkLoader = NetworkLoader(configuration: config)
| `- note: access can happen concurrently
49 | self.adaptivePolicyEngine = HeuristicAdaptiveCachePolicyEngine()
50 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftCache.swift:48:30: warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
46 | self.memoryLoader = MemoryLoader(configuration: config)
47 | self.diskLoader = DiskLoader(configuration: config)
48 | self.networkLoader = NetworkLoader(configuration: config)
| |- warning: sending 'config' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'config' to actor-isolated initializer 'init(configuration:)' risks causing data races between actor-isolated and local nonisolated uses
49 | self.adaptivePolicyEngine = HeuristicAdaptiveCachePolicyEngine()
50 |
51 | // Create chain: Memory → Disk → Network
52 | self.loaderChain = CacheLoaderChain(
| `- note: access can happen concurrently
53 | loaders: [memoryLoader, diskLoader, networkLoader],
54 | configuration: config
[17/17] Compiling SwiftCache CachedImage.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCache/SwiftUI/CachedImage.swift:61:59: warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
59 |
60 | do {
61 | let loadedImage = try await SwiftCache.shared.loadImage(
| `- warning: non-sendable result type 'SCImage' (aka 'NSImage') cannot be sent from actor-isolated context in call to instance method 'loadImage(from:cacheKey:ttl:)'; this is an error in the Swift 6 language mode
62 | from: url,
63 | cacheKey: cacheKey,
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h:66:12: note: class 'NSImage' does not conform to the 'Sendable' protocol
64 | __attribute__((objc_subclassing_restricted))
65 | #endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
66 | @interface NSImage : NSObject
| `- note: class 'NSImage' does not conform to the 'Sendable' protocol
67 |
68 | #pragma mark - Initialization
Build complete! (9.99s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "SwiftCache",
"name" : "SwiftCache",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "tvos",
"version" : "14.0"
},
{
"name" : "watchos",
"version" : "7.0"
}
],
"products" : [
{
"name" : "SwiftCache",
"targets" : [
"SwiftCache"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SwiftCacheTests",
"module_type" : "SwiftTarget",
"name" : "SwiftCacheTests",
"path" : "Tests/SwiftCacheTests",
"sources" : [
"SwiftCacheTests.swift"
],
"target_dependencies" : [
"SwiftCache"
],
"type" : "test"
},
{
"c99name" : "SwiftCache",
"module_type" : "SwiftTarget",
"name" : "SwiftCache",
"path" : "Sources/SwiftCache",
"product_memberships" : [
"SwiftCache"
],
"sources" : [
"Core/AdaptiveCachePolicy.swift",
"Core/CacheAnalytics.swift",
"Core/CacheLoader.swift",
"Core/DiskLoader.swift",
"Core/MemoryLoader.swift",
"Core/NetworkLoader.swift",
"Extensions/SwiftCache+Progressive.swift",
"Extensions/UIImageView+SwiftCache.swift",
"Models/CacheConfiguration.swift",
"Models/CacheEntry.swift",
"Models/CancellationToken.swift",
"Models/SwiftCacheError.swift",
"SwiftCache.swift",
"SwiftUI/CachedImage.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.