Commit Graph

13033 Commits (892d4fdb5887e4aa7ba6a76c34987057518548ec)
 

Author SHA1 Message Date
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 c937f819a1 Log the number of bytes in the arena at the end of route finding 2023-08-04 17:04:23 +07:00
Wilfred Hughes 0c01c73398 Be consistent in lifetime names for Vertex 2023-08-03 08:32:16 +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 37683db6de Don't fail CI if coverage upload fails
This step sometimes fails, which does not mean our code is bad.
2023-07-29 10:40:32 +07:00
Wilfred Hughes 797af40ae8 Improve Java highlighting 2023-07-27 08:33:38 +07:00
Wilfred Hughes b2c8cb640f Update crossbeam-channel dependency
0.5.x prior to 0.5.8 have been yanked:
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-channel/CHANGELOG.md
2023-07-26 20:38:34 +07:00
Wilfred Hughes de0e1f5bda Add test for --ignore-comments option 2023-07-26 20:15:13 +07:00
Wilfred Hughes 448972f8a3 Roll version 2023-07-26 20:02:23 +07:00
Wilfred Hughes d58e3194c8 Move release logic to justfile 2023-07-26 20:01:25 +07:00
Wilfred Hughes 0cb1cdbb3e Document MSRV for newer bumpalo 2023-07-26 15:12:55 +07:00
Wilfred Hughes 65b235be28 Move to edition 2021 2023-07-26 15:06:21 +07:00
Wilfred Hughes 070dc3b4a5 Update crossterm version
This provides some minor bugfixes for Windows width detection:
https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md

This cherry-picks a525196635, after the
MSRV bump.
2023-07-26 14:56:52 +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 721ad0863d Revert "Update crossterm version"
This reverts commit a525196635.

Looks like it doesn't compile on Rust 1.57.
2023-07-26 11:17:50 +07:00
Wilfred Hughes 13c67177c0 Print possible targets when running just with no arguments 2023-07-24 22:38:57 +07:00
Wilfred Hughes ff5165ef72 Update strum dependency 2023-07-24 22:30:46 +07:00
Wilfred Hughes f15a7c728d Define a justfile for common commands 2023-07-24 22:11:46 +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
Amaan Qureshi ad095896dd
0.20.4 2023-07-24 15:35:34 +07:00
Amaan Qureshi e17d0a1602
feat: rework release action 2023-07-24 15:35:07 +07:00
Amaan Qureshi cc565c46f9
Merge pull request #156 from amaanq/fixes
Some fixes
2023-07-24 15:22:02 +07:00
Wilfred Hughes 5374dc4452 Clarify wording and difftastic's status in Tricky Cases 2023-07-24 08:46:20 +07:00
Wilfred Hughes 8da6efa262 Suggest --locked when people install with cargo 2023-07-24 08:25:01 +07:00
Amaan Qureshi 0cc26b0e3b
chore: generate 2023-07-24 05:23:35 +07:00
Amaan Qureshi 7b8332686e
chore: add tests 2023-07-24 05:23:19 +07:00
Amaan Qureshi 41c0a15e09
fix: make preproc newlines immediate so they don't span excess trailing newliens 2023-07-24 05:23:19 +07:00
Amaan Qureshi 5890e77d2d
fix: disallow `/` after `\S` to better handle comments in preproc_arg 2023-07-24 05:05:28 +07:00
Amaan Qureshi f3559c6cb4
fix: swap precedences of assignnment and conditional expressions
`a *= b != c ? d : e;` is parsed incorrectly as a result
2023-07-24 04:17:56 +07:00
Amaan Qureshi 2c7aff437d
Merge pull request #216 from amaanq/update
Update grammar from changes in C
2023-07-24 00:21:14 +07:00
Stephan Seitz b050649c68
refactor: remove unused function `skip` in scanner (#215) 2023-07-23 22:39:58 +07:00
Amaan Qureshi 745ad8f5dd
chore: generate 2023-07-23 22:49:10 +07:00
Amaan Qureshi 7ce69cb41d
fix: remove `_typedef_type_specifier`, use git version of tree-sitter-c 2023-07-23 22:47:15 +07:00
Amaan Qureshi fcd123005b
Merge pull request #155 from amaanq/fix-attribute
feat: add `attribute_specifier` to struct
2023-07-23 22:32:36 +07:00
Amaan Qureshi 0dd318d271
fix: update `if_statement` to align with C 2023-07-23 22:31:45 +07:00
Wilfred Hughes a525196635 Update crossterm version
This provides some minor bugfixes for Windows width detection:
https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md
2023-07-23 10:32:49 +07:00
Amaan Qureshi 4b6e0bc97b
feat: add `attribute_specifier` to struct 2023-07-22 05:48:59 +07:00
Amaan Qureshi 475dc3bb84
Merge pull request #152 from amaanq/typedef-fixes
Typedef fixes
2023-07-21 12:39:30 +07:00
Wilfred Hughes 1b9844cd60 Add sliders to the glossary
Fixes #537
2023-07-21 08:39:53 +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 4f750ec359 Clarify how to find language names in argument help 2023-07-21 08:23:36 +07:00
Amaan Qureshi 349f3bb3f4 chore: generate & update test 2023-07-21 05:34:34 +07:00
Amaan Qureshi 4c49fc3883 fix: rework typedef specifiers again 2023-07-21 05:34:34 +07:00
Wilfred Hughes 2d23eb549d Document the new LaTeX support 2023-07-20 23:05:18 +07:00
Wilfred Hughes 685a2ef8d5 Merge remote-tracking branch 'grunweg/master' 2023-07-20 22:41:56 +07:00
Amaan Qureshi cbb9974efd
0.20.1 2023-07-18 17:47:27 +07:00
Amaan Qureshi 8dc2b30756
Merge pull request #213 from amaanq/update-c
Update c
2023-07-18 17:46:21 +07:00
Amaan Qureshi 0e3608113e
ci: rework publish action to publish to both npm and crates.io, with logic to fail if the version bump is incorrect 2023-07-18 17:39:47 +07:00