The Swift Package Index logo.Swift Package Index

Build Information

Failed to build ITunesFeedGenerator with Swift 5.10 for Linux.

Build Command

bash -c docker run --rm -v "checkouts-4609320-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/alfianlosari/ITunesFeedGenerator.git
Reference: main
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/alfianlosari/ITunesFeedGenerator
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at cf55dc0 Make releaseDate field as optional
Cloned https://github.com/alfianlosari/ITunesFeedGenerator.git
Revision (git rev-parse @):
cf55dc0eca850c32e0111899633b00cce488d224
SUCCESS checkout https://github.com/alfianlosari/ITunesFeedGenerator.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.10
Building package at path:  $workDir
https://github.com/alfianlosari/ITunesFeedGenerator.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/8] Compiling ITunesFeedGenerator Book.swift
[4/8] Compiling ITunesFeedGenerator Feed.swift
[5/8] Compiling ITunesFeedGenerator Application.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/8] 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)
                                                                           ~~~~~~~~~~~~ ^~~~~~~~~~
[7/8] 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
                 ^
[8/8] Compiling ITunesFeedGenerator Song.swift
error: fatalError
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/3] 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/3] 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)
                                                                           ~~~~~~~~~~~~ ^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.10 linux

Build Machine: Linux 2