90 Commits
Author SHA1 Message Date
Brandon Williams 777fce2f8e wip 2023-04-14 08:41:54 -07:00
stephencelis af2eb5ec36 Run swift-format 2023-04-13 21:12:03 +00:00
Stephen Celis 84b30e1af7 Only print "no difference detected" when diff output is the same (#85)
* Only print "no difference detected" when diff output is the same

* wip

* fix for Xcode 13.4.1
0.10.2
2023-04-13 14:04:03 -07:00
Stephen Celis 21404fead4 Show difference when values are equal if labels differ (#84) 0.10.1 2023-04-12 16:34:29 -07:00
Stephen Celis 805c57f32a Don't use AnyKeyPath.debugDescription due to crash (#81)
* Don't use `AnyKeyPath.debugDescription` due to crash

SE-0369's implementation unfortunately has a crash related to dynamic
member lookup, so we should revert our reliance on it till the bug is
fixed.

See https://github.com/apple/swift/issues/64865 for more info.

* wip

* wip

* wip
0.10.0
2023-04-03 10:59:29 -07:00
stephencelis 6a90124ac7 Run swift-format 2023-03-22 18:27:33 +00:00
Stephen Celis be44c34910 Support ordered dictionaries/sets (#80)
We currently auto-sort the children of any mirror with a display style
of dictionary or set alphabetically. This is important for consistent
dumps (good for snapshot tests, too), but affects types that don't need
the sorting, like ordered dictionaries and sets.

This PR introduces an `_UnorderedCollection` protocol to control this
behavior, and conforms `Dictionary`, `Set`, and their `NS`-
predecessors, but leaves other types open to dumping and diffing in an
ordered way by default.
2023-03-22 11:08:42 -07:00
Stephen Celis 2a3499352e Add String.init(customDumping:) (#79)
* Add `String.init(customDumping:)`

It can be useful to get a custom dump representation of a value as a
string on a single line. Swift provides `String.init(describing:)` and
`String.init(reflecting:)` (though no equivalent for a quick string from
`Swift.dump`), so maybe we can provide _similar_ functionality via a
string initializer.

* oops
2023-03-13 19:27:42 -07:00
stephencelis 2bb5551b6c Run swift-format 2023-03-08 21:43:51 +00:00
Stephen Celis 79cb03ef21 Abbreviate optional, array, and dictionary types (#78)
We try our best to pretty-print in a Swift-y fashion, so let's extend
that to the shorthand syntaxes for optionals, arrays, and dictionaries.
2023-03-08 13:27:39 -08:00
Stephen Celis de8ba65649 Fix regression in typeName output (#77)
* Fix regression in `typeName` output

The regular expression that strips excessive info from type names was
refactored in #73 to fix some bugs that were discovered, but this change
caused a regression in some nested types.

* fix

* wip
0.9.1
2023-03-07 17:37:57 -08:00
mbrandonw e266399f31 Run swift-format 2023-03-07 22:44:59 +00:00
Brandon Williams 0dd3e712ff Lock access to keyPathToName in key path printing. (#76)
* Lock access to keyPathToName for key path printing.

* slack release

* modernize
0.9.0
2023-03-07 14:37:58 -08:00
Stephen Celis adef407be3 Use AnyKeyPath.customDebugDescription when possible (#73)
* Use `AnyKeyPath.customDebugDescription` when possible

New in Swift 5.8 with implementation of
[SE-0369](https://github.com/apple/swift-evolution/blob/main/proposals/0369-add-customdebugdescription-conformance-to-anykeypath.md).

* Linux support.

* Linux tests

* Fix warning

* Fix

* wip

* wip

* wip
2023-02-22 15:05:06 -08:00
Stephen Celis dd86159e25 Tests 0.8.0 2023-02-03 11:29:00 -08:00
Stephen Celis 3860d0beee Abbreviate enums in diffs (#72)
* Abbreviate enums in diffs

We added the ability to abbreviate nested dumps in #71, but this didn't
transfer to diffs.

* wip

* Fix for old Swift runtime
2023-02-03 11:08:14 -08:00
Stephen Celis 87dd388a19 Abbreviate nested enums (#71)
We can use dot-abbreviation to keep descriptions short but provide
enough context.
0.7.0
2023-01-30 17:06:26 -08:00
Stephen Celis ce93271ca0 Update CoC 2023-01-30 12:19:16 -08:00
Stephen Celis ead7d30cc2 Update CI to use latest Xcode, test in release (#68)
* Bump CI

* wip

* wip

* wip

* wip

* Fix key path release bug

* bump
0.6.1
2022-11-07 11:59:46 -08:00
stephencelis 132a915a82 Run swift-format 2022-10-21 00:49:04 +00:00
Mahmood Tahir 766cf2f7d3 Add tests for objectidentifier (#66) 2022-10-20 17:42:34 -07:00
Mahmood Tahir 0ff5e251d0 AnyHashable dump conformance (#64)
* AnyHashable dump conformance

Without it the Mirror for AnyHashable has a style of nil so it just uses string interpolation and doesn't dump properly

* Add tests

* Move to Swift.swift file
2022-10-20 13:34:35 -07:00
stephencelis 819d9d370c Run swift-format 0.6.0 2022-10-03 20:51:24 +00:00
Mahmood Tahir 8e64f1eee6 Add ids to second occurrence of a type within a dump (#60)
* Add ids to second occurrence of a type within a dump

* Update logic

* Cleanup

* Update tests after rebase

* Use # instead of <>
2022-10-03 13:43:57 -07:00
stephencelis 8a93a475b6 Run swift-format 2022-10-03 17:40:51 +00:00
Mahmood Tahir d7f18c3e8a Add support to dump superclass nodes (#58)
* Add support to dump subset of children and superclass nodes

* Dump superclass by default

* Clean up code based on @iampatbrown's feature branch

* More cleanup

* revert unrelated indentation

* Remove new protocols

* Revert some syntax changes
2022-10-03 09:54:31 -07:00
Stephen Celis c9b6b940d9 Temporary fix for Xcode 14.1 (#56) 0.5.2 2022-09-14 18:58:08 -04:00
stephencelis 2365d3eb54 Run swift-format 2022-09-13 04:11:39 +00:00
Stephen Celis b7500c3ce7 Add CI for SwiftWASM (#55)
* Add WASM to CI

* wip

* wip

* wip

* wip

* wip

* wip
0.5.1
2022-09-13 00:02:17 -04:00
stephencelis 3737faeece Run swift-format 2022-09-13 03:41:37 +00:00
Yasuhiro Inami 55b08ec65d Add if !os(WASI) for SwiftWasm (#53) 2022-09-12 23:34:55 -04:00
Stephen Celis d81cd16c9e Git-ignore .swiftpm/ directory (#54)
* Git-ignore .swiftpm/ directory

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update Makefile

* Update Makefile

* Update Makefile

* wip

* wip

* Update ci.yml

* Update ci.yml

* fix
2022-09-12 15:13:31 -04:00
Stephen Celis 11ccf4ca40 Use _typeName instead of String.init(reflecting:) (#52) 2022-06-20 14:54:55 -04:00
stephencelis 21ec1d717c Run swift-format 0.5.0 2022-05-03 15:32:30 +00:00
Stephen Celis 253e3d9130 Differentiate equal dumps of different types (#49)
Fixes #48.
2022-05-03 11:11:45 -04:00
Ryan Ferrell c4f78db9b9 fix: Resolve Xcode 13 project startup beachball due to this playground (#46)
* fix: Resolve Xcode 13 project startup beachball due to this playground

fix: Move playground to directory hidden from Xcode

* fix: Delete Playground entirely as suggested
0.4.0
2022-04-27 19:43:18 -07:00
stephencelis 15fae98653 Run swift-format 2022-03-02 14:32:14 +00:00
Brentley Jones e7c6d6444d Show label for visited items (#43) 2022-03-02 09:18:32 -05:00
Stephen Celis 1c384565cf Revert removal of platform requirements (#42)
* Partially revert "f8c70309e75569964669af8a068fb0d0312c323f"

* Revert "Remove platform requirements (#37)"

This reverts commit fa2eb2572b.
2022-02-18 18:02:48 -05:00
Stephen Celis 9989a25499 Add issue templates and CoC (#41) 2022-02-18 10:32:00 -05:00
Stephen Celis b52e587239 Add CI labels (#39) 2022-02-17 19:17:43 -05:00
Stephen Celis f8c70309e7 Run 13.2 CI on experimental build system (#38)
* Run 13.2 CI on experimental build system

* wip

* wip

* wip
2022-02-17 14:46:36 -05:00
stephencelis e9205f1599 Run swift-format 2022-02-14 17:26:38 +00:00
Stephen Celis 5b23c62683 Add SPI.yml 2022-02-14 12:19:12 -05:00
Stephen Celis fa2eb2572b Remove platform requirements (#37)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
2022-02-14 12:17:32 -05:00
Stephen Celis 052ad339f8 Add workflow dispatch 2022-02-09 14:41:16 -05:00
iampatbrown 3b12cd71b4 Update installation instructions to current version (#34) 2022-01-06 16:16:45 -05:00
stephencelis 439b99b196 Run swift-format 2021-12-08 15:17:49 +00:00
Jaanus SiimandStephen Celis 51698ece74 UNNotificationPresentationOptions [.banner, .list] workaround (#30)
* UNNotificationPresentationOptions [.banner, .list] workaround

* Update Sources/CustomDump/Conformances/UserNotifications.swift

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
0.3.0
2021-12-08 10:10:52 -05:00
stephencelis 25292d6c6e Run swift-format 2021-10-25 15:01:32 +00:00