pointfreeco / swift-issue-reporting

Report issues in your application and library code as Xcode runtime warnings, breakpoints, assertions, and do so in a testable manner.
https://www.pointfree.co
MIT License
391 stars 64 forks source link

Multiline parameters in unimplemented output #80

Closed oskarek closed 7 months ago

oskarek commented 7 months ago

In the unimplemented failure output, it doesn't look great if the output of any of the passed in parameters spans multiple lines, since all parameter outputs are just concatenated together with a comma in-between them.

This PR puts all the printed inputs on separate lines, if any of them contains a newline character, and also makes sure that all individual lines are properly indented.

As a bonus, they are also placed on separate lines if the single line would otherwise be too long (a combined character count of 70).

See the updated tests for a demonstration of what is achieved.

stephencelis commented 7 months ago

@oskarek Thanks for taking the time to contribute a PR! Unfortunately, we've decided to effectively deprecate the overloaded unimplemented helpers for swift-dependencies' macros, which do similar work but provide better compile-time safety and naming. Because of this I don't think we want to continue to iterate on these deprecated helpers, and instead move towards hard deprecation in the near future.

oskarek commented 7 months ago

Ah okay, I see! 👍 I'll close this