Commit Graph

560 Commits (significant_whitespace)

Author SHA1 Message Date
Wilfred Hughes 4284c3578a Increase MSRV to 1.60 2023-10-31 16:34:59 +07:00
Wilfred Hughes 778a6bee9a Flatten nullable types in Kotlin
Workaround for #589 and #411
2023-10-26 08:56:37 +07:00
Wilfred Hughes 8400000b3b Merge commit '494fb7644a9d2bbe4c7a0c5db2ef94d2aad6b0d8' 2023-10-26 08:46:53 +07:00
Wilfred Hughes 21ed3ec48b Add missing environment variable for --skip-unchanged
Fixes #581
2023-10-13 08:41:38 +07:00
Wilfred Hughes 69060fd617 Document SCSS support 2023-10-11 20:00:44 +07:00
Wilfred Hughes 67dbf0e962 Add --strip-cr
Closes #486
2023-10-10 08:36:57 +07:00
Wilfred Hughes b0dac91e50 Roll version 2023-10-08 20:07:24 +07:00
Wilfred Hughes b07e5198b5 Remove prebuilt musl binaries in release config 2023-10-08 15:40:39 +07:00
Wilfred Hughes ab1966b7d2 Merge commit '3fef30de8aee74600f25ec2e319b62a1a870d51e'
Update JSON parser. This allows multiple items, so JSONL is no longer
a parse error.

Fixes #528
2023-10-07 10:47:05 +07:00
Wilfred Hughes 1e7866b64e Do word diffing on text too 2023-09-12 13:03:27 +07:00
Wilfred Hughes 004a0da67f Flatten modifiers in C# to improve highlighting 2023-09-08 23:44:11 +07:00
Wilfred Hughes 9134593a39 Add XML support
Fixes #10
2023-09-08 23:43:20 +07:00
Wilfred Hughes d56f775f31 Highlight constructors consistently with type names 2023-09-03 01:30:22 +07:00
Wilfred Hughes 79b4e44113 Update changelog for today's releases and roll version 2023-08-25 09:26:28 +07:00
Wilfred Hughes 72475493a4 Tweak wording 2023-08-24 08:19:27 +07:00
Wilfred Hughes fa20bd9d44 Add Linux with musl, Linux on aarch64, and macOS on aarch64 targets
Use cross to cross-compile from Ubuntu to these platforms.

This will resolve #357 and #368 when the next release goes out.
2023-08-23 20:56:03 +07:00
Wilfred Hughes 9403e410c2 Merge commit 'c01fb4e38587e959b9058b8cd34b9e6a3068c827' 2023-08-21 08:52:30 +07:00
Wilfred Hughes 3f042da6bf Updated Rust parser 2023-08-18 22:44:36 +07:00
Wilfred Hughes 050a81aadf Updated bash parser 2023-08-18 22:25:57 +07:00
Alex Krantz 11a96e5aec Add JSON cli flag 2023-08-17 08:49:59 +07:00
Wilfred Hughes 11899a237c Roll version 2023-08-15 23:40:23 +07:00
Wilfred Hughes def88bbb43 Fix spelling in CHANGELOG 2023-08-15 23:01:09 +07:00
Wilfred Hughes e0a1405453 Add the ability to parse conflict markers and diff the two files 2023-08-15 09:01:15 +07:00
Wilfred Hughes 56230d1c69 Merge commit '06a2f6e71c7fcac34addcbf2a4667adad1b9c5a7' 2023-08-08 23:39:19 +07:00
Wilfred Hughes 4e77f83dd9 Merge commit '7dc4fb60390218b09bc351062eeede7dcdbb4d9f' 2023-08-08 23:37:28 +07:00
Wilfred Hughes 34d20d6665 Merge commit 'a2861e88a730287a60c11ea9299c033c7d076e30' 2023-08-08 23:24:08 +07:00
Wilfred Hughes 3eb014c0a7 Merge commit 'bbaa67a180cfe0c943e50c55130918be8efb20bd' 2023-08-08 23:22:22 +07:00
Wilfred Hughes db8797d6c2 Merge commit '7aa24fe8616072fc1a659f72d5b60bd8c01fb5cc' 2023-08-08 23:01:48 +07:00
Wilfred Hughes a187d7a134 Improve rename styling
It should use the heading with colour, consistent with other modes,
and the header should come before rename information.
2023-08-08 08:53:33 +07:00
Wilfred Hughes 4fdc8eebcd Increase MSRV to 1.59 2023-08-07 20:32:08 +07:00
Wilfred Hughes 892d4fdb58 Ensure size_hint never exceeds graph_limit
If we have thousands of syntax nodes on both sides, we can end
up attempting to preallocate a very large hashmap.

