Commit Graph

79 Commits (82890923cd4024c348a2d89cd8245cf71f64e000)

Author SHA1 Message Date
Wilfred Hughes 82890923cd Track entering/leaving parents explicitly
This produces significantly better diffs, and fixes some cases that
were outright wrong before.

Fixes #30
2022-02-20 12:43:52 +07:00
Wilfred Hughes 3c1c5649f4 Ensure --color is still respected
This was broken in the port to owo_colors. owo_colors does not have a
global override: the override function only affects if_supports_color.
2022-02-13 16:54:57 +07:00
Wilfred Hughes 6004855206 Port to owo_colors
This library is faster and actively maintained.

Closes #107
2022-02-13 15:13:40 +07:00
Wilfred Hughes d9ec560f0d Roll version 2022-02-07 23:14:55 +07:00
Wilfred Hughes e2832dabb3 Set a maximum size on syntactic diffing, and use line diffing otherwise
Fixes #82
2022-02-06 16:38:55 +07:00
Wilfred Hughes 0eba3ecabe Update to the latest tree-sitter version
This is also a minor performance improvement (e.g. saves 1.3% time on
typing_old/new.ml or 3% on elisp_before/after.el).
2022-01-31 22:37:05 +07:00
Wilfred Hughes 4d3fac20d9 Next release will be 0.19 2022-01-30 22:58:22 +07:00
Wilfred Hughes 8f6b269492 Tag a 0.18.1 release 2022-01-30 22:56:19 +07:00
Wilfred Hughes 409f7aae75 Roll version 2022-01-30 18:03:45 +07:00
Wilfred Hughes ebd923acbe Use project and author information from Cargo.toml
Prevents duplication.
2022-01-29 15:38:44 +07:00
Wilfred Hughes 5a2e0379aa Update to clap 3 2022-01-29 11:01:36 +07:00
Wilfred Hughes 69dbad35ad Roll version 2022-01-25 22:32:18 +07:00
Wilfred Hughes a2dc0b5109 Roll version 2022-01-22 19:03:58 +07:00
Wilfred Hughes b270156e48 Update tree-sitter version
This is a small perf win (30ms runtime on my machine) due to faster
tree_sitter::Query creation.
2022-01-15 18:13:53 +07:00
Wilfred Hughes a11e3081b2 Roll version 2022-01-06 01:00:48 +07:00
Wilfred Hughes 667a42d57b Downgrade to tree-sitter 0.20.0
0.20.1 has a performance regression, which seems to particularly
affect Elixir parsing:
https://github.com/tree-sitter/tree-sitter/issues/1510
2021-12-29 14:59:12 +07:00
Wilfred Hughes 0cf68ef847 Roll version 2021-12-27 18:28:15 +07:00
Wilfred Hughes cb900c3463 Revert to term_size
Git invokes difftastic and then pipes stdout to less, but stderr still
goes to the terminal. term_size queries both stdout and stderr, so it
can still find the terminal width in this situation.

Previously, we'd always use a width of 80 when invoked by git.

terminal_size discussion:
https://github.com/eminence/terminal-size/issues/23

term_size does claim to support Windows, and #71 was not fixed by
changing libraries, so this seems reasonable.
2021-12-19 12:48:52 +07:00
Wilfred Hughes 6f1baae23e Prefer terminal_width crate so we support more platforms
term_width is unmaintained and does not support Windows.

