Ashen
Ashen copied to clipboard
Can this project run on linux?
I tried running an example app on LInux(I'm using Pop OS)
and I got this error running swift run
`/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:65:25: error: cannot find 'mach_absolute_time' in scope var prevTimestamp = mach_absolute_time() ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:66:16: error: cannot find 'mach_timebase_info' in scope var info = mach_timebase_info(numer: 0, denom: 0) ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:67:5: error: cannot find 'mach_timebase_info' in scope mach_timebase_info(&info) ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:164:23: error: cannot find 'mach_absolute_time' in scope let currentTime = mach_absolute_time() ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Views/Input.swift:618:10: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions .replacingOccurrences(of: "\u{F0004}y", with: "ỳ") /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:574:28: error: cannot find type 'URLRequest' in scope func toURLRequest() -> URLRequest? ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:264:29: error: cannot find type 'NSURLRequest' in scope case networkService(NSURLRequest.NetworkServiceType) // default, voip, video, background, voice ^~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:288:20: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. case mock((URLSessionConfiguration) -> URLSessionProtocol) ^~~~~~~~~~~~~~~~~~~~~~~ Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here public typealias URLSessionConfiguration = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:463:15: error: cannot find type 'URLRequest' in scope with: URLRequest, completionHandler: ((Int, [Http.Header], Data?, Swift.Error?) -> Void)? ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:467:15: error: cannot find type 'URLRequest' in scope with: URLRequest, completionHandler: ((Int, [Http.Header], Data?, Swift.Error?) -> Void)? ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:290:64: error: cannot find type 'URLSessionDelegate' in scope func create(config: URLSessionConfiguration, delegate: URLSessionDelegate) ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:290:29: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. func create(config: URLSessionConfiguration, delegate: URLSessionDelegate) ^~~~~~~~~~~~~~~~~~~~~~~ Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here public typealias URLSessionConfiguration = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:315:18: error: cannot find type 'URLRequest' in scope let request: URLRequest ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:321:27: error: cannot find type 'URLRequest' in scope request request: URLRequest, ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:392:43: error: cannot find type 'URLRequest' in scope private func startDataTask( request: URLRequest) { ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:400:47: error: cannot find type 'URLRequest' in scope private func startDownloadTask(_ request: URLRequest) { ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:410:40: error: cannot find type 'URLSessionDelegate' in scope extension HttpPrivateRequest.Delegate: URLSessionDelegate {} ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:412:40: error: cannot find type 'URLSessionTaskDelegate' in scope extension HttpPrivateRequest.Delegate: URLSessionTaskDelegate { ^~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:419:40: error: cannot find type 'URLSessionDataDelegate' in scope extension HttpPrivateRequest.Delegate: URLSessionDataDelegate { ^~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:424:40: error: cannot find type 'URLSessionDownloadDelegate' in scope extension HttpPrivateRequest.Delegate: URLSessionDownloadDelegate { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:427:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. _ session: URLSession, ^~~~~~~~~~ Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here public typealias URLSession = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:428:23: error: 'URLSessionDownloadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. downloadTask: URLSessionDownloadTask, ^~~~~~~~~~~~~~~~~~~~~~ Foundation.URLSessionDownloadTask:2:18: note: 'URLSessionDownloadTask' has been explicitly marked unavailable here public typealias URLSessionDownloadTask = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:441:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. _ session: URLSession, ^~~~~~~~~~ Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here public typealias URLSession = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:442:23: error: 'URLSessionDownloadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. downloadTask: URLSessionDownloadTask, ^~~~~~~~~~~~~~~~~~~~~~ Foundation.URLSessionDownloadTask:2:18: note: 'URLSessionDownloadTask' has been explicitly marked unavailable here public typealias URLSessionDownloadTask = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:453:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. private func responseToHeaders(_ response: URLResponse?) -> [Http.Header] { ^~~~~~~~~~~ Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here public typealias URLResponse = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:473:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended extension URLSession: URLSessionProtocol { ^ ~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:522:1: error: non-nominal type 'URLSessionTask' (aka 'AnyObject') cannot be extended extension URLSessionTask: URLSessionTaskProtocol { ^ ~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:529:33: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. func apply(toConfig config: URLSessionConfiguration) { ^~~~~~~~~~~~~~~~~~~~~~~ Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here public typealias URLSessionConfiguration = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:550:41: error: cannot find type 'URLRequest' in scope func apply(toRequest request: inout URLRequest) { ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:578:35: error: cannot find type 'URLRequest' in scope public func toURLRequest() -> URLRequest? { ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:584:35: error: cannot find type 'URLRequest' in scope public func toURLRequest() -> URLRequest? { ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:589:11: error: cannot find type 'URLRequest' in scope extension URLRequest: URLRequestConvertible { ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:295:24: error: type 'URLSession' (aka 'AnyObject') has no member 'init' return URLSession(configuration: config, delegate: delegate, delegateQueue: nil) ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:295:93: error: 'nil' requires a contextual type return URLSession(configuration: config, delegate: delegate, delegateQueue: nil) ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:325:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. var configOpt: URLSessionConfiguration? ^~~~~~~~~~~~~~~~~~~~~~~ Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here public typealias URLSessionConfiguration = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:328:20: error: type of expression is ambiguous without more context option.apply(toRequest: &request) ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:330:30: error: type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>') has no member 'background' configOpt = .background(withIdentifier: identifier) ~^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:332:30: error: type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>') has no member 'ephemeral' configOpt = .ephemeral ~^~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:344:36: error: type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>') has no member 'default' let config = configOpt ?? .default ~^~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:454:35: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing guard let response = response as? HTTPURLResponse else { return [] } ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:454:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. guard let response = response as? HTTPURLResponse else { return [] } ^~~~~~~~~~~~~~~ Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here public typealias HTTPURLResponse = AnyObject ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:455:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields' return response.allHeaderFields.compactMap { name, value -> Http.Header? in ~~~~~~~~ ^~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:532:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest' config.timeoutIntervalForRequest = value ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:533:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource' config.timeoutIntervalForResource = value ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:535:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest' config.timeoutIntervalForRequest = value ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:537:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource' config.timeoutIntervalForResource = value ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:539:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'networkServiceType' config.networkServiceType = value ~~~~~~ ^~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:541:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'allowsCellularAccess' config.allowsCellularAccess = value ~~~~~~ ^~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:543:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sharedContainerIdentifier' config.sharedContainerIdentifier = value ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:559:30: error: 'nil' requires a contextual type request.setValue(nil, forHTTPHeaderField: key) ^ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:475:23: error: cannot find type 'URLRequest' in scope with request: URLRequest, ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:489:23: error: cannot find type 'URLRequest' in scope with request: URLRequest, ^~~~~~~~~~ /home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:590:35: error: cannot find type 'URLRequest' in scope public func toURLRequest() -> URLRequest? { ^~~~~~~~~~ [3/6] Compiling Ashen Http.swift error: fatalError`
What could be the cause of this issue?