Skip to content

kdiff 1.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 13:02
· 23 commits to main since this release

Added

  • A diff tree can be walked with each node's path. DiffNode.walk() yields every node of a
    subtree paired with the FieldPath that locates it, so a consumer descending a tree generically —
    an audit writer, a renderer that indents by structure — no longer accumulates segments itself. The
    node you start from comes first, paired with the empty path, so diff.tree().walk() yields
    absolute paths and a change reported at the root needs no special case; walking a node further down
    yields paths relative to it.

    Nodes come out in the order allChanges() reports their changes — a node before its descendants,
    siblings in the order children holds them — so walking and collecting can be used
    interchangeably. That is the tree's order, which groups a subtree together, and not in general the
    order of the flat list. The sequence is lazy: a caller that finds the subtree it wanted stops
    without visiting the rest.

    Nothing existing moves. DiffNode keeps its constructor, its three properties, isEmpty and
    allChanges(), so copy and componentN are unaffected — which is why the path is supplied by
    the walk rather than carried on the node. → diffing.md

Coordinates

implementation("io.github.rcapraro:kdiff-annotations:1.1.0")
implementation("io.github.rcapraro:kdiff-runtime:1.1.0")
ksp("io.github.rcapraro:kdiff-processor:1.1.0")