Fixes #71
2021-12-07 23:24:13 +07:00
Wilfred Hughes 4948f59855 Roll version 2021-12-04 23:56:42 +07:00
Wilfred Hughes fa17058f80 Bump libc version 2021-11-24 23:55:16 +07:00
Wilfred Hughes 7d1bf1e5f4 Update to latest tree-sitter 2021-11-24 23:29:41 +07:00
Wilfred Hughes 19feab9045 Change entry point to be main.rs
Now that we've removed criterion, a binary-only crate is better, as we
get more unused function warnings.
2021-11-21 11:45:48 +07:00
Wilfred Hughes 7fdbaff6fe Update build dependencies 2021-11-19 23:29:17 +07:00
Wilfred Hughes 7f6b8174d5 Update pretty_assertions and use consistently 2021-11-19 23:27:41 +07:00
Wilfred Hughes 9079567695 Update radix-heap
Upstream has had some optimisations and it saves 7% in instructions
executed for slow_before/slow_after.rs according to `perf stat`.
2021-11-19 23:20:37 +07:00
Wilfred Hughes e8f45d91b8 Roll version 2021-11-19 00:49:14 +07:00
Wilfred Hughes a87882c0a3 Increase required rust version
radix-heap uses macros for built-in arguments, which was added in Rust
1.54:
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1540-2021-07-29
2021-10-30 12:46:42 +07:00
Wilfred Hughes c0cd13bd9b Pin Rust version to 1.46
Specify the minimum Rust version in cargo.toml, exercise this version in CI,
and document it in the manual.

We require 1.46 for bitflags, which is a dependency of clap.

Fixes #51
2021-10-29 00:20:07 +07:00
Wilfred Hughes 86724658c0 Update radix-heap version
This avoids us depending on an old version of ordered_float, which has
a security advisory: https://rustsec.org/advisories/RUSTSEC-2020-0082

It also slightly reduces the number of dependencies of difftastic.
2021-10-28 00:51:37 +07:00
Wilfred Hughes 44b025fdc5 Roll version 2021-10-18 22:42:17 +07:00
Wilfred Hughes 3df7bb57e1 Add basic syntax highlighting for keywords and operators
Helps with #32
2021-10-03 15:23:27 +07:00
Wilfred Hughes c92007e5b3 Remove criterion
I've found the numbers pretty noisy on my laptop, and `perf stat` is a
nice way of testing full size files for performance.
2021-10-02 22:00:12 +07:00
Wilfred Hughes 08c68de229 Run `cargo upgrade` 2021-09-26 23:09:20 +07:00
Wilfred Hughes 62b030195e Upgrade to latest treesitter 2021-09-26 23:05:09 +07:00
Wilfred Hughes ec37c5bef1 Add full Mercurial extdiff support 2021-09-26 21:23:22 +07:00
Wilfred Hughes 48efe9d7c4 Roll version 2021-09-24 23:40:07 +07:00
Wilfred Hughes bc4f54da65 Set benchmark path to keep `cargo package` happy 2021-09-22 22:40:53 +07:00
Wilfred Hughes 5991efdcc7 Build tree-sitter parsers in parallel 2021-09-22 22:02:07 +07:00
Wilfred Hughes 8baa083fbf Make debug symbols explicit for release, for easy toggling 2021-09-19 22:47:58 +07:00
Wilfred Hughes d89521e7a3 Improve benchmark name 2021-09-14 22:47:54 +07:00
Wilfred Hughes d5b5f09257 Enable html_reports to silence the crierion warning 2021-09-14 22:42:23 +07:00
Wilfred Hughes f1c59dcfba Add a basic benchmark for the parser 2021-09-14 22:24:25 +07:00
Wilfred Hughes 1e7a39dbbf Make include patterns stricter
Previously we'd match any directory *src, which matched a range of
unwanted files in manual/ and vendor/
2021-09-14 00:45:04 +07:00
Wilfred Hughes d1c5c9d937 Set homepage, keywords and categories in Cargo.toml 2021-09-14 00:41:38 +07:00
Wilfred Hughes 31572a83a9 Roll version following release 2021-09-14 00:34:38 +07:00
Wilfred Hughes ea3cb7737a Use a radix heap to speed up Dijkstra implementation 2021-09-12 22:04:15 +07:00
Wilfred Hughes 6222987872 Move to mimalloc
This produces a small (~10% less runtime) improvement on larger files,
as difftastic spends a lot of time allocating.
2021-09-12 20:14:44 +07:00
Wilfred Hughes 0f042fb160 Roll version 2021-09-05 11:23:00 +07:00
Wilfred Hughes 86a330c44e Add debug logging and log stats on shortest path found 2021-09-04 10:46:51 +07:00