Wilfred Hughes
f0e90b2aea
Improve test naming and ensure they're exercising the relevant parts
2022-03-09 23:02:16 +07:00
Wilfred Hughes
cc384bfa6d
Add shrinking and get tests passing
2022-03-09 22:45:53 +07:00
Wilfred Hughes
80b9762216
Set threshold and document
2022-03-09 09:40:53 +07:00
Wilfred Hughes
d1c060ca17
Make skip unchanged logic less aggressive
2022-03-09 09:40:53 +07:00
Wilfred Hughes
f39721d792
Update most of the integration tests
2022-03-09 09:40:53 +07:00
Wilfred Hughes
1895df8f3b
Allow unchanged nodes to be checked recursively, and hook up to main.rs
2022-03-09 09:40:53 +07:00
Wilfred Hughes
fb7d2d7c86
Get basic examples working with impl
2022-03-09 09:40:53 +07:00
Wilfred Hughes
e2c65e5743
unique ID and plumb in
2022-03-09 09:40:53 +07:00
Wilfred Hughes
08f8568eeb
Mark, add tests
2022-03-09 09:40:53 +07:00
Wilfred Hughes
63588d2c61
WIP unchanged regions
2022-03-09 09:40:53 +07:00
Wilfred Hughes
becb79f861
Clarify logging to distinguish graph nodes from syntax nodes
2022-03-08 22:11:54 +07:00
Wilfred Hughes
ad77bba451
Add debug logging for the number of nodes diffed
2022-03-08 22:09:20 +07:00
Wilfred Hughes
17ff2bc07e
< and > are delimiters in Rust and C++
2022-03-08 20:42:57 +07:00
Wilfred Hughes
88ae00bd88
Use depth difference as a heuristic when comparing equal nodes
...
This reverts commit 7544874a55 . It turns
out there are cases where this is still necessary (see new sample
file). It's also performance neutral.
This bug became more obvious with the recent 'skip unchanged'
optimisations. The optimisation changed the number of preceeding nodes and
exposed this bug more often.
2022-03-08 09:44:55 +07:00
Wilfred Hughes
6f65bbbbb0
Merge branch 'delim_type'
...
Introduce a new type EnteredDelimiter that tracks entering/leaving
list nodes. The PopEither and PopBoth cases reflect the choices more
accurately than a 2-tuple of options.
This is a performance hit (slow_before.rs runtime has increased by
49%) but it's important for diff correctness.
Fixes #147
2022-03-06 21:39:15 +07:00
Wilfred Hughes
1a85fb1271
Fix up tests, add doc comments
2022-03-06 21:34:36 +07:00
Wilfred Hughes
c229cfb6bb
Import Stack rather than qualifying name
2022-03-06 21:07:26 +07:00
Wilfred Hughes
5c15ecfab7
Further clone reductions
2022-03-06 20:48:08 +07:00
Wilfred Hughes
c4db17f6ea
Remove unnecessary clone
2022-03-06 20:36:33 +07:00
Wilfred Hughes
478e574141
Store the parent ID rather than all the ancestors
2022-03-06 19:54:43 +07:00
Wilfred Hughes
487d82fffb
It's sufficient (and faster) to just compare the innermost parent ID
2022-03-06 19:45:07 +07:00
Wilfred Hughes
09b957bd61
Get it working, but slow
2022-03-06 16:00:41 +07:00
Wilfred Hughes
9d23d6e3c3
Try enforcing an ordering of LHS/RHS entering
2022-03-06 11:48:20 +07:00
Wilfred Hughes
49098324fa
Defensively hash to distinguish PopEither and PopBoth
2022-03-05 22:00:11 +07:00
Wilfred Hughes
416d7d123f
Fix equality for EnteredDelimiter
2022-03-05 21:58:27 +07:00
Wilfred Hughes
f2944af304
Add a concise debug printer for EnteredDelimiter
2022-03-05 21:51:37 +07:00
Wilfred Hughes
ab65de66b7
Simplify and fix typos
2022-03-05 21:14:58 +07:00
Wilfred Hughes
3e8f1abbd4
Don't insert empty PopEither items
2022-03-05 19:53:27 +07:00
Wilfred Hughes
85f6d69df4
Fix copypasta
2022-03-05 19:44:12 +07:00
Wilfred Hughes
c8a7d25b55
Getting it compiling
2022-03-05 19:31:16 +07:00
Wilfred Hughes
e3e6366ed9
WIP new delim type
2022-03-05 19:10:00 +07:00
Wilfred Hughes
bad4dee888
Add TODO
2022-03-05 18:50:14 +07:00
Wilfred Hughes
72ef70210f
Print syntax nodes when displaying calculated route
2022-03-05 18:24:07 +07:00
Wilfred Hughes
e134257f78
Fix syntax error in clojure example program
2022-03-05 16:31:47 +07:00
Wilfred Hughes
44b2f6b6ec
Update regression tests for empty atom change in previous commit
2022-03-05 16:31:30 +07:00
Wilfred Hughes
3a482b707c
Drop empty atoms
...
These rarely occur, but difftastic is very sensitive to syntax tree
size so every little helps.
Spotted in #147 .
2022-03-05 11:51:43 +07:00
Wilfred Hughes
f82cace9bd
Atom content equality should ignore highlighting
...
Improves several cases in #147
2022-03-05 11:37:10 +07:00
Wilfred Hughes
0ee982a138
Bump rust version used to build docs
2022-03-05 11:04:19 +07:00
Wilfred Hughes
00c7d73bdf
Version bump tree-sitter
2022-03-05 11:03:28 +07:00
Wilfred Hughes
2640f78f2f
Version bump radix-heap
2022-03-05 10:59:50 +07:00
Wilfred Hughes
2d4ec0a4be
Bump minimum Rust version to 1.56 for rpds support
2022-03-05 10:42:52 +07:00
Wilfred Hughes
4b674d4b8e
Use rpds rather than im for persistent data types
...
rpds is actively maintained and it's even a significant performance
win in my testing (40% time reduction on slow_before.rs).
2022-03-04 21:47:05 +07:00
Wilfred Hughes
efc59360cc
Add a debugging option to disable the skip_unchanged logic
2022-03-04 09:45:25 +07:00
Wilfred Hughes
25433a0c3d
Only consider novel trees at the top level
...
Helps with #148 . On my machine this changes slow_after.rs from 4.4 to
3.4 seconds, but only reduced instruction count from 12.8B to 10.4B.
The one changed case in sample_files/ is more granular and more
readable.
2022-03-02 22:55:22 +07:00
Wilfred Hughes
0fb5525902
Tweak wording of motto
2022-02-28 21:03:07 +07:00
Wilfred Hughes
cb0f1f3fe5
Roll version
2022-02-28 09:26:26 +07:00
Wilfred Hughes
128bad9ac9
Fix typo
2022-02-26 11:47:30 +07:00
Wilfred Hughes
78d4d59c0c
Documenting some recently found tricky cases
2022-02-25 00:43:18 +07:00
Wilfred Hughes
75bca2bc57
Fix more clippy warnings
2022-02-24 20:49:11 +07:00
Wilfred Hughes
0905fb74c3
Simplify usage of regression test suite
2022-02-24 20:35:36 +07:00