Commit Graph

630 Commits (5a51c02157c7fd4981e294e75d044f227ce2a939)

Author SHA1 Message Date
Wilfred Hughes 6760559e6f Increase MSRV to 1.65
See discussion in #570
2024-01-28 12:55:07 +07:00
Wilfred Hughes 73a6a61b27 Add VHDL to changelog 2024-01-28 12:35:11 +07:00
Wilfred Hughes 2d61aefb84 Fix tab replacement in single-column display
Fixes #617
2024-01-07 19:35:33 +07:00
Wilfred Hughes bc0cbaf3ae Change default tab width to 4
This is more consistent with web UIs like GitHub, so I think it's a
better default.
2024-01-07 13:15:12 +07:00
Wilfred Hughes db86b28a28 Add support for Objective-C
Closes #600

Co-authored-by: Nick Moore <nick@pilotmoon.com>
2024-01-07 12:50:19 +07:00
Wilfred Hughes 8eebc24165 Roll version 2024-01-07 00:33:16 +07:00
Wilfred Hughes 7eb2f99077 Update changelog for previous commit 2024-01-05 21:07:46 +07:00
Wilfred Hughes db0c150f61 Report permission changes
Fixes #605
2023-12-30 11:20:00 +07:00
Wilfred Hughes 8b90c95e01 When called with a single path, require conflict markers
Fixes #585
2023-12-29 19:39:44 +07:00
Wilfred Hughes c180fb52a9 Treat strict types in Haskell as atoms
This isn't ideal: it prevents a finegrained diff of syntax within a type, but it
beats claiming that the code is unchanged.

Fixes #607
2023-12-28 19:24:35 +07:00
Wilfred Hughes 26c58a25e8 Treat regex literals as atoms in Clojure 2023-12-17 10:46:15 +07:00
Wilfred Hughes 1bed379115 Document salesforce apex in the changelog 2023-12-07 08:56:28 +07:00
Wilfred Hughes 569f0038d1 Always filter blank lines at start and end in positions
Fixes #595
2023-11-28 12:35:28 +07:00
Wilfred Hughes b9a1302e54 Bump MSRV to 1.63
In the past I've been more cautious, but this is the version supported
by Debian Stable, and it's more than 12 months old.

A decent number of dependencies are only tested against newer rustc
versions (see e.g. the recent aho-coarasick pin due to no MSRV on that
library). I've filed bugs in some cases, but upgrading rustc versions
more aggressively should make this problem less common.
2023-11-26 01:24:29 +07:00
Wilfred Hughes 5153b9f17c Document the changes in the 0.53.1 release 2023-11-26 01:12:58 +07:00
Wilfred Hughes 7e50c2d8a2 Roll version 2023-11-24 01:22:49 +07:00
Wilfred Hughes 2cab9ac1d6 Document --sort-paths in changelog 2023-11-24 01:12:11 +07:00
Wilfred Hughes 4c6336fe33 Document change to directory diffing 2023-11-24 01:03:41 +07:00
Wilfred Hughes fe62cf4cf5 Don't ignore novel blank lines
Fixes #575
2023-11-18 17:27:41 +07:00
Wilfred Hughes 635e62c19b Support .snap files
Closes #571
2023-11-18 14:50:54 +07:00
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
Alan Zimmerman 5dba13dcd5 Prepare version 0.1.0
Summary: Preparing to publish a new version of https://crates.io/crates/tree-sitter-erlang to bring in the recent changes for OTP 26 support.  And fix the ELP github CI

Reviewed By: michalmuskala, perehonchuk

Differential Revision: D46796302

