The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Tips with Swift 5.10 for Linux.

Build Command

bash -c docker run --rm -v "checkouts-4606859-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/unnamedd/swifttips-framework.git
Reference: master
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/unnamedd/swifttips-framework
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at f489e18 changed access level from initializer to Tricks
Cloned https://github.com/unnamedd/swifttips-framework.git
Revision (git rev-parse @):
f489e18d8ac4c7ff3688a6d2590edfc40645afb7
SUCCESS checkout https://github.com/unnamedd/swifttips-framework.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.10
Building package at path:  $workDir
https://github.com/unnamedd/swifttips-framework.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-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/10] Compiling TipsCore Tip.swift
/host/spi-builder-workspace/Sources/TipsCore/Models/Tip.swift:10:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Tip {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Tip.swift:68:39: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
                    comments = values.flatMap({ Comment($0.trimming()) })
                                      ^
/host/spi-builder-workspace/Sources/TipsCore/Models/Tip.swift:68:39: note: use 'compactMap(_:)' instead
                    comments = values.flatMap({ Comment($0.trimming()) })
                                      ^~~~~~~
                                      compactMap
[4/10] Compiling TipsCore Owner.swift
/host/spi-builder-workspace/Sources/TipsCore/Models/Owner.swift:4:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Owner {
    ^~~~~~~

error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/10] Compiling TipsCore Comment.swift
/host/spi-builder-workspace/Sources/TipsCore/Models/Comment.swift:3:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Comment {
    ^~~~~~~

[6/10] Compiling TipsCore Source.swift
/host/spi-builder-workspace/Sources/TipsCore/Models/Source.swift:4:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Source {
    ^~~~~~~

[7/10] Emitting module TipsCore
/host/spi-builder-workspace/Sources/TipsCore/Models/Comment.swift:3:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Comment {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Owner.swift:4:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Owner {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Source.swift:4:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Source {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Tip.swift:10:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Tip {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:59:109: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public static func requestText(_ url: String, completion: @escaping (ServiceResult<String>) -> Void) -> URLSessionDataTask? {
                                                                                                            ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:69:94: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static func request(url: String, completion: @escaping (ServiceResult<Data>) -> Void) -> URLSessionDataTask? {
                                                                                             ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
[8/10] Compiling TipsCore Tricks.swift
/host/spi-builder-workspace/Sources/TipsCore/Tricks.swift:34:28: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
        let tips = results.flatMap { Tip(content, match: $0) }
                           ^
/host/spi-builder-workspace/Sources/TipsCore/Tricks.swift:34:28: note: use 'compactMap(_:)' instead
        let tips = results.flatMap { Tip(content, match: $0) }
                           ^~~~~~~
                           compactMap
[9/10] Compiling TipsCore Service.swift
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:59:109: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public static func requestText(_ url: String, completion: @escaping (ServiceResult<String>) -> Void) -> URLSessionDataTask? {
                                                                                                            ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:69:94: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static func request(url: String, completion: @escaping (ServiceResult<Data>) -> Void) -> URLSessionDataTask? {
                                                                                             ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:75:22: error: cannot find type 'URLRequest' in scope
        var request: URLRequest = URLRequest(url: baseURL)
                     ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:79:31: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        let task = URLSession.shared.dataTask(with: request) { data, _, error in
                   ~~~~~~~~~~ ^~~~~~
[10/10] Compiling TipsCore GithubService.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 TipsCore
/host/spi-builder-workspace/Sources/TipsCore/Models/Comment.swift:3:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Comment {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Owner.swift:4:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Owner {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Source.swift:4:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Source {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Models/Tip.swift:10:5: warning: 'public' modifier is redundant for struct declared in a public extension
    public struct Tip {
    ^~~~~~~

/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:59:109: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public static func requestText(_ url: String, completion: @escaping (ServiceResult<String>) -> Void) -> URLSessionDataTask? {
                                                                                                            ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:69:94: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static func request(url: String, completion: @escaping (ServiceResult<Data>) -> Void) -> URLSessionDataTask? {
                                                                                             ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
[3/3] Compiling TipsCore Service.swift
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:59:109: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public static func requestText(_ url: String, completion: @escaping (ServiceResult<String>) -> Void) -> URLSessionDataTask? {
                                                                                                            ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:69:94: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static func request(url: String, completion: @escaping (ServiceResult<Data>) -> Void) -> URLSessionDataTask? {
                                                                                             ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:75:22: error: cannot find type 'URLRequest' in scope
        var request: URLRequest = URLRequest(url: baseURL)
                     ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TipsCore/Services/Service.swift:79:31: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        let task = URLSession.shared.dataTask(with: request) { data, _, error in
                   ~~~~~~~~~~ ^~~~~~
error: fatalError
BUILD FAILURE 5.10 linux

Build Machine: Linux 1