Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<!-- next-header -->
## Unreleased - ReleaseDate

### Added

- New `IntoChanges` trait and a parallel `*Changes` type per diff, projecting a diff to the subset of nodes that actually changed. Built-in implementations cover `Leaf`, the map/set diffs, and tuples.
- The `Diffable` derive macro now recognizes `#[daft(changes)]` on structs as opt-in to generating a parallel `FooChanges` type and an `IntoChanges` impl. Opting in is required because the projection needs `Eq` (and, with the new `serde` feature, `Serialize`) on every leaf type — constraints existing users may not satisfy.
- New `serde` feature emits `Serialize` impls for `Leaf` and every `*Changes` type, so a projected diff can be written to JSON (or any other serde format) with unchanged subtrees omitted entirely.

## [0.1.6] - 2026-05-14

### Added
Expand Down
43 changes: 30 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ paste = "1.0.15"
prettyplease = "0.2.29"
proc-macro2 = "1.0"
quote = "1.0"
serde = { version = "1.0.219", default-features = false }
serde_json = "1.0.140"
syn = "2.0"
trybuild = "1.0.103"
uuid = "1.12.0"
Expand Down
10 changes: 9 additions & 1 deletion daft-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = ["full", "visit"] }

[features]
# Mirror of daft's `serde` feature: emits the hand-written `Serialize` impl
# on `*Changes` structs alongside the `IntoChanges` impl. Enabled
# transitively when a downstream crate turns on `daft/serde`.
serde = []

[dev-dependencies]
daft = { workspace = true, features = ["derive"] }
daft = { workspace = true, features = ["derive", "serde"] }
datatest-stable.workspace = true
expectorate.workspace = true
prettyplease.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
trybuild.workspace = true
uuid = { workspace = true, features = ["v4"] }

Expand Down
Loading
Loading