Skip to content

Releases: Wilfred/difftastic

0.49.0

27 Jul 03:16

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

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

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

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

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

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.

0.43.1

04 Feb 22:14

Choose a tag to compare

This release has no logic changes from 0.43.

The only difference is that the test_gzip_is_binary test is ignored by default, as it depends on MIME database availability. This database isn't always installed in packaging environments, so packagers saw this test failing.

0.43.0

03 Feb 06:31

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 R.

Difftastic now considers gzipped files to be binary, even if they happen to be valid UTF-16 (thanks @Miksu82).

Diffing

Fixed a rare crash when one file had repeated lists that partially matched the other side.

Display

Fixed an issue with single-column display when colour is disabled, where newlines were missing from the output.

Command Line Interface

--help now shows the default value for all arguments (it was previously missing --color and --display).

--color can now be configured with the environment variable DFT_COLOR.

Fixed an issue where git on Windows would fail with an error about /dev/null (thanks @n9v9).

0.42.0

16 Jan 04:13

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

Improved CSS parsing and HTML sublanguage parsing.

Diffing

Added an --ignore-comments option.

Improved textual diffing performance, particularly when the two files have few lines in common.

Display

Fixed an issue with unwanted underlines with textual diffing when DFT_BYTE_LIMIT is reached.

Fixed a crash in inline display when the file ends with whitespace.

Build

Renamed the vendored parser directory to vendored_parsers/, as cargo vendor would clobber the vendor/ directory.

0.41.0

09 Jan 01:35

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

Difftastic now supports embedded languages in HTML and Makefiles. This enables difftastic to parse embedded CSS or JavaScript in HTML, or Bash in Makefiles, leading to better diffs in those files. (Contributed by @sesse, thanks!)

Tab replacement is now done after parsing. If tab characters are syntactically important, they are now handled correctly. This was particularly an issue in Makefiles, where indentation must be tabs.

Diffing

Improved word highlighting in changed comments. Whitespace is never underlined and the characters - and _ are now considered word constituents.

Display

--display=inline now respects --tab-width.

Fixed an issue with unwanted underlines with textual diffing when DFT_GRAPH_LIMIT is reached.

Improved syntax highlighting for predefined types in TypeScript.