In addition to the macro, can we please also expose a straightforward way to simply manually specify the summary string that we want lldb to use, alongside each type?
@_lldbFormatter("${var.id}: ${var.name}")
struct Student: CustomStringConvertible {
var name: String
var id: Int
var description: String {
// potentially more complicated code than what `@DebugDescription`
// would be able to handle
}
}
I understand macros are very awesome, but it isn't always appropriate to rely on heuristic behavior. For instance, I think it would not always be possible to simplify description
implementations only to appease a macro.