In #542, a user hit an issue with two JSON files where the LHS had
33,000 syntax nodes and the RHS had 34,000 nodes, so we'd attempt to
preallocate a hashmap of capacity 1,122,000,000. This required
allocating 70,866,960,400 bytes (roughly 66 GiB).

Impose a sensible limit on the hashmap.

Fixes #542
2023-08-04 17:19:27 +07:00
Wilfred Hughes 757c297412 Adjust header style
Show the hunk count and detected language in a dimmed style. This
information is less important than the diff content itself, so this
change makes the important information more prominent.

First part of #544
2023-07-31 08:35:27 +07:00
Wilfred Hughes 797af40ae8 Improve Java highlighting 2023-07-27 08:33:38 +07:00
Wilfred Hughes 448972f8a3 Roll version 2023-07-26 20:02:23 +07:00
Wilfred Hughes b3acf48128 Bump minimum required Rust version to 1.58
Difftastic is generally conservative about MSRV, and will only
increase the version when there is a compelling reason (e.g. major
performance improvement, important bug fix in a dependendency).

This version increase will enable us to upgrade crossterm to 0.26, which
has better detection of terminal width on Windows.

I've also clarified MSRV details for other dependencies that cannot
currently be upgraded.
2023-07-26 11:34:05 +07:00
Wilfred Hughes 69da133ab0 Merge commit '2c7aff437deed72bbceceab95797b3909cc4627d' 2023-07-24 21:50:22 +07:00
Wilfred Hughes f43e91faf7 Merge commit 'ad095896dd223f1c22b85ac5ec84ab11fb732b07' 2023-07-24 21:28:47 +07:00
Wilfred Hughes 4e9637c861 Check more bytes when detecting encoding
I've observed PDF files that have sufficiently large headers that they
were detected as text, which wasn't helpful.

Also improve logging to report how many invalid bytes were found.
2023-07-21 08:34:41 +07:00
Wilfred Hughes 1c0b3153df Fix typo 2023-07-21 08:32:17 +07:00
Wilfred Hughes 2d23eb549d Document the new LaTeX support 2023-07-20 23:05:18 +07:00
Wilfred Hughes a15b92afaf Merge commit '6c8329e2da78fae78e87c3c6f5788a2b005a4afc' 2023-07-15 15:59:11 +07:00
Wilfred Hughes 7caaaf7fcf Handle nested sliders correctly when preferring the outer delimiter
Previously we didn't check the state of children, which was an
oversight from the original implementation. As a result, we fixed
nested sliders in fewer situations.

Fixes #535
2023-07-14 08:49:55 +07:00
Wilfred Hughes a5d3cb55b7 Treat constructors consistently with variables in Haskell atoms 2023-07-12 17:34:42 +07:00
Wilfred Hughes 2d2a1484fd Roll version 2023-07-12 17:10:34 +07:00
Wilfred Hughes 5606c04261 Treat qualified modules and variables as atoms in Haskell 2023-07-12 12:34:39 +07:00
Wilfred Hughes d9382640ed Mention the new subword string highlighting in the changelog 2023-07-10 09:04:53 +07:00
Wilfred Hughes 27f59c0b3a Don't treat - as a word constituent
This produces slightly better results with some string replacements.
2023-07-08 17:16:14 +07:00
Wilfred Hughes c07e640b24 Remove contiguous penalty
The contiguous penalty was an attempt to fix the slider problem:

// Old
A B
C D

// New
A B
A B
C D

// Unwanted diff
A +B+
+A+ B
C D

However, it doesn't make sense for Dijkstra, which is stateless. The
best route from vertex X is independent of how we got to vertex X.

This worked by dumb luck: in some circumstances we terminate early
rather than fully executing Dijkstra's algorithm. This cost tweak
improved results on a few test files. However, the post-processing
slider logic is a proper, general solution. This was added much later.

There's no reason to keep the contiguous penalty now. It's confusing,
and makes adding new edge costs with consistent 'X costs more than Y'
behaviours more difficult.

Performance is essentially neutral: a small decrease in
typing_before.ml, a small increase in slow_before.rs.
2023-07-06 08:37:02 +07:00
Wilfred Hughes c405b58327 Fix cost for ReplacedComment
This needs to be 2x novel nodes, or we prefer it far too often.
2023-07-02 23:12:31 +07:00
Wilfred Hughes 3730580ca3 Improve word splitting heuristics
This is particularly noticeable when diffing comments with timestamps
2000-12-31T23:59:59 where we don't want 31T23 to be a single word.
2023-06-29 08:33:30 +07:00