This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Failed to build DataCache with Swift 6.0 for Linux.

Build Command

bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/huynguyencong/DataCache.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/huynguyencong/DataCache
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at bcb54d3 Update Podspec tag and package iOS version
Cloned https://github.com/huynguyencong/DataCache.git
Revision (git rev-parse @):
bcb54d313a6ab16fc3f8fa5884ec0f5f331c6ae3
SUCCESS checkout https://github.com/huynguyencong/DataCache.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $workDir
https://github.com/huynguyencong/DataCache.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Compiling DataCache Dictionary+Cache.swift
[4/6] Emitting module DataCache
/host/spi-builder-workspace/Sources/DataCache.swift:22:47: error: cannot find type 'TimeInterval' in scope
 20 |     static let cacheDirectoryPrefix = "com.nch.cache."
 21 |     static let ioQueuePrefix = "com.nch.queue."
 22 |     static let defaultMaxCachePeriodInSecond: TimeInterval = 60 * 60 * 24 * 7         // a week
    |                                               `- error: cannot find type 'TimeInterval' in scope
 23 |
 24 |     public static let instance = DataCache(name: "default")
/host/spi-builder-workspace/Sources/DataCache.swift:24:23: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'DataCache' may have shared mutable state; this is an error in the Swift 6 language mode
 17 | }
 18 |
 19 | open class DataCache {
    |            `- note: class 'DataCache' does not conform to the 'Sendable' protocol
 20 |     static let cacheDirectoryPrefix = "com.nch.cache."
 21 |     static let ioQueuePrefix = "com.nch.queue."
 22 |     static let defaultMaxCachePeriodInSecond: TimeInterval = 60 * 60 * 24 * 7         // a week
 23 |
 24 |     public static let instance = DataCache(name: "default")
    |                       |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'DataCache' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'instance' with '@MainActor' if property should only be accessed from the main actor
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 25 |
 26 |     let cachePath: String
/host/spi-builder-workspace/Sources/DataCache.swift:28:20: error: cannot find 'NSCache' in scope
 26 |     let cachePath: String
 27 |
 28 |     let memCache = NSCache<AnyObject, AnyObject>()
    |                    `- error: cannot find 'NSCache' in scope
 29 |     let ioQueue: DispatchQueue
 30 |     let fileManager: FileManager
/host/spi-builder-workspace/Sources/DataCache.swift:29:18: error: cannot find type 'DispatchQueue' in scope
 27 |
 28 |     let memCache = NSCache<AnyObject, AnyObject>()
 29 |     let ioQueue: DispatchQueue
    |                  `- error: cannot find type 'DispatchQueue' in scope
 30 |     let fileManager: FileManager
 31 |
/host/spi-builder-workspace/Sources/DataCache.swift:30:22: error: cannot find type 'FileManager' in scope
 28 |     let memCache = NSCache<AnyObject, AnyObject>()
 29 |     let ioQueue: DispatchQueue
 30 |     let fileManager: FileManager
    |                      `- error: cannot find type 'FileManager' in scope
 31 |
 32 |     /// Name of cache
/host/spi-builder-workspace/Sources/DataCache.swift:69:29: error: cannot find type 'Data' in scope
 67 |
 68 |     /// Write data for key. This is an async operation.
 69 |     public func write(data: Data, forKey key: String) {
    |                             `- error: cannot find type 'Data' in scope
 70 |         memCache.setObject(data as AnyObject, forKey: key as AnyObject)
 71 |         writeDataToDisk(data: data, key: key)
