Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Sources/LLBuildManifest/LLBuildManifestWriter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,63 +129,63 @@ public struct ManifestToolStream {
fileprivate var buffer = ""

public subscript(key: String) -> Int {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return an Int") }
set {
self.buffer += " \(key): \(newValue.description.asJSON)\n"
}
}

public subscript(key: String) -> String {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return a String") }
set {
self.buffer += " \(key): \(newValue.asJSON)\n"
}
}

public subscript(key: String) -> ToolProtocol {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return a ToolProtocol") }
set {
self.buffer += " \(key): \(type(of: newValue).name)\n"
}
}

public subscript(key: String) -> AbsolutePath {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return an AbsolutePath") }
set {
self.buffer += " \(key): \(newValue.pathString.asJSON)\n"
}
}

public subscript(key: String) -> [AbsolutePath] {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return an array of AbsolutePath") }
set {
self.buffer += " \(key): \(newValue.map(\.pathString).asJSON)\n"
}
}

public subscript(key: String) -> [Node] {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return an array of Node") }
set {
self.buffer += " \(key): \(newValue.map(\.encodingName).asJSON)\n"
}
}

public subscript(key: String) -> Bool {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return a Bool") }
set {
self.buffer += " \(key): \(newValue.description)\n"
}
}

public subscript(key: String) -> [String] {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return an array of String") }
set {
self.buffer += " \(key): \(newValue.asJSON)\n"
}
}

public subscript(key: String) -> [String: String] {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return a [String: String]") }
set {
self.buffer += " \(key):\n"
for (key, value) in newValue.sorted(by: { $0.key < $1.key }) {
Expand All @@ -195,7 +195,7 @@ public struct ManifestToolStream {
}

package subscript(key: String) -> Environment {
get { fatalError() }
get { fatalError("\(#file):\(#line) at function \(#function) - Cannot get subscript that return an Environment") }
set {
self.buffer += " \(key):\n"
for (key, value) in newValue.sorted(by: { $0.key < $1.key }) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/PackageGraph/VersionSetSpecifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ extension VersionSetSpecifier {
case (_, .any):
return .empty
case (.any, _):
fatalError()
fatalError("\(#file):\(#line) - Illegal call of \(#function) on left hand side value of `.any`")
case (.empty, _):
return .empty
case (_, .empty):
Expand Down
6 changes: 3 additions & 3 deletions Sources/QueryEngine/Query.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extension HashEncoder: UnkeyedEncodingContainer {
}

func superEncoder() -> any Encoder {
fatalError()
fatalError("\(#file):\(#line) - Illegal call of function \(#function)")
}
}

Expand Down Expand Up @@ -272,11 +272,11 @@ extension HashEncoder {
}

mutating func superEncoder() -> any Encoder {
fatalError()
fatalError("\(#file):\(#line) - Illegal call of function \(#function)")
}

mutating func superEncoder(forKey key: K) -> any Encoder {
fatalError()
fatalError("\(#file):\(#line) - Illegal call of function \(#function)")
}

typealias Key = K
Expand Down
10 changes: 5 additions & 5 deletions Sources/Runtimes/PackageDescription/PackageDependency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ extension Package {
traits: traits
)
}

convenience init(
name: String?,
location: String,
Expand All @@ -181,7 +181,7 @@ extension Package {
traits: traits
)
}

convenience init(
id: String,
requirement: RegistryRequirement,
Expand Down Expand Up @@ -1067,7 +1067,7 @@ extension Package.Dependency {
/// ```swift
/// .package(id: "scope.name", "1.2.3"..."1.2.6"),
/// ```
///
///
/// If the package you depend on defines traits, the package manager uses the dependency with its default set of traits.
///
/// - Parameters:
Expand Down Expand Up @@ -1140,11 +1140,11 @@ extension Package.Dependency {
extension Package.Dependency {
@available(*, unavailable, message: "use package(url:exact:) instead")
public static func package(url: String, version: Version) -> Package.Dependency {
fatalError()
fatalError("\(#file):\(#line) - Illegal call of deprecated function \(#function)")
}

@available(*, unavailable, message: "use package(url:_:) instead")
public static func package(url: String, range: Range<Version>) -> Package.Dependency {
fatalError()
fatalError("\(#file):\(#line) - Illegal call of deprecated function \(#function)")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public struct BuildParameters: Encodable {
case .library(.dynamic):
return try dynamicLibraryPath(for: product.name)
case .library(.automatic), .plugin:
fatalError()
fatalError("\(#file):\(#line) - Illegal call of function \(#function) with automatica library and plugin")
case .test:
switch buildSystemKind {
case .native, .xcode:
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftBuildSupport/PackagePIFBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public final class PackagePIFBuilder {
case .packageProduct: .packageProduct
case .hostBuildTool: fatalError("Unexpected hostBuildTool type")
@unknown default:
fatalError()
fatalError("Unknown product type: \(pifProductType)")
}
}
}
Expand Down
Loading