Skip to content

Commit 011ae9f

Browse files
kiliankoeaciidgh
authored andcommitted
Error Reporting (swiftlang#2066)
* Fix wrong cause for root dependencies * Remove temporary error output * Move error reporting into DiagnosticReportBuilder * CustomStringConvertible PackageRequirement * Ignore additional whitespace in AssertUnresolvable * Assert root cause diagnostics * skip diagnostic in testMissingVersion
1 parent dc27f4b commit 011ae9f

File tree

3 files changed

+281
-163
lines changed

3 files changed

+281
-163
lines changed

Sources/PackageGraph/DependencyResolver.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,16 @@ public enum PackageRequirement: Hashable {
258258
}
259259
}
260260

261+
extension PackageRequirement: CustomStringConvertible {
262+
public var description: String {
263+
switch self {
264+
case .versionSet(let versionSet): return versionSet.description
265+
case .revision(let revision): return revision
266+
case .unversioned: return "unversioned"
267+
}
268+
}
269+
}
270+
261271
/// A container of packages.
262272
///
263273
/// This is the top-level unit of package resolution, i.e. the unit at which

0 commit comments

Comments
 (0)