Commit Graph

11476 Commits (809ca7a04adc05d6f705c49ccfc5c58b9ab6a63e)
 

Author SHA1 Message Date
Wilfred Hughes ff81f61fd4 Build on arm64 for CI
See also #353, but that only affects builds when doing releases.
2022-09-08 09:39:38 +07:00
Wilfred Hughes 777d6d1f07
Merge pull request #354 from Yeegsing/translation
chinese translation of README.md
2022-09-08 09:20:56 +07:00
Wilfred Hughes 1ac943c1a8
Merge pull request #353 from Niek/patch-1
Add arm64 releases for Linux and macOS
2022-09-08 09:17:02 +07:00
Yuya Nishihara cc2d354768 Unset LC_ALL and LC_COLLATE to stabilize regression test output
I set LC_COLLATE=C in ~/.profile, which appears to change the glob order.
LC_ALL would also affect that, so let's unset both.
2022-09-08 22:37:27 +07:00
Inge Fredriksen f6263ef538
Fix help-value for "--syntax-highlight" argument.
"ON" and "OFF" in uppercase are not accepted. Print help in lowercase to match accepted values.
2022-09-08 10:16:14 +07:00
eric.tao 325f20e336 chinese translation of README.md 2022-09-07 20:19:58 +07:00
Niek van der Maas d767b87f90
Add arm64 releases for Linux and macOS
This adds `aarch64` (arm64) releases for both Linux and macOS.
2022-09-07 09:55:33 +07:00
Wilfred Hughes 4c9a12a905 Clarify position symbols in diff diagrams in manual 2022-09-05 17:20:13 +07:00
Wilfred Hughes 7422cb8f2e Document nested sliders case in manual 2022-09-05 15:06:10 +07:00
Wilfred Hughes 9695d0009e Mention slider fix in changelog 2022-09-02 18:35:04 +07:00
Wilfred Hughes e15244c8f6 Roll version 2022-09-02 18:24:08 +07:00
Wilfred Hughes b104c4be10 Fix sliders in a single global pass
Previously we fixed sliders in each 'possibly changed' region. This
meant that we couldn't fix sliders that needed to move outside the
region. The most common case was code of the form `foo, bar, baz`
where `, baz` was unchanged but we wanted to slide to `,`.

We now call `fix_all_sliders` for the toplevel tree on both
sides. This required some minor changes to the slider logic, as the
unchanged/novel regions could occur at any level of the tree.

(It was probably also the case that we were missing slider
opportunities previously, because we terminated as soon as we found an
outer slider for the nested case.)

This change has no performance impact, probably because tree diffing
is vastly more expensive (O(N^2)) than sliders (O(N)).

Fixes #327
2022-09-02 18:10:09 +07:00
Wilfred Hughes 114235e4da cargo fmt 2022-09-02 18:05:22 +07:00
Wilfred Hughes 8860fabf19 Fix novel_regions_after_unchanged to always append the last region
This is the correct thing to do (and consistent with
novel_regions_before_unchanged), although I haven't found any examples
where it affects the results.
2022-09-02 16:39:11 +07:00
Wilfred Hughes d9fb75981e Make the default value of --background visible in --help 2022-09-02 13:04:34 +07:00
Wilfred Hughes a9866e1187 Mention --list-languages in the manual 2022-09-02 12:58:36 +07:00
Wilfred Hughes c70014a74a Add bold styling to --list-languages to help readability 2022-09-02 12:01:05 +07:00
Wilfred Hughes c0083fdca0 Display file extensions alphabetically 2022-09-02 11:59:30 +07:00
Wilfred Hughes faa5d0a51c Use language pretty-printer for --list-languages 2022-09-02 11:57:05 +07:00
Wilfred Hughes eabefd5612 Factor out language name pretty-printing 2022-09-02 11:56:51 +07:00
Wilfred Hughes 5b866f8db3 Fix extensions for language detection with Makefile syntax 2022-09-02 11:42:28 +07:00
Wilfred Hughes fd571c98a7 Add a --list-languages option
Fixes #292
2022-09-02 11:41:05 +07:00
Wilfred Hughes 40dfd9eb29 Fix typo in .workflow extension name 2022-09-02 11:26:40 +07:00
Wilfred Hughes 6278e31130 Factor out LANG_EXTENSIONS as a constant we can iterate over 2022-09-02 11:25:33 +07:00
Wilfred Hughes a04f867557 Fix terminal width detection
This was previously fixed in
cb900c3463 (see commit message), but
broken in #341.

