The Swift Package Index logo.Swift Package Index

Build Information

Failed to build WriteFreely with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/writefreely/writefreely-swift.git
Reference: 0.3.7
Cloned https://github.com/writefreely/writefreely-swift.git into spi-builder-workspace
SUCCESS checkout https://github.com/writefreely/writefreely-swift.git at 0.3.7
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
[1/8] Compiling WriteFreely JSONDecoder+Extension.swift
[2/8] Compiling WriteFreely HelperCodingKeys.swift
[3/8] Emitting module WriteFreely
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
    func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
        with request: URLRequest,
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
    func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
                              ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:960:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession: URLSessionProtocol {
^         ~~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:969:1: error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
extension URLSessionDataTask: URLSessionDataTaskProtocol {}
^         ~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:7:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
                                       ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
    func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:32:85: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public init(for instanceURL: URL, with session: URLSessionProtocol = URLSession.shared) {
                                                                         ~~~~~~~~~~ ^~~~~~
[4/9] Compiling WriteFreely WFCollection.swift
[5/9] Compiling WriteFreely WFError.swift
[6/9] Compiling WriteFreely WFPost.swift
[7/9] Compiling WriteFreely WFClient.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:960:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession: URLSessionProtocol {
^         ~~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:969:1: error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
extension URLSessionDataTask: URLSessionDataTaskProtocol {}
^         ~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:7:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
                                       ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
    func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:32:85: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public init(for instanceURL: URL, with session: URLSessionProtocol = URLSession.shared) {
                                                                         ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:73:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
        with request: URLRequest,
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:97:59: error: unable to infer type of a closure parameter 'result' in the current context
        post(with: request, expecting: 201) { [weak self] result in
                                                          ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:141:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
    func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:146:42: error: unable to infer type of a closure parameter 'result' in the current context
        get(with: request) { [weak self] result in
                                         ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:189:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
    func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
                              ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:245:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:250:42: error: unable to infer type of a closure parameter 'result' in the current context
        get(with: request) { [weak self] result in
                                         ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:318:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:379:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:446:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:510:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:538:64: error: unable to infer type of a closure parameter 'result' in the current context
        self.post(with: request, expecting: 201) { [weak self] result in
                                                               ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:581:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:586:42: error: unable to infer type of a closure parameter 'result' in the current context
        get(with: request) { [weak self] result in
                                         ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:634:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:638:42: error: unable to infer type of a closure parameter 'result' in the current context
        get(with: request) { [weak self] result in
                                         ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:688:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:708:59: error: unable to infer type of a closure parameter 'result' in the current context
        post(with: request, expecting: 200) { [weak self] result in
                                                          ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:754:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:796:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:812:59: error: unable to infer type of a closure parameter 'result' in the current context
        post(with: request, expecting: 200) { [weak self] result in
                                                          ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:850:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:856:45: error: unable to infer type of a closure parameter 'result' in the current context
        delete(with: request) { [weak self] result in
                                            ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:889:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:924:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:929:42: error: unable to infer type of a closure parameter 'result' in the current context
        get(with: request) { [weak self] result in
                                         ^
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:962:23: error: cannot find type 'URLRequest' in scope
        with request: URLRequest,
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:963:38: error: cannot find type 'DataTaskResult' in scope
        completionHandler: @escaping DataTaskResult
                                     ^~~~~~~~~~~~~~
[8/9] Compiling WriteFreely WFClient+Templates.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
    func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
        with request: URLRequest,
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
    func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
                              ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
    func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:20:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == 200 else {
                                                                        ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:60:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == statusCode else {
                                                                        ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:95:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == 204 else {
                                                                        ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
[9/9] Compiling WriteFreely WFUser.swift
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1