The Swift Package Index logo.Swift Package Index

Build Information

Failed to build ITunesFeedGenerator 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/alfianlosari/ITunesFeedGenerator.git
Reference: main
Cloned https://github.com/alfianlosari/ITunesFeedGenerator.git into spi-builder-workspace
SUCCESS checkout https://github.com/alfianlosari/ITunesFeedGenerator.git at main
========================================
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/6] Compiling ITunesFeedGenerator Application.swift
[2/6] Emitting module ITunesFeedGenerator
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:19:38: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    private let session = URLSession.shared
                          ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:48:61: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private func validateHTTPResponse(data: Data, response: URLResponse) throws {
                                                            ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
[3/6] Compiling ITunesFeedGenerator FeedRepository.swift
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:19:38: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    private let session = URLSession.shared
                          ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:48:61: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private func validateHTTPResponse(data: Data, response: URLResponse) throws {
                                                            ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:45:16: warning: no calls to throwing functions occur within 'try' expression
        return try jsonDecoder.decode(FeedRootResponse<D>.self, from: data).feed
               ^
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:49:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
        guard let httpResponse = response as? HTTPURLResponse else {
                                          ^
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:49:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        guard let httpResponse = response as? HTTPURLResponse else {
                                              ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:53:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
        guard 200...299 ~= httpResponse.statusCode else {
                           ~~~~~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:55:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            throw StoreAPIRepositoryError.httpStatusCodeFailed(statusCode: httpResponse.statusCode, error: errorResponse)
                                                                           ~~~~~~~~~~~~ ^~~~~~~~~~
[4/6] Compiling ITunesFeedGenerator Book.swift
[5/6] Compiling ITunesFeedGenerator Feed.swift
[6/6] Compiling ITunesFeedGenerator Song.swift
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1