Instead, use both term_size and terminal_size, to maximise our chances
that we can detect the width. Also comment the code with the relevant
terminal_size issue.

Fixes #346
2022-09-02 11:07:48 +07:00
Wilfred Hughes df5c787ec7 Revert "Add failing test for #346"
This reverts commit 46bbe06d75.
2022-09-02 10:47:00 +07:00
Wilfred Hughes 46bbe06d75 Add failing test for #346
This fails locally as expected, but I want to confirm that it fails on
CI too.
2022-09-01 09:40:18 +07:00
Wilfred Hughes b31e3c78c1 Add sample files missing from b1b3756fa7 2022-09-01 09:21:25 +07:00
Wilfred Hughes efa75b16c8 cargo fmt 2022-09-01 09:19:16 +07:00
Wilfred Hughes 8ff572d615 Copy crates.io note from the release info on 0.28 2022-09-01 09:18:32 +07:00
Wilfred Hughes 659f2dd6bd Add support for Makefiles 2022-08-28 16:26:01 +07:00
Wilfred Hughes 615daf8880 Add 'vendor/tree-sitter-make/' from commit 'a4b9187417d6be349ee5fd4b6e77b4172c6827dd'
git-subtree-dir: vendor/tree-sitter-make
git-subtree-mainline: b1b3756fa7
git-subtree-split: a4b9187417
2022-08-28 16:06:14 +07:00
Wilfred Hughes b1b3756fa7 Attempt to detect and decode UTF-16 files too
Closes #345
2022-08-28 15:38:57 +07:00
Wilfred Hughes 8b5642ef51 Use the same checkout action version everywhere 2022-08-27 23:04:36 +07:00
Wilfred Hughes 1d1d883a9b Roll version 2022-08-27 23:00:33 +07:00
Wilfred Hughes 3f0fdbff9f This linking option is required in older rust versions, not newer 2022-08-27 17:58:07 +07:00
Wilfred Hughes ae799f39d9 Document environment variables in manual 2022-08-27 17:53:18 +07:00
Wilfred Hughes aca46af40f Don't specify +whole-archive before rust 1.61 2022-08-27 17:51:54 +07:00
Wilfred Hughes 734a638ca2 Difftastic uses several factors to detect the language 2022-08-27 17:30:22 +07:00
Wilfred Hughes a247218811 Set +whole-archive on C/C++ libraries
This fixes the build for Rust 1.61+ on some machines. I can reliably
reproduce this locally, but CI does not exhibit this issue (I'm not
sure why).

The Rust compatibility notes document this change:
https://github.com/rust-lang/rust/blob/1.61.0/RELEASES.md#compatibility-notes

and eventually this will be supported by cc:
https://github.com/rust-lang/cc-rs/pull/671

Fixes #339
2022-08-27 17:28:04 +07:00
Wilfred Hughes d3963ca7e7
Be more explicit about cargo version when using stable 2022-08-27 16:26:31 +07:00
Wilfred Hughes 78e07c8178 Push to gh-pages with --force 2022-08-27 16:14:25 +07:00
Wilfred Hughes c3299a7cba Upstream version format has changed 2022-08-27 16:09:02 +07:00
Wilfred Hughes d65b0affca Use latest version of pages deploy action 2022-08-27 16:05:33 +07:00
Wilfred Hughes 175620590f 'cargo test' should be 'cargo doc' 2022-08-27 16:05:25 +07:00
Wilfred Hughes 660e9a1b1e Don't use actions-rs for build of manual either 2022-08-27 16:00:41 +07:00
Wilfred Hughes bc40836b8f Don't track history in gh-pages
This is already in the main branch and it makes the repository bigger
than it needs to be.

Should slightly improve #343
2022-08-27 15:55:52 +07:00
Wilfred Hughes db12fb0cf3 Fix version specification 2022-08-27 15:33:11 +07:00
Wilfred Hughes b04ac7361d Move away from actions-rs as it's unmaintained
It doesn't support rust-toolchain.toml per
https://github.com/actions-rs/toolchain/issues/126 and it isn't
receiving new updates per
https://github.com/actions-rs/toolchain/issues/216 .
2022-08-27 15:27:19 +07:00
Wilfred Hughes aa48ac194d Use an explicit toolchain step in GitHub actions 2022-08-27 15:16:36 +07:00