fbshipit-source-id: 8320d63a5d8b3aa6829992864bf641fdea735ca5
2023-06-16 04:39:42 +07:00
Wilfred Hughes 63a5eeaa98 Update changelog for Scala parser update
Fixes #521
2023-06-12 22:28:56 +07:00
Wilfred Hughes b0a3a0ada9 Use DFT_LOG as the internal logging environment variable
Fixes #519
2023-05-21 23:33:34 +07:00
Wilfred Hughes 26bb4bb7ed Fix punctuation 2023-05-17 22:46:47 +07:00
Wilfred Hughes b2abf528b3 Fix markdown 2023-05-17 22:45:34 +07:00
Wilfred Hughes f1acd3aab4 Roll version 2023-05-16 21:13:51 +07:00
Wilfred Hughes b6895d42e4 Document the --override option in CHANGELOG and --help
This also enables users to disable language parsing.
Closes #439
Closes #440
2023-05-15 23:04:20 +07:00
Wilfred Hughes 84af470128 Remove --language 2023-05-14 15:57:43 +07:00
Wilfred Hughes 05a1b184ea Use globbing to match file names in language detection 2023-05-14 15:50:56 +07:00
Wilfred Hughes bde09efb80 Update changelog and tests for new path printing logic 2023-04-15 21:08:40 +07:00
Wilfred Hughes efd57ddbae Update changelog and manual for Solidity support 2023-04-12 00:56:13 +07:00
Wilfred Hughes 2296c9f739 Update version of next release 2023-04-01 16:20:17 +07:00
Wilfred Hughes 81ac13cbd3 Roll version following release 2023-03-31 08:37:06 +07:00
Wilfred Hughes 8b842387a1 Don't clean trailing newline before diffing
Difftastic should take the user's input as-is, or it risks performing
an incorrect diff in both textual and syntactic diffing.

Fixes #499
2023-03-30 08:46:11 +07:00
Wilfred Hughes 1e9f437688 Remove --missing-as-empty 2023-03-17 08:40:21 +07:00
Wilfred Hughes 6d99ea41c1 Merge commit 'ff1f0ac0f1c678a23f68d0140e75a0da8e11b7b5' 2023-03-17 00:46:11 +07:00
Wilfred Hughes 6ae589766c Merge commit 'ab75be9750e6f2f804638824d1790034286a830c' 2023-03-17 00:45:03 +07:00
Wilfred Hughes 6a455faa06 Merge commit 'b66d19b9b6ec3edf3d8aff0c20646acbdaa0afb3' 2023-03-17 00:14:19 +07:00
Wilfred Hughes e24ca47173 Merge commit '5720b249490b3c17245ba772f6be4a43edb4e3b7' 2023-03-17 00:13:21 +07:00
Wilfred Hughes aef2a84fa5 Merge commit 'f1106bf834703f1f2f795da1a3b5f8f40174ffcc' 2023-03-17 00:09:44 +07:00
Wilfred Hughes 8266e0a161 Merge commit '64457ea6b73ef5422ed1687178d4545c3e91334a' 2023-03-17 00:05:52 +07:00
Wilfred Hughes f76dfdc4f0 Merge commit '3c24aa9365985830421a3a7b6791b415961ea770' 2023-03-17 00:01:50 +07:00
Wilfred Hughes 1c01128050 Update changelog for last commit 2023-03-16 22:12:10 +07:00
Wilfred Hughes b914149ccf Merge commit '399605a02bcd5daa309ce63a6459c600dce3473f' 2023-03-16 08:20:22 +07:00
Wilfred Hughes 7fbe0d6c2f Improve UTF-16 detection heuristics and add test 2023-03-16 00:31:58 +07:00
Wilfred Hughes b1ecf00602 Merge commit 'fcacbeb4af6bcdcfb4527978a997bb03f4fe086d' 2023-03-15 23:50:56 +07:00
Wilfred Hughes 630e843a66 Merge commit '03fa93db133d6048a77d4de154a7b17ea8b9d076' 2023-03-15 23:24:58 +07:00
Wilfred Hughes b636201a8c Merge commit 'f35789006ccbe5be8db21d1a2dd4cc0b5a1286f2' 2023-03-15 21:49:50 +07:00
Wilfred Hughes 4eaba59c5e Merge commit 'b338fa9f4807b9e0336cd4dde04948a8c324a4cf' 2023-03-15 16:11:16 +07:00
Wilfred Hughes 20ad284882 Add 'vendored_parsers/tree-sitter-clojure/' from commit '421546c2547c74d1d9a0d8c296c412071d37e7ca'
Closes #448

git-subtree-dir: vendored_parsers/tree-sitter-clojure
git-subtree-mainline: ebfc043a4a
git-subtree-split: 421546c254
2023-03-15 15:43:55 +07:00