The Swift Package Index logo.Swift Package Index

Build Information

Failed to build LinkHeaderParser, reference main (1c58f7), with Swift 6.2 for Linux on 19 Jun 2025 22:32:21 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Frizlab/LinkHeaderParser.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/Frizlab/LinkHeaderParser
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 1c58f73 Dummy comment fixes
Cloned https://github.com/Frizlab/LinkHeaderParser.git
Revision (git rev-parse @):
1c58f73654b70ed1582cdbaca4e39e7256cc6254
SUCCESS checkout https://github.com/Frizlab/LinkHeaderParser.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.2
Building package at path:  $PWD
https://github.com/Frizlab/LinkHeaderParser.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:f81a7bd7aa87a0f81848d48c5bcc03f5f78deebd37fa5f9be9913077205d3687
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module LinkHeaderParser
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:72:50: error: cannot find type 'URLRequest' in scope
 70 | public struct LinkHeaderParser {
 71 |
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
    |                                                  `- error: cannot find type 'URLRequest' in scope
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:72:72: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 70 | public struct LinkHeaderParser {
 71 |
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
    |                                                                        `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
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
[4/4] Compiling LinkHeaderParser LinkHeaderParser.swift
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:72:50: error: cannot find type 'URLRequest' in scope
 70 | public struct LinkHeaderParser {
 71 |
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
    |                                                  `- error: cannot find type 'URLRequest' in scope
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:72:72: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 70 | public struct LinkHeaderParser {
 71 |
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
    |                                                                        `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
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/LinkHeaderParser/LinkHeaderParser.swift:73:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 71 |
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
    |                                   `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
 75 | 		return parseLinkHeader(linkHeader, defaultContext: context, contentLanguageHeader: response.allHeaderFields["Content-Language"] as? String, lax: lax)
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:74:118: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
    |                                                                                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 75 | 		return parseLinkHeader(linkHeader, defaultContext: context, contentLanguageHeader: response.allHeaderFields["Content-Language"] as? String, lax: lax)
 76 | 	}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:74:162: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 72 | 	public static func parseLinkHeaderFrom(request: URLRequest, response: HTTPURLResponse, lax: Bool = true) -> [LinkValue]? {
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
    |                                                                                                                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 75 | 		return parseLinkHeader(linkHeader, defaultContext: context, contentLanguageHeader: response.allHeaderFields["Content-Language"] as? String, lax: lax)
 76 | 	}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:75:95: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 73 | 		guard let linkHeader = response.allHeaderFields["Link"] as? String else {return nil}
 74 | 		let context = contextFrom(requestURL: request.url, requestMethod: request.httpMethod, responseStatusCode: response.statusCode, contentLocationHeader: response.allHeaderFields["Content-Location"] as? String)
 75 | 		return parseLinkHeader(linkHeader, defaultContext: context, contentLanguageHeader: response.allHeaderFields["Content-Language"] as? String, lax: lax)
    |                                                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 76 | 	}
 77 |
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:134:13: warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
132 | 			if !first || lax {
133 | 				foundComma = scanner.scanString(",", into: nil)
134 | 				scanner.scanCharacters(from: spaceCharacterSet, into: nil)
    |             `- warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
135 | 				if lax {
136 | 					/* Let’s consume all the commas we can find. */
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:138:15: warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
136 | 					/* Let’s consume all the commas we can find. */
137 | 					while scanner.scanString(",", into: nil) {
138 | 						scanner.scanCharacters(from: spaceCharacterSet, into: nil)
    |               `- warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
139 | 					}
140 | 				}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:149:38: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
147 |
148 | 			guard scanner.scanString("<", into: nil) else {return nil}
149 | 			guard scanner.scanUpTo(">", into: &currentParsedString) else {return nil} /* ">" in a URI-Reference is forbidden (rfc3986). */
    |                                      |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                      `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
150 | 			guard scanner.scanString(">", into: nil) else {return nil}
151 | 			let uriReference = currentParsedString! as String
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:156:13: warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
154 | 			finishedWithWhites = scanner.scanCharacters(from: spaceCharacterSet, into: nil)
155 | 			while scanner.scanString(";", into: nil) {
156 | 				scanner.scanCharacters(from: spaceCharacterSet, into: nil)
    |             `- warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
157 |
158 | 				guard scanner.scanCharacters(from: tokenCharacterSet, into: &currentParsedString) else {return nil}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:158:65: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
156 | 				scanner.scanCharacters(from: spaceCharacterSet, into: nil)
157 |
158 | 				guard scanner.scanCharacters(from: tokenCharacterSet, into: &currentParsedString) else {return nil}
    |                                                                 |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                                                 `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
159 | 				let key = currentParsedString! as String
160 | 				guard !key.isEmpty else {return nil}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:163:21: warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
161 |
162 | 				/* There shouldn’t be any spaces after the key, but we allow it in lax mode (the RFC says there might be “bad” spaces). */
163 | 				if lax {scanner.scanCharacters(from: spaceCharacterSet, into: nil)}
    |                     `- warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
164 | 				guard scanner.scanString("=", into: nil) else {
165 | 					/* ABNF says the “=value” part is optional.
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:170:21: warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
168 | 					continue
169 | 				}
170 | 				if lax {scanner.scanCharacters(from: spaceCharacterSet, into: nil)}
    |                     `- warning: result of call to 'scanCharacters(from:into:)' is unused [#no-usage]
171 |
172 | 				let value: String
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:178:66: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
176 | 					value = v
177 | 				} else {
178 | 					guard scanner.scanCharacters(from: tokenCharacterSet, into: &currentParsedString) else {return nil}
    |                                                                  |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                                                  `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
179 | 					value = currentParsedString! as String
180 | 					guard !value.isEmpty else {return nil}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:265:62: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
263 | 		scanner.charactersToBeSkipped = CharacterSet()
264 |
265 | 		guard scanner.scanCharacters(from: mimeCharacterSet, into: &currentParsedString) else {return nil}
    |                                                              |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                                              `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
266 | 		let charset = currentParsedString! as String
267 | 		guard charset.uppercased() == "UTF-8" else {return nil} /* We only support UTF-8 */
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:273:34: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
271 | 		/* The language cannot contain a single-quote, so we simply parse the language by reading the string up to the next single-quote.
272 | 		 * In theory we should parse a Language-Tag (rfc5646, section 2.1). */
273 | 		if scanner.scanUpTo("'", into: &currentParsedString) {language = currentParsedString! as String}
    |                                  |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                  `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
274 | 		else                                                 {language = defaultLanguage}
275 | 		guard scanner.scanString("'", into: nil) else {return nil}
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:281:64: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
279 | 		}
280 |
281 | 		guard scanner.scanUpToCharacters(from: CharacterSet(), into: &currentParsedString) else {return nil}
    |                                                                |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                                                `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
282 | 		let percentEncodedValue = currentParsedString! as String
283 | 		/* Note: Theorically, we should validate percentEncodedValue.
/host/spi-builder-workspace/Sources/LinkHeaderParser/LinkHeaderParser.swift:308:65: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
306 | 		/* Let’s try and parse whatever legal characters we can from the quoted string.
307 | 		 * The backslash and double-quote chars are not in the set we parse here, so the scanner will stop at these (among other). */
308 | 		if scanner.scanCharacters(from: quotedTextCharacterSet, into: &currentParsedString) {
    |                                                                 |- error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
    |                                                                 `- note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
309 | 			parsedString += currentParsedString! as String
310 | 		}
BUILD FAILURE 6.2 linux