/host/spi-builder-workspace/Sources/DataCache.swift:74:40: error: cannot find type 'Data' in scope
 72 |     }
 73 |
 74 |     private func writeDataToDisk(data: Data, key: String) {
    |                                        `- error: cannot find type 'Data' in scope
 75 |         ioQueue.async {
 76 |             if self.fileManager.fileExists(atPath: self.cachePath) == false {
/host/spi-builder-workspace/Sources/DataCache.swift:89:48: error: cannot find type 'Data' in scope
 87 |
 88 |     /// Read data for key
 89 |     public func readData(forKey key:String) -> Data? {
    |                                                `- error: cannot find type 'Data' in scope
 90 |         var data = memCache.object(forKey: key as AnyObject) as? Data
 91 |
/host/spi-builder-workspace/Sources/DataCache.swift:103:57: error: cannot find type 'Data' in scope
101 |
102 |     /// Read data from disk for key
103 |     public func readDataFromDisk(forKey key: String) -> Data? {
    |                                                         `- error: cannot find type 'Data' in scope
104 |         return self.fileManager.contents(atPath: cachePath(forKey: key))
105 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:124:31: error: cannot find type 'NSCoding' in scope
122 |     ///
123 |     /// NOTE: Can't write `UIImage` with this method. Please use `writeImage(_:forKey:)` to write an image
124 |     public func write(object: NSCoding, forKey key: String) {
    |                               `- error: cannot find type 'NSCoding' in scope
125 |         let data = NSKeyedArchiver.archivedData(withRootObject: object)
126 |         write(data: data, forKey: key)
/host/spi-builder-workspace/Sources/DataCache.swift:145:51: error: cannot find type 'NSObject' in scope
143 |
144 |     /// Read an object for key. This object must inherit from `NSObject` and implement NSCoding protocol. `String`, `Array`, `Dictionary` conform to this method
145 |     public func readObject(forKey key: String) -> NSObject? {
    |                                                   `- error: cannot find type 'NSObject' in scope
146 |         let data = readData(forKey: key)
147 |
/host/spi-builder-workspace/Sources/DataCache.swift:293:6: error: Objective-C interoperability is disabled
291 |
292 |     /// Clean expired disk cache. This is an async operation.
293 |     @objc public func cleanExpiredDiskCache() {
    |      `- error: Objective-C interoperability is disabled
294 |         cleanExpiredDiskCache(completion: nil)
295 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:303:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
301 |      - parameter completionHandler: Called after the operation completes.
302 |      */
303 |     open func cleanExpiredDiskCache(completion handler: (()->())? = nil) {
    |     `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
304 |
305 |         // Do things in cocurrent io queue
/host/spi-builder-workspace/Sources/DataCache.swift:367:83: error: cannot find type 'URL' in scope
365 |
366 |     // This method is from Kingfisher
367 |     fileprivate func travelCachedFiles(onlyForCacheSize: Bool) -> (urlsToDelete: [URL], diskCacheSize: UInt, cachedFiles: [URL: URLResourceValues]) {
    |                                                                                   `- error: cannot find type 'URL' in scope
368 |
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
/host/spi-builder-workspace/Sources/DataCache.swift:367:124: error: cannot find type 'URL' in scope
365 |
366 |     // This method is from Kingfisher
367 |     fileprivate func travelCachedFiles(onlyForCacheSize: Bool) -> (urlsToDelete: [URL], diskCacheSize: UInt, cachedFiles: [URL: URLResourceValues]) {
    |                                                                                                                            `- error: cannot find type 'URL' in scope
368 |
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
[5/6] Compiling DataCache DataCache.swift
/host/spi-builder-workspace/Sources/DataCache.swift:22:47: error: cannot find type 'TimeInterval' in scope
 20 |     static let cacheDirectoryPrefix = "com.nch.cache."
 21 |     static let ioQueuePrefix = "com.nch.queue."
 22 |     static let defaultMaxCachePeriodInSecond: TimeInterval = 60 * 60 * 24 * 7         // a week
    |                                               `- error: cannot find type 'TimeInterval' in scope
 23 |
 24 |     public static let instance = DataCache(name: "default")
/host/spi-builder-workspace/Sources/DataCache.swift:24:23: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'DataCache' may have shared mutable state; this is an error in the Swift 6 language mode
 17 | }
 18 |
 19 | open class DataCache {
    |            `- note: class 'DataCache' does not conform to the 'Sendable' protocol
 20 |     static let cacheDirectoryPrefix = "com.nch.cache."
 21 |     static let ioQueuePrefix = "com.nch.queue."
 22 |     static let defaultMaxCachePeriodInSecond: TimeInterval = 60 * 60 * 24 * 7         // a week
 23 |
 24 |     public static let instance = DataCache(name: "default")
    |                       |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'DataCache' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'instance' with '@MainActor' if property should only be accessed from the main actor
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 25 |
 26 |     let cachePath: String
/host/spi-builder-workspace/Sources/DataCache.swift:28:20: error: cannot find 'NSCache' in scope
 26 |     let cachePath: String
 27 |
 28 |     let memCache = NSCache<AnyObject, AnyObject>()
    |                    `- error: cannot find 'NSCache' in scope
 29 |     let ioQueue: DispatchQueue
 30 |     let fileManager: FileManager
/host/spi-builder-workspace/Sources/DataCache.swift:29:18: error: cannot find type 'DispatchQueue' in scope
 27 |
 28 |     let memCache = NSCache<AnyObject, AnyObject>()
 29 |     let ioQueue: DispatchQueue
    |                  `- error: cannot find type 'DispatchQueue' in scope
 30 |     let fileManager: FileManager
 31 |
/host/spi-builder-workspace/Sources/DataCache.swift:30:22: error: cannot find type 'FileManager' in scope
 28 |     let memCache = NSCache<AnyObject, AnyObject>()
 29 |     let ioQueue: DispatchQueue
 30 |     let fileManager: FileManager
    |                      `- error: cannot find type 'FileManager' in scope
 31 |
 32 |     /// Name of cache
/host/spi-builder-workspace/Sources/DataCache.swift:69:29: error: cannot find type 'Data' in scope
 67 |
 68 |     /// Write data for key. This is an async operation.
 69 |     public func write(data: Data, forKey key: String) {
    |                             `- error: cannot find type 'Data' in scope
 70 |         memCache.setObject(data as AnyObject, forKey: key as AnyObject)
 71 |         writeDataToDisk(data: data, key: key)
/host/spi-builder-workspace/Sources/DataCache.swift:74:40: error: cannot find type 'Data' in scope
 72 |     }
 73 |
 74 |     private func writeDataToDisk(data: Data, key: String) {
    |                                        `- error: cannot find type 'Data' in scope
 75 |         ioQueue.async {
 76 |             if self.fileManager.fileExists(atPath: self.cachePath) == false {
/host/spi-builder-workspace/Sources/DataCache.swift:89:48: error: cannot find type 'Data' in scope
 87 |
 88 |     /// Read data for key
 89 |     public func readData(forKey key:String) -> Data? {
    |                                                `- error: cannot find type 'Data' in scope
 90 |         var data = memCache.object(forKey: key as AnyObject) as? Data
 91 |
/host/spi-builder-workspace/Sources/DataCache.swift:103:57: error: cannot find type 'Data' in scope
101 |
102 |     /// Read data from disk for key
103 |     public func readDataFromDisk(forKey key: String) -> Data? {
    |                                                         `- error: cannot find type 'Data' in scope
104 |         return self.fileManager.contents(atPath: cachePath(forKey: key))
105 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:124:31: error: cannot find type 'NSCoding' in scope
122 |     ///
123 |     /// NOTE: Can't write `UIImage` with this method. Please use `writeImage(_:forKey:)` to write an image
124 |     public func write(object: NSCoding, forKey key: String) {
    |                               `- error: cannot find type 'NSCoding' in scope
125 |         let data = NSKeyedArchiver.archivedData(withRootObject: object)
126 |         write(data: data, forKey: key)
/host/spi-builder-workspace/Sources/DataCache.swift:145:51: error: cannot find type 'NSObject' in scope
143 |
144 |     /// Read an object for key. This object must inherit from `NSObject` and implement NSCoding protocol. `String`, `Array`, `Dictionary` conform to this method
145 |     public func readObject(forKey key: String) -> NSObject? {
    |                                                   `- error: cannot find type 'NSObject' in scope
146 |         let data = readData(forKey: key)
147 |
/host/spi-builder-workspace/Sources/DataCache.swift:293:6: error: Objective-C interoperability is disabled
291 |
292 |     /// Clean expired disk cache. This is an async operation.
293 |     @objc public func cleanExpiredDiskCache() {
    |      `- error: Objective-C interoperability is disabled
294 |         cleanExpiredDiskCache(completion: nil)
295 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:303:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
301 |      - parameter completionHandler: Called after the operation completes.
302 |      */
303 |     open func cleanExpiredDiskCache(completion handler: (()->())? = nil) {
    |     `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
304 |
305 |         // Do things in cocurrent io queue
/host/spi-builder-workspace/Sources/DataCache.swift:367:83: error: cannot find type 'URL' in scope
365 |
366 |     // This method is from Kingfisher
367 |     fileprivate func travelCachedFiles(onlyForCacheSize: Bool) -> (urlsToDelete: [URL], diskCacheSize: UInt, cachedFiles: [URL: URLResourceValues]) {
    |                                                                                   `- error: cannot find type 'URL' in scope
368 |
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
/host/spi-builder-workspace/Sources/DataCache.swift:367:124: error: cannot find type 'URL' in scope
365 |
366 |     // This method is from Kingfisher
367 |     fileprivate func travelCachedFiles(onlyForCacheSize: Bool) -> (urlsToDelete: [URL], diskCacheSize: UInt, cachedFiles: [URL: URLResourceValues]) {
    |                                                                                                                            `- error: cannot find type 'URL' in scope
368 |
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
/host/spi-builder-workspace/Sources/DataCache.swift:45:33: error: cannot find 'NSSearchPathForDirectoriesInDomains' in scope
 43 |         self.name = name
 44 |
 45 |         var cachePath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).first!
    |                                 `- error: cannot find 'NSSearchPathForDirectoriesInDomains' in scope
 46 |         cachePath = (cachePath as NSString).appendingPathComponent(DataCache.cacheDirectoryPrefix + name)
 47 |         self.cachePath = cachePath
/host/spi-builder-workspace/Sources/DataCache.swift:45:87: error: cannot find 'FileManager' in scope
 43 |         self.name = name
 44 |
 45 |         var cachePath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).first!
    |                                                                                       `- error: cannot find 'FileManager' in scope
 46 |         cachePath = (cachePath as NSString).appendingPathComponent(DataCache.cacheDirectoryPrefix + name)
 47 |         self.cachePath = cachePath
/host/spi-builder-workspace/Sources/DataCache.swift:45:70: error: cannot infer contextual base in reference to member 'cachesDirectory'
 43 |         self.name = name
 44 |
 45 |         var cachePath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).first!
    |                                                                      `- error: cannot infer contextual base in reference to member 'cachesDirectory'
 46 |         cachePath = (cachePath as NSString).appendingPathComponent(DataCache.cacheDirectoryPrefix + name)
 47 |         self.cachePath = cachePath
/host/spi-builder-workspace/Sources/DataCache.swift:46:35: error: cannot find type 'NSString' in scope
 44 |
 45 |         var cachePath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).first!
 46 |         cachePath = (cachePath as NSString).appendingPathComponent(DataCache.cacheDirectoryPrefix + name)
    |                                   `- error: cannot find type 'NSString' in scope
 47 |         self.cachePath = cachePath
 48 |
/host/spi-builder-workspace/Sources/DataCache.swift:49:19: error: cannot find 'DispatchQueue' in scope
 47 |         self.cachePath = cachePath
 48 |
 49 |         ioQueue = DispatchQueue(label: DataCache.ioQueuePrefix + name)
    |                   `- error: cannot find 'DispatchQueue' in scope
 50 |
 51 |         self.fileManager = FileManager()
/host/spi-builder-workspace/Sources/DataCache.swift:51:28: error: cannot find 'FileManager' in scope
 49 |         ioQueue = DispatchQueue(label: DataCache.ioQueuePrefix + name)
 50 |
 51 |         self.fileManager = FileManager()
    |                            `- error: cannot find 'FileManager' in scope
 52 |
 53 |         #if !os(OSX) && !os(watchOS)
/host/spi-builder-workspace/Sources/DataCache.swift:54:13: error: cannot find 'NotificationCenter' in scope
 52 |
 53 |         #if !os(OSX) && !os(watchOS)
 54 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil)
    |             `- error: cannot find 'NotificationCenter' in scope
 55 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil)
 56 |         #endif
/host/spi-builder-workspace/Sources/DataCache.swift:54:108: error: cannot find 'UIApplication' in scope
 52 |
 53 |         #if !os(OSX) && !os(watchOS)
 54 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil)
    |                                                                                                            `- error: cannot find 'UIApplication' in scope
 55 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil)
 56 |         #endif
/host/spi-builder-workspace/Sources/DataCache.swift:54:68: error: '#selector' can only be used with the Objective-C runtime
 52 |
 53 |         #if !os(OSX) && !os(watchOS)
 54 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil)
    |                                                                    `- error: '#selector' can only be used with the Objective-C runtime
 55 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil)
 56 |         #endif
/host/spi-builder-workspace/Sources/DataCache.swift:55:13: error: cannot find 'NotificationCenter' in scope
 53 |         #if !os(OSX) && !os(watchOS)
 54 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil)
 55 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil)
    |             `- error: cannot find 'NotificationCenter' in scope
 56 |         #endif
 57 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:55:108: error: cannot find 'UIApplication' in scope
 53 |         #if !os(OSX) && !os(watchOS)
 54 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil)
 55 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil)
    |                                                                                                            `- error: cannot find 'UIApplication' in scope
 56 |         #endif
 57 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:55:68: error: '#selector' can only be used with the Objective-C runtime
 53 |         #if !os(OSX) && !os(watchOS)
 54 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil)
 55 |             NotificationCenter.default.addObserver(self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil)
    |                                                                    `- error: '#selector' can only be used with the Objective-C runtime
 56 |         #endif
 57 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:60:9: error: cannot find 'NotificationCenter' in scope
 58 |
 59 |     deinit {
 60 |         NotificationCenter.default.removeObserver(self)
    |         `- error: cannot find 'NotificationCenter' in scope
 61 |     }
 62 | }
/host/spi-builder-workspace/Sources/DataCache.swift:90:66: error: cannot find type 'Data' in scope
 88 |     /// Read data for key
 89 |     public func readData(forKey key:String) -> Data? {
 90 |         var data = memCache.object(forKey: key as AnyObject) as? Data
    |                                                                  `- error: cannot find type 'Data' in scope
 91 |
 92 |         if data == nil {
/host/spi-builder-workspace/Sources/DataCache.swift:109:24: error: cannot find 'JSONEncoder' in scope
107 |     // MARK: - Read & write Codable types
108 |     public func write<T: Encodable>(codable: T, forKey key: String) throws {
109 |         let data = try JSONEncoder().encode(codable)
    |                        `- error: cannot find 'JSONEncoder' in scope
110 |         write(data: data, forKey: key)
111 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:110:9: error: no exact matches in call to instance method 'write'
108 |     public func write<T: Encodable>(codable: T, forKey key: String) throws {
109 |         let data = try JSONEncoder().encode(codable)
110 |         write(data: data, forKey: key)
    |         `- error: no exact matches in call to instance method 'write'
111 |     }
112 |
    :
128 |
129 |     /// Write a string for key
130 |     public func write(string: String, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(data:forKey:)', expected: '(string:forKey:)')
131 |         write(object: string as NSCoding, forKey: key)
132 |     }
133 |
134 |     /// Write a dictionary for key
135 |     public func write(dictionary: Dictionary<AnyHashable, Any>, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(data:forKey:)', expected: '(dictionary:forKey:)')
136 |         write(object: dictionary as NSCoding, forKey: key)
137 |     }
138 |
139 |     /// Write an array for key
140 |     public func write(array: Array<Any>, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(data:forKey:)', expected: '(array:forKey:)')
141 |         write(object: array as NSCoding, forKey: key)
142 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:115:20: error: cannot find 'JSONDecoder' in scope
113 |     public func readCodable<T: Decodable>(forKey key: String) throws -> T? {
114 |         guard let data = readData(forKey: key) else { return nil }
115 |         return try JSONDecoder().decode(T.self, from: data)
    |                    `- error: cannot find 'JSONDecoder' in scope
116 |     }
117 |
/host/spi-builder-workspace/Sources/DataCache.swift:125:20: error: cannot find 'NSKeyedArchiver' in scope
123 |     /// NOTE: Can't write `UIImage` with this method. Please use `writeImage(_:forKey:)` to write an image
124 |     public func write(object: NSCoding, forKey key: String) {
125 |         let data = NSKeyedArchiver.archivedData(withRootObject: object)
    |                    `- error: cannot find 'NSKeyedArchiver' in scope
126 |         write(data: data, forKey: key)
127 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:126:9: error: no exact matches in call to instance method 'write'
124 |     public func write(object: NSCoding, forKey key: String) {
125 |         let data = NSKeyedArchiver.archivedData(withRootObject: object)
126 |         write(data: data, forKey: key)
    |         `- error: no exact matches in call to instance method 'write'
127 |     }
128 |
129 |     /// Write a string for key
130 |     public func write(string: String, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(data:forKey:)', expected: '(string:forKey:)')
131 |         write(object: string as NSCoding, forKey: key)
132 |     }
133 |
134 |     /// Write a dictionary for key
135 |     public func write(dictionary: Dictionary<AnyHashable, Any>, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(data:forKey:)', expected: '(dictionary:forKey:)')
136 |         write(object: dictionary as NSCoding, forKey: key)
137 |     }
138 |
139 |     /// Write an array for key
140 |     public func write(array: Array<Any>, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(data:forKey:)', expected: '(array:forKey:)')
141 |         write(object: array as NSCoding, forKey: key)
142 |     }
/host/spi-builder-workspace/Sources/DataCache.swift:131:33: error: cannot find type 'NSCoding' in scope
129 |     /// Write a string for key
130 |     public func write(string: String, forKey key: String) {
131 |         write(object: string as NSCoding, forKey: key)
    |                                 `- error: cannot find type 'NSCoding' in scope
132 |     }
133 |
/host/spi-builder-workspace/Sources/DataCache.swift:131:9: error: no exact matches in call to instance method 'write'
106 |
107 |     // MARK: - Read & write Codable types
108 |     public func write<T: Encodable>(codable: T, forKey key: String) throws {
    |                 `- note: incorrect labels for candidate (have: '(object:forKey:)', expected: '(codable:forKey:)')
109 |         let data = try JSONEncoder().encode(codable)
110 |         write(data: data, forKey: key)
    :
128 |
129 |     /// Write a string for key
130 |     public func write(string: String, forKey key: String) {
    |                 `- note: incorrect labels for candidate (have: '(object:forKey:)', expected: '(string:forKey:)')
131 |         write(object: string as NSCoding, forKey: key)
    |         `- error: no exact matches in call to instance method 'write'
132 |     }
133 |
/host/spi-builder-workspace/Sources/DataCache.swift:136:37: error: cannot find type 'NSCoding' in scope
134 |     /// Write a dictionary for key
135 |     public func write(dictionary: Dictionary<AnyHashable, Any>, forKey key: String) {
136 |         write(object: dictionary as NSCoding, forKey: key)
    |                                     `- error: cannot find type 'NSCoding' in scope
137 |     }
138 |
/host/spi-builder-workspace/Sources/DataCache.swift:136:14: error: incorrect argument label in call (have 'object:forKey:', expected 'dictionary:forKey:')
134 |     /// Write a dictionary for key
135 |     public func write(dictionary: Dictionary<AnyHashable, Any>, forKey key: String) {
136 |         write(object: dictionary as NSCoding, forKey: key)
    |              `- error: incorrect argument label in call (have 'object:forKey:', expected 'dictionary:forKey:')
137 |     }
138 |
/host/spi-builder-workspace/Sources/DataCache.swift:141:32: error: cannot find type 'NSCoding' in scope
139 |     /// Write an array for key
140 |     public func write(array: Array<Any>, forKey key: String) {
141 |         write(object: array as NSCoding, forKey: key)
    |                                `- error: cannot find type 'NSCoding' in scope
142 |     }
143 |
/host/spi-builder-workspace/Sources/DataCache.swift:141:14: error: incorrect argument label in call (have 'object:forKey:', expected 'array:forKey:')
139 |     /// Write an array for key
140 |     public func write(array: Array<Any>, forKey key: String) {
141 |         write(object: array as NSCoding, forKey: key)
    |              `- error: incorrect argument label in call (have 'object:forKey:', expected 'array:forKey:')
142 |     }
143 |
/host/spi-builder-workspace/Sources/DataCache.swift:355:13: error: cannot find 'DispatchQueue' in scope
353 |             }
354 |
355 |             DispatchQueue.main.async(execute: { () -> Void in
    |             `- error: cannot find 'DispatchQueue' in scope
356 |                 handler?()
357 |             })
/host/spi-builder-workspace/Sources/DataCache.swift:369:28: error: cannot find 'URL' in scope
367 |     fileprivate func travelCachedFiles(onlyForCacheSize: Bool) -> (urlsToDelete: [URL], diskCacheSize: UInt, cachedFiles: [URL: URLResourceValues]) {
368 |
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
    |                            `- error: cannot find 'URL' in scope
370 |         let resourceKeys: Set<URLResourceKey> = [.isDirectoryKey, .contentAccessDateKey, .totalFileAllocatedSizeKey]
371 |         let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)
/host/spi-builder-workspace/Sources/DataCache.swift:370:31: error: cannot find type 'URLResourceKey' in scope
368 |
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
370 |         let resourceKeys: Set<URLResourceKey> = [.isDirectoryKey, .contentAccessDateKey, .totalFileAllocatedSizeKey]
    |                               `- error: cannot find type 'URLResourceKey' in scope
371 |         let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)
372 |
/host/spi-builder-workspace/Sources/DataCache.swift:371:26: error: cannot find type 'Date' in scope
369 |         let diskCacheURL = URL(fileURLWithPath: cachePath)
370 |         let resourceKeys: Set<URLResourceKey> = [.isDirectoryKey, .contentAccessDateKey, .totalFileAllocatedSizeKey]
371 |         let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)
    |                          `- error: cannot find type 'Date' in scope
372 |
373 |         var cachedFiles = [URL: URLResourceValues]()
/host/spi-builder-workspace/Sources/DataCache.swift:373:28: error: cannot find 'URL' in scope
371 |         let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)
372 |
373 |         var cachedFiles = [URL: URLResourceValues]()
    |                            `- error: cannot find 'URL' in scope
374 |         var urlsToDelete = [URL]()
375 |         var diskCacheSize: UInt = 0
/host/spi-builder-workspace/Sources/DataCache.swift:373:33: error: cannot find 'URLResourceValues' in scope
371 |         let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)
372 |
373 |         var cachedFiles = [URL: URLResourceValues]()
    |                                 `- error: cannot find 'URLResourceValues' in scope
374 |         var urlsToDelete = [URL]()
375 |         var diskCacheSize: UInt = 0
/host/spi-builder-workspace/Sources/DataCache.swift:373:27: error: cannot call value of non-function type '[AnyHashable : Any]'
371 |         let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)
372 |
373 |         var cachedFiles = [URL: URLResourceValues]()
    |                           `- error: cannot call value of non-function type '[AnyHashable : Any]'
374 |         var urlsToDelete = [URL]()
375 |         var diskCacheSize: UInt = 0
/host/spi-builder-workspace/Sources/DataCache.swift:374:29: error: cannot find 'URL' in scope
372 |
373 |         var cachedFiles = [URL: URLResourceValues]()
374 |         var urlsToDelete = [URL]()
    |                             `- error: cannot find 'URL' in scope
375 |         var diskCacheSize: UInt = 0
376 |
/host/spi-builder-workspace/Sources/DataCache.swift:374:28: error: cannot call value of non-function type '[Any]'
372 |
373 |         var cachedFiles = [URL: URLResourceValues]()
374 |         var urlsToDelete = [URL]()
    |                            `- error: cannot call value of non-function type '[Any]'
375 |         var diskCacheSize: UInt = 0
376 |
/host/spi-builder-workspace/Sources/DataCache.swift:377:139: error: cannot infer contextual base in reference to member 'skipsHiddenFiles'
375 |         var diskCacheSize: UInt = 0
376 |
377 |         for fileUrl in (try? fileManager.contentsOfDirectory(at: diskCacheURL, includingPropertiesForKeys: Array(resourceKeys), options: .skipsHiddenFiles)) ?? [] {
    |                                                                                                                                           `- error: cannot infer contextual base in reference to member 'skipsHiddenFiles'
378 |
379 |             do {
/host/spi-builder-workspace/Sources/DataCache.swift:412:30: error: cannot find type 'NSString' in scope
410 |     func cachePath(forKey key: String) -> String {
411 |         let fileName = key.md5
412 |         return (cachePath as NSString).appendingPathComponent(fileName)
    |                              `- error: cannot find type 'NSString' in scope
413 |     }
414 | }
[6/6] Compiling DataCache String+MD5.swift
/host/spi-builder-workspace/Sources/String+MD5.swift:35:45: error: missing argument for parameter 'capacity' in call
 33 |             let MD5Data = MD5Calculator.calculate()
 34 |
 35 |             let MD5String = NSMutableString()
    |                                             `- error: missing argument for parameter 'capacity' in call
 36 |             for c in MD5Data {
 37 |                 MD5String.appendFormat("%02x", c)
Foundation.NSMutableString:4:21: note: 'init(capacity:)' declared here
 2 |     open func replaceCharacters(in range: NSRange, with aString: String)
 3 |     override required public init(characters: UnsafePointer<unichar>, length: Int)
 4 |     required public init(capacity: Int)
   |                     `- note: 'init(capacity:)' declared here
 5 |     required public convenience init?(coder aDecoder: NSCoder)
 6 |     required public convenience init(unicodeScalarLiteral value: StaticString)
BUILD FAILURE 6.0 linux
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.