Swift Custom Dump Versions Save

A collection of tools for debugging, diffing, and testing your application's data structures.

0.11.2

1 month ago

1.3.0

2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.2.1...1.3.0

1.2.1

2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.2.0...1.2.1

1.2.0

3 months ago

What's Changed

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.1.2...1.2.0

1.1.2

5 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.1.1...1.1.2

1.1.1

6 months ago

What's Changed

  • Fixed: Filter properties prefixed with _$ (https://github.com/pointfreeco/swift-custom-dump/pull/100).

    Macros like @Observable can insert properties prefixed by _$ to a structure. Generally these kinds of properties should be thought of as implementation details and should be filtered from the dump.

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.1.0...1.1.1

1.1.0

7 months ago

What's Changed

  • Added: XCTAssertDifference for testing changes to values (https://github.com/pointfreeco/swift-custom-dump/pull/51).

    This function evaluates a given expression before and after a given operation and then compares the results. The comparison is done by invoking the changes closure with a mutable version of the initial value, and then asserting that the modifications made match the final value using XCTAssertNoDifference.

    For example, given a very simple counter structure, we can write a test against its incrementing functionality:

    struct Counter {
      var count = 0
      var isOdd = false
      mutating func increment() {
        self.count += 1
        self.isOdd.toggle()
      }
    }
    
    var counter = Counter()
    XCTAssertDifference(counter) {
      counter.increment()
    } changes: {
      $0.count = 1
      $0.isOdd = true
    }
    

    If changes does not exhaustively describe all changed fields, the assertion will fail.

    By omitting the operation you can write a "non-exhaustive" assertion against a value by describing just the fields you want to assert against in the changes closure:

    counter.increment()
    XCTAssertDifference(counter) {
      $0.count = 1
      // Don't need to further describe how `isOdd` has changed
    }
    
  • Infrastructure: README updates (thanks @JacksonUtsch, https://github.com/pointfreeco/swift-custom-dump/pull/96).

  • Infrastructure: Enable Windows CI (thanks @brianmichel, https://github.com/pointfreeco/swift-custom-dump/pull/99).

New Contributors

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.0.0...1.1.0

1.0.0

9 months ago
  • Added: First "stable" release. Custom Dump contains APIs extracted from the Composable Architecture's suite of tools, which is now considered stable. This 1.0 release will introduce a more strict adherence to semantic versioning.

Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/0.11.1...1.0.0

0.11.1

9 months ago

0.11.0

10 months ago