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 ITunesFeedGenerator, reference main (cf55dc), with Swift 6.0 for Linux on 2 Nov 2024 11:51:38 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" 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.56.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:             6.0
Building package at path:  $PWD
https://github.com/alfianlosari/ITunesFeedGenerator.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" 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
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/8] Compiling ITunesFeedGenerator Feed.swift
[4/8] Compiling ITunesFeedGenerator Song.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/8] Compiling ITunesFeedGenerator Application.swift
[6/8] Compiling ITunesFeedGenerator Book.swift
[7/8] Emitting module ITunesFeedGenerator
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:19:38: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 17 |
 18 |     let baseURL: String
 19 |     private let session = URLSession.shared
    |                                      `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 20 |     private let jsonDecoder = { JSONDecoder() }()
 21 |
/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.
 46 |     }
 47 |
 48 |     private func validateHTTPResponse(data: Data, response: URLResponse) throws {
    |                                                             `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 49 |         guard let httpResponse = response as? HTTPURLResponse else {
 50 |             throw StoreAPIRepositoryError.invalidResponseType
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:80:10: warning: associated value 'httpStatusCodeFailed(statusCode:error:)' of 'Sendable'-conforming enum 'StoreAPIRepositoryError' has non-sendable type 'ErrorResponse'; this is an error in the Swift 6 language mode
 69 | }
 70 |
 71 | public struct ErrorResponse: Codable {
    |               `- note: consider making struct 'ErrorResponse' conform to the 'Sendable' protocol
 72 |     let status: String
 73 |     let error: String
    :
 78 |     case invalidURL
 79 |     case invalidResponseType
 80 |     case httpStatusCodeFailed(statusCode: Int, error: ErrorResponse?)
    |          `- warning: associated value 'httpStatusCodeFailed(statusCode:error:)' of 'Sendable'-conforming enum 'StoreAPIRepositoryError' has non-sendable type 'ErrorResponse'; this is an error in the Swift 6 language mode
 81 |
 82 |     public static var errorDomain: String { "iTunesFeedGenerator" }
[8/8] Compiling ITunesFeedGenerator FeedRepository.swift
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:19:38: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 17 |
 18 |     let baseURL: String
 19 |     private let session = URLSession.shared
    |                                      `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 20 |     private let jsonDecoder = { JSONDecoder() }()
 21 |
/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.
 46 |     }
 47 |
 48 |     private func validateHTTPResponse(data: Data, response: URLResponse) throws {
    |                                                             `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 49 |         guard let httpResponse = response as? HTTPURLResponse else {
 50 |             throw StoreAPIRepositoryError.invalidResponseType
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:80:10: warning: associated value 'httpStatusCodeFailed(statusCode:error:)' of 'Sendable'-conforming enum 'StoreAPIRepositoryError' has non-sendable type 'ErrorResponse'; this is an error in the Swift 6 language mode
 69 | }
 70 |
 71 | public struct ErrorResponse: Codable {
    |               `- note: consider making struct 'ErrorResponse' conform to the 'Sendable' protocol
 72 |     let status: String
 73 |     let error: String
    :
 78 |     case invalidURL
 79 |     case invalidResponseType
 80 |     case httpStatusCodeFailed(statusCode: Int, error: ErrorResponse?)
    |          `- warning: associated value 'httpStatusCodeFailed(statusCode:error:)' of 'Sendable'-conforming enum 'StoreAPIRepositoryError' has non-sendable type 'ErrorResponse'; this is an error in the Swift 6 language mode
 81 |
 82 |     public static var errorDomain: String { "iTunesFeedGenerator" }
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:45:16: warning: no calls to throwing functions occur within 'try' expression
 43 |         let (data, response) = try await session.data(from: url)
 44 |         try validateHTTPResponse(data: data, response: response)
 45 |         return try jsonDecoder.decode(FeedRootResponse<D>.self, from: data).feed
    |                `- warning: no calls to throwing functions occur within 'try' expression
 46 |     }
 47 |
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:49:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 47 |
 48 |     private func validateHTTPResponse(data: Data, response: URLResponse) throws {
 49 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                           `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 50 |             throw StoreAPIRepositoryError.invalidResponseType
 51 |         }
/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.
 47 |
 48 |     private func validateHTTPResponse(data: Data, response: URLResponse) throws {
 49 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 50 |             throw StoreAPIRepositoryError.invalidResponseType
 51 |         }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:53:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 51 |         }
 52 |
 53 |         guard 200...299 ~= httpResponse.statusCode else {
    |                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 54 |             let errorResponse = try? jsonDecoder.decode(ErrorResponse.self, from: data)
 55 |             throw StoreAPIRepositoryError.httpStatusCodeFailed(statusCode: httpResponse.statusCode, error: errorResponse)
/host/spi-builder-workspace/Sources/ITunesFeedGenerator/FeedRepository.swift:55:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 53 |         guard 200...299 ~= httpResponse.statusCode else {
 54 |             let errorResponse = try? jsonDecoder.decode(ErrorResponse.self, from: data)
 55 |             throw StoreAPIRepositoryError.httpStatusCodeFailed(statusCode: httpResponse.statusCode, error: errorResponse)
    |                                                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 56 |         }
 57 |     }
BUILD FAILURE 6.0 linux