Commit Graph

11014 Commits (3f0fdbff9f770616204040b1266645d6250a556a)
 

Author SHA1 Message Date
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
Wilfred Hughes b5847506dd
Merge pull request #344 from igrep/fix-342
Fix: Can't build on Windows in a locale whose default encoding is not UTF-8
2022-08-24 21:10:28 +07:00
YAMAMOTO Yuji 12f941c7a9
Fix: Can't build on Windows in a locale whose default encoding is not UTF-8 #342
Fix #342 by adding `/utf-8` flag to cl.exe

Ref. https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
2022-08-25 10:04:14 +07:00
Wilfred Hughes 94ee57036e Add Rust stable to CI 2022-08-23 09:17:49 +07:00
Wilfred Hughes 721ebc663d
Merge pull request #341 from rhysd/terminal-size
Use `terminal_size` crate instead of `term_size` crate
2022-08-23 09:04:29 +07:00
rhysd f201b9e225 Use `terminal_size` crate instead of `term_size` crate
since `term_size` has stopped maintenance 2 years ago.
2022-08-23 10:36:54 +07:00
Wilfred Hughes 09334030ab Fix incorrect line number being used in side-by-side display
Fixes #334
2022-08-22 09:34:34 +07:00
Wilfred Hughes f3420df1ca Roll version 2022-08-21 22:05:04 +07:00
Wilfred Hughes 026b2674d0 Update expected output
The previous two commits were done in a branch that was rebased, so
the integration tets missed 5fe6d551d.
2022-08-21 21:36:00 +07:00
Wilfred Hughes c957818514 Explore two graph nodes for each parenthesis position
This produces substantially better diff results, and fixes the 'last
item in the list shown as changed' problem.

This can produce slower diffing. typing_before.ml takes 10% more
instructions and slow_before.rs takes 110% more instructions.
2022-08-21 16:34:17 +07:00
Wilfred Hughes a71d6118cf Store predecessors and neighbours as mutable fields in graph nodes
This is a more traditional graph representation. It is slightly easier
to reason about, and it's clearer that graph node creation time
dominates graphs exploration.

This is a slight performance regression, but it enables better
exploration of parethesis nesting (see next commit). typing_before.ml
has regressed from 3.75B instructions to 3.85B instructions and
slow_before.rs has regressed from 1.73B instructions to 2.15B
instructions.

This change has also made the diff output for slow_before.rs slightly
worse (note the `lhs` variable is now claimed as changed in more
cases). It's not clear why, but presumably means that the node visit
order has changed slightly.

Closes #324
2022-08-21 16:25:54 +07:00
Wilfred Hughes 2cc05f340f rustfmt 2022-08-21 16:01:51 +07:00
Wilfred Hughes 515932151f Merge branch 'cmake' 2022-08-20 18:36:07 +07:00
Wilfred Hughes b95bc0fb27 Also consider highlights.scm when marking nodes as comments
This removes the need to special-case Perl, and is necessary for
CMake (which has nodes bracket_comment and line_comment that aren't
marked as 'extra').
2022-08-20 18:32:52 +07:00
Wilfred Hughes bbdc324b7f Add CMake support
Fixes #333
2022-08-20 18:32:32 +07:00
Wilfred Hughes 58c8f47298 Also consider highlights.scm when marking nodes as comments
This removes the need to special-case Perl, and is necessary for
CMake (which has nodes bracket_comment and line_comment that aren't
marked as 'extra').
2022-08-20 18:28:07 +07:00
Wilfred Hughes 9d2c5f56cb Add 'vendor/tree-sitter-cmake/' from commit '599836393074e4744d78dad76b8b8eb8e1f690ff'
git-subtree-dir: vendor/tree-sitter-cmake
git-subtree-mainline: 5fe6d551d9
git-subtree-split: 5998363930
2022-08-19 00:29:21 +07:00
Wilfred Hughes fb38e7a24f Always use the RHS for language detection
Taking the longest path breaks if we have e.g. /dev/null and foo.py,
because foo.py is shorter.
2022-08-18 23:00:15 +07:00
Wilfred Hughes 01cce54978 Fix path display when called from git with two arguments
Fixes #332
2022-08-18 23:00:13 +07:00
Wilfred Hughes 5fe6d551d9 Always use the RHS for language detection
Taking the longest path breaks if we have e.g. /dev/null and foo.py,
because foo.py is shorter.
2022-08-18 22:58:43 +07:00
Wilfred Hughes 040dd3b0e2 Fix path display when called from git with two arguments
Fixes #332
2022-08-18 09:34:14 +07:00
Wilfred Hughes d69cc05966 Add link to magit blog post
Mentioned in #251
2022-08-17 09:41:54 +07:00
Wilfred Hughes eb0817468e Update manual for rustc bump 2022-08-12 21:51:34 +07:00
Wilfred Hughes 6ce0717447 Note the newer rustc requirement 2022-08-12 12:39:00 +07:00
Wilfred Hughes a5aa433277 Mention #329 in the changelog 2022-08-12 12:25:02 +07:00
Wilfred Hughes e1672427d3
Merge pull request #329 from fdncred/fix_windows_build
updates to support building on windows
2022-08-10 22:43:05 +07:00
Darren Schroeder 003cbb21e0 updates to support building on windows 2022-08-09 13:51:26 +07:00
Wilfred Hughes 0c03187b96 Roll version 2022-08-07 18:16:16 +07:00
Wilfred Hughes f028389393 Update changelog for last commit 2022-08-07 18:13:04 +07:00
Wilfred Hughes ecd94b4e44 Treat /dev/null as an empty file on all platforms
Fixes #296
2022-08-07 18:11:17 +07:00
Wilfred Hughes 5d93efa51a Document Elm support in the manual and changelog
This was added in 0.26.
2022-08-02 09:15:11 +07:00
Wilfred Hughes 5d195bcfad Use the .entry API instead of a separate .get and .insert
This improves performance, specifically it saves up to 6.2%
instructions (on slow_before/after.rs).
2022-07-25 00:25:47 +07:00
Wilfred Hughes b9f048e87e Add newlines for clarity 2022-07-21 00:45:37 +07:00
Wilfred Hughes bc283341f3 Use unique subtrees shared between LHS/RHS to determine similar lists
This makes the 'lists are sufficiently similar' heuristic more
aggressive. Previously we'd look for lists with common start or end
children and the same delimiters.

This worked badly for cases like:

LHS: (novel-lhs (a b c d e))
RHS: (novel-rhs (a b c d e))

Instead, look for sublists that are unique on both sides and occur on
both the LHS and RHS root being considered. This allows us to match up
many more cases.

Consider lists to be sufficiently similar exclusiely using this
(surprisingly effective) heuristic, and don't consider outer
delimiters.

This substantially improves performance in many cases, particularly
for files that are fairly flat (many toplevel lists with little
nesting).

Fixes #306
2022-07-19 21:58:37 +07:00
Wilfred Hughes 97a29645f0 Ensure content_id is set before finding unique nodes 2022-07-18 22:31:30 +07:00
Wilfred Hughes bf8a20d7bb Fix typo 2022-07-18 21:48:28 +07:00