The point about textconv being sufficient in many cases is worth emphasizing — the cases where you actually need a full diff driver are when the file has semantics that text diff destroys. OpenAPI specs are a good example: a field rename looks like a deletion + addition in text diff but is a single semantic change.
I ran into the same thing building a semantic diff for a DSL compiler — text diff would report noise on every whitespace or reorder change, but the meaningful question is "which fields changed type, which statements were added or removed." Once you're operating on the AST the signal-to-noise ratio is completely different.
The point about textconv being sufficient in many cases is worth emphasizing — the cases where you actually need a full diff driver are when the file has semantics that text diff destroys. OpenAPI specs are a good example: a field rename looks like a deletion + addition in text diff but is a single semantic change.
I ran into the same thing building a semantic diff for a DSL compiler — text diff would report noise on every whitespace or reorder change, but the meaningful question is "which fields changed type, which statements were added or removed." Once you're operating on the AST the signal-to-noise ratio is completely different.
Related: my favorite viewer is diff2html-cli which lets you see the diff in your browser:
https://diff2html.xyz/
my favorite online diff viewer so far is https://diffs.dev/, very straightforward. Diff2html looks cool too given it can work in terminal
Why not just use Araxis Merge or Beyond Compare?
I recently implemented a diff driver as part of git-dogs. The integration part Claude one-shotted.
Mine is token based: https://replicated.wiki/blog/img/difflet.png
The set of git tools itself, very much in development: https://github.com/gritzko/git-dogs