Build Information
Failed to build SwiftLibrary 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/kiliankoe/SwiftLibrary.git
Reference: 0.8.0
Cloned https://github.com/kiliankoe/SwiftLibrary.git into spi-builder-workspace
SUCCESS checkout https://github.com/kiliankoe/SwiftLibrary.git at 0.8.0
========================================
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...
[1/8] Compiling SwiftLibrary Requirement.swift
[2/8] Compiling SwiftLibrary SwiftLibrary.swift
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:5:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
session: URLSession = .shared,
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:5:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
session: URLSession = .shared,
~^~~~~~
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:25:59: error: cannot find type 'URLRequest' in scope
private static func urlRequest(with query: String) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:7:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
let task = session.dataTask(with: urlRequest(with: query)) { data, _, error in
~~~~~~~ ^~~~~~~~
[3/8] Compiling SwiftLibrary PackageData.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/8] Compiling SwiftLibrary Command.swift
[5/8] Emitting module SwiftLibrary
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:5:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
session: URLSession = .shared,
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:5:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
session: URLSession = .shared,
~^~~~~~
/host/spi-builder-workspace/Sources/SwiftLibrary/SwiftLibrary.swift:25:59: error: cannot find type 'URLRequest' in scope
private static func urlRequest(with query: String) -> URLRequest {
^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux
Build Machine: Linux 1