Skip to content

Releases: Wilfred/difftastic

0.52.0

08 Oct 23:16
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Parsing

Added support for XML and JSONL.

Diffing

Text nodes now get word diffing, consistent with string literals and comments. This is used in languages like HTML and XML that have separate text nodes.

Display

Improved syntax highlighting of constructors (i.e. type names when values are constructed, such as Foo {}).

Improved syntax highlighting for C#.

Build

This release does not provide a prebuilt musl binary, due to a dynamic linking issue with binaries in the release script.

musl remains tested in CI and supported for users, but you will need to compile difftastic from source.

0.51.1

25 Aug 16:24
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

This is the same code as 0.51.0, but fixes a CI issue so that prebuilt binaries are attached.

Parsing

Updated Bash, Python and Rust parsers.

Display

Added a JSON display option. This is currently unstable, and requires you to set DFT_UNSTABLE. The JSON structure may change in future.

Please give it a try and give feedback on GitHub issues.

Build

Added support for Linux with musl, Linux on aarch64, and macOS on aarch64.

Note that Difftastic already worked on these platforms, but they are now tested in CI and will be included in prebuilt binaries in releases.

0.51.0

25 Aug 16:23
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Parsing

Updated Bash, Python and Rust parsers.

Display

Added a JSON display option. This is currently unstable, and requires you to set DFT_UNSTABLE. The JSON structure may change in future.

Please give it a try and give feedback on GitHub issues.

Build

Added support for Linux with musl, Linux on aarch64, and macOS on aarch64.

Note that Difftastic already worked on these platforms, but they are now tested in CI and will be included in prebuilt binaries in releases.

0.50.0

16 Aug 06:22
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Conflicts

Difftastic now supports parsing files with conflict markers, enabling you to diff the two conflicting file states.

$ difft file_with_conflicts.js

Parsing

Updated Elixir, Erlang, Go, Kotlin and Racket parsers.

Display

Tweaked the colours on the file header, to make metadata less prominent.

Improved styling of file rename information.

Improved syntax hightling for Java built-in types.

Diffing

Fixed an issue with runaway memory usage when the two files input files had a large number of differences.

Build

Difftastic now requires Rust 1.59 to build.

0.49.0

27 Jul 03:16
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Parsing

Added support for LaTeX.

Updated grammars for C, C++ and Java.

Improved parsing of qualified constructors in Haskell.

Difftastic is now stricter about valid UTF-8 and UTF-16, considering more of the file's bytes during filetype detection. This fixes cases where e.g. PDF was sometimes incorrectly considered as UTF-8.

Diffing

Improved handling of delimiters ("nested sliders") in languages that prefer the outer delimiter, such as JSON and Lisps.

Build

Difftastic now requires Rust 1.58 to build.

0.48.0

12 Jul 23:49
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Parsing

Updated Scala parser.

Improved parsing of qualified modules and variables in Haskell.

Diffing

Replaced strings now have subword highlighting, consistent with replaced comments. Thanks @amnore!

Fixed an issue with the cost model for comment replacement, leading difftastic to prefer modified comments even when exact comment matches are possible.

Simplified the cost model, which previously had an inconsistent heuristic depending on whether there were multiple items on the same line. This can lead to slightly different items being marked as changed, but on average the results are better.

Display

Improved word highlighting in comments when they contain numbers or hyphens.

Internals

Difftastic's logging is now configured with the environment variable DFT_LOG. This was previously RUST_LOG, which could interfere with users configuring logging for their own development work.

0.47.0

17 May 04:08
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Language Detection

Fixed an issue where file extensions of the form *.foo.bar (e.g. *.cmake.in) were ignored.

Added an option --override which overrides language detection based on a glob, e.g. --override='*.js:javascript jsx'. See --help for full documentation and more examples.

Removed the --language option. This option was confusing (it took a file extension rather than a language name) and not very useful (it overrode language detection for all files together).

Parsing

Added support for Solidity.

Display

When difftastic is invoked with two file paths, it will now truncate the path shown to the shared common parts. This is particularly helpful when using difftastic with mercurial.

$ difft dir1/foo/bar.py dir2/foo/bar.py
foo/bar.py -- Python
...

0.46.0

31 Mar 15:37
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Command Line Interface

Removed the option --missing-as-empty. This is no longer needed as difftastic handles /dev/null gracefully on all platforms.

Parsing

Added support for Ada.

.ino files are now treated as C++.

Improved parsing for TOML.

Updated grammars for Bash, C, C++, C#, Clojure, CMake, Elixir, Go, Java, JavaScript, OCaml, Perl, QML and TypeScript.

Difftastic now prefers treating files as 'mostly UTF-8' or binary rather than UTF-16. Many files can be decoded as UTF-16 without decoding errors but produce nonsense results, so this heuristic seems to work better.

Fixed an issue where difftastic would discard the last newline in a file before diffing. This was most noticeable when doing textual diffs and the last line had changed.

Display

Difftastic no longer uses purple to highlight regions that are missing styling. This was intended as a debug feature, but it in practice it only highlighted trailing whitespace for a few languages.

0.45.0

03 Mar 16:20
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

This is a small release, released shortly after 0.44 to prioritise the fix to parse error counting.

Diffing

Racket and Newick are now treated as lisps for the purposes for parenthesis heuristics.

Parsing

Fixed an issue where parse errors were undercounted, particularly in YAML files.

Improved parsing for Makefiles.

0.44.0

03 Mar 06:51
Compare
Choose a tag to compare

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes.

Parsing

Added support for Newick and Racket.

Diffing

Difftastic now uses a textual diff on files that have any parse errors. The parse error limit defaults to 0, but it is configurable with DFT_PARSE_ERROR_LIMIT or --parse-error-limit.

Textual diffing now respects --check-only, consistent with syntactic diffing.

Display

Improved syntax highlighting for keywords.

If a file exceeds DFT_BYTE_LIMIT, difftastic now displays its size in the header.