Urgent.News

What's breaking now, across thousands of outlets.

Tech

weave: structural merging for different languages

Weave offers entity-level semantic merge for Git, surpassing traditional line-based merges by parsing code into functions, classes, and keys using tree-sitter. This allows it to merge independent changes without manual intervention, even when multiple AI agents work on the same codebase. By comparing base, ours, and theirs at the entity level, weave can tell where branches have diverged, rather than where their edits line up.

This deterministic and stateless merge algorithm operates on individual files and is not a CRDT. Weave's merge scenarios across seven languages were tested with 31 hand-crafted scenarios, with two of the 31 not merging cleanly. Mergifar fails on certain edge cases, while weave correctly refuses two decorator scenarios. Benchmarks show weave's superior performance over Git and Mergifar, with the majority of regressions being genuine divergent concurrent additions.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.com →

More in Tech

More from Friday 25 September →