summaryrefslogtreecommitdiffstats
path: root/CHANGELOG.md
blob: c7a62be7afe842f5441d12b6154e1b9920e4e760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
## 0.37 (unreleased)

### Manual

Added a Chinese translation: https://difftastic.wilfred.me.uk/zh-CN/

### Diffing

Standalone `.` is now considered punctuation in the diff cost model,
which improves diff results in some cases.

### Parsing

Updated to the latest tree-sitter parser for Swift.

### Command Line Interface

Difftastic will now read a file from stdin if given `-` as a path
argument.

Added an option `--context` to control the number of lines of context
displayed.

`--list-languages` now respects the value of `--color`, whose default
only uses styling when stdout is a TTY.

### Display

Fixed side-by-side display width when color is disabled (when piping
difftastic stdout or with `--color=never`).

### Build

Fixed an issue with building on Windows with gcc.

## 0.36.1 (released 17th September 2022)

Fixed a release script that prevented 0.36.0 from including Windows
binaries.

## 0.36 (released 17th September 2022)

### Diffing

Improved diff cost model to prefer finding unchanged variable names
over unchanged punctuation.

### Parsing

Added support for Hare, Pascal and QML.

ZIP files are now always treated as binary files.

Difftastic is now stricter about text content validity, so more binary
files are correctly detected.

### Display

Changed words in changed comments are now also underlined, to make
them more visible.

Fixed crash when word-wrapping lines containing Unicode combining
diacritics characters.

## 0.35 (released 2nd September 2022)

### Diffing

Difftastic now fixes sliders in more cases, producing better diff results.

### Parsing

Difftastic will now autodetect files in UTF-16-BE and
UTF-16-LE. Previously it required files to be UTF-8.

Added support for Makefiles.

Fixed an issue with HCL language detection on `.workflow` files. Fixed
an issue with Makefile language detection.

### Command Line Interface

Fixed terminal width detection when only stderr is a TTY (e.g. when
using difftastic with git). This was broken in 0.34.

Added an option `--list-languages` which reports all the languages
supported, along with the extensions associated with them.

## 0.34 (released 27th August 2022)

### Build

Fixed build on Rust 1.61+.

### Display

Fixed an issue where side-by-side display would sometimes print the
line number from the second file rather than the first file.

## 0.33 (released 21st August 2022)

### Diffing

Difftastic now explores 2x more parenthesis nesting
possibilities. This can make diffing slower, but produces
substantially better results.

### Parsing

Added support for CMake.

Improved comment detection using tree-sitter syntax highlighting
queries.

Fixed an issue with language detection when file names were very
short.

### Command Line Interface

Difftastic prefers to show the second path when called with two
arguments. This fixes an issue (broken in 0.31) where the path would
be shown as `/tmp/git-blob-abc/file_name`.

### Build

Difftastic now requires Rust 1.57 to build.

Fixed build on Windows. Previously it would fail
non-deterministically.

## 0.32 (released 7th August 2022)

### Diffing

Improved performance in many cases, particularly for files with a
fairly flat structure.

### Command Line Interface

Difftastic now treats the path `/dev/null` as an empty file, even if
that path doesn't exist on the current machine. This fixes a crash
when using difftastic with git on Windows.

## 0.31 (released 11th July 2022)

### Parsing

Added Hacklang and SQL support.

Updated to the latest tree-sitter parsers for C#, Dart, Elm, Gleam,
Haskell, HCL, Java, JSON, OCaml, PHP, Python, Ruby, Scala and
TypeScript.

### Display

Fixed an issue with inline mode where there was a blank line between
every line.

### Command Line Interface

Fixed language detection and filename display when one path was
`/dev/null` and difftastic was invoked with two arguments.

## 0.30 (released 4th July 2022)

### Parsing

Added support for HTML and Julia.

### Display

Fixed an issue where line numbers were coloured even when colour was
disabled.

Improved alignment when files contain Unicode characters that are more
than one column wide.

Improved syntax highlighting for conditionals, particularly for Dart,
Elvish and HCL.

### Command Line Interface

`--node-limit` has been replaced by `--graph-limit`, and the
corresponding environment variable `DFT_NODE_LIMIT` has been replaced
with `DFT_GRAPH_LIMIT`.

`--graph-limit` makes difftastic give up on structural diffs after
traversing this many graph nodes. `--node-limit` applied a limit based
on an estimate of how big the graph would be, leading to very slow
diffs when the estimate was wrong.

This new setting sets a more accurate limit on difftastic
performance. It also means that difftastic will always try a
structural diff first. This will be slower for files that exceed
`--graph-limit`, but guarantees that files with a small number of
changes will always get a structural diff.

## 0.29.1 (released 13th June 2022)

Fixed a major memory regression in 0.29 when performing large
line-based diffs (e.g. files of 100 KLOC or more).

## 0.29 (released 9th June 2022)

Performance has improved in 0.29, and larger files typically see a 30%
reduction in runtime.

### Parsing

Improved detection of binary files, including using
`/usr/share/mime/magic` when available.

Improved handling of comments and regexp literals in Perl.

Added Elvish support.

### Diffing

Improved delimiter heuristics in lisp-like languages.

### Display

Difftastic now displays information about file renames. Previously, it
would only show the new name.

## 0.28 (released 29th April 2022)

### Parsing

Added support for HCL, Perl and Swift.

Improved language detection for JSON. More file extensions and file
names are recognised as JSON, e.g. `.jsonl`.

### Display

Fixed crash in inline mode.

Added an option `--tab-width` that controls how many spaces are used
to display tabs. The default value is 8, consistent with older
versions.

Added an option `--syntax-highlight` that controls whether the output
is syntax highlighted.

### Diffing

Difftastic now diffs files in parallel when diffing whole directories,
increasing performance.

Directory diffing now correctly handles files that are only in one of
the directories.

### Command Line Interface

Fixed handling of paths that aren't valid UTF-8.

`--missing-as-empty` now only applies when diffing files, and has no
effect when diffing directories.

### Note: Crates.io Is Patched

Due to the 10 MB crate limit, two patches were applied before
uploading to crates.io. The source code on crates.io therefore does
not exactly match this git tag.

`Cargo.toml` had the include list changed (committed on master as
d9ef270d273e3f7c61e2e167b7efbd33b36d0c96), and the vendored perl
parser had whitespace removed with `sed "s/^[ \t]*//" -i
vendor/tree-sitter-perl-src/parser.c`.

## 0.27 (released 18th April 2022)

### Parsing

Added support for Kotlin and TOML.

Fixed an issue with YAML and `|` block strings.

Updated to the latest upstream C++, C#, Elixir, Go, Haskell, Java,
Python, Ruby, Rust and TypeScript parsers.

### Diffing

Improved performance in large files when changes are clustered together.

### Display

Improved syntax highlighting.

Tabs are now rendered with eight spaces.

### Command Line Interface

Difftastic now validates environment variables the same way as
arguments. `DFT_DISPLAY=no-such-mode` will now error rather than
silently using the default display mode.

### Build

The upstream Haskell parser has been ported from C++14 to pure C. This
should allow difftastic to build on platforms with older C++
compilers.

## 0.26.3 (released 10th April 2022)

### Release

Difftastic now uses GitHub releases with precompiled binaries for
Linux, macOS and Windows.

## 0.26.2 (released 10th April 2022)

### Build

Fixed compilation error on Windows due to GCC extension usage in the
tree-sitter-nix library.

## 0.26.1 (released 10th April 2022)

### Build

This version of difftastic is also available as a GitHub release with
precompiled binaries available.

### Parsing

Fixed Zig parsing of `@foo` identifiers.

### Display

Fixed a crash when inserting newlines in JSX literals.

## 0.26 (released 9th April 2022)

### Build

Fixed an issue where C++ libraries were built before before the C
libraries that they depended on.

### Display

The side-by-side display no longer pads the right column to fill the
terminal. This improves display when the terminal is slightly shrunk,
or when wide characters (e.g. emoji) are used.

Improved syntax highlighting for boolean constants and character
literals.

### Parsing

Added Gleam, Elm, YAML and Zig support.

Improved Clojure parsing with `^Metadata`.

### Command Line Interface

Added the `--display` option to switch between `side-by-side`,
`side-by-side-show-both`, and `inline` display modes. This replaces
the `INLINE` and `DFT_SHOW_BOTH` environment variables.

Added the `--language` option to enable overriding language
detection. When specified, language detection is disabled, and the
input file is assumed to have the extension specified.

### Diffing

Improved diff results for nested sequences `foo(bar(baz()))` in C-like
languages.

## 0.25 (released 31st March 2022)

### Display

Difftastic no longer shows "1/1" when a file only has a single hunk.

Improved Clojure and Scala syntax highlighting.

When a file is entirely unchanged, difftastic now shows "no changes"
even if it successfully parsed. Previously it would only show "no
syntactic changes".

Fixed an issue where some colors were shown when `--color never` was
specified.

Fixed a crash when a text file ended with a multibyte character.

Fixed side-by-side display when source files contained CRLF.

### Parsing

Fixed an issue in C and C++ where blank lines were highlighted after
novel preprocessor lines.

Fixed an issue with parsing `[` and `]` in Java.

Fixed an issue with parsing interpolated strings in PHP.

Added support for Janet, Lua and Nix.

## 0.24 (released 26th March 2022)

### Diffing

Reduced the default value of DFT_NODE_LIMIT from 100,000 to
30,000. This fixes cases where files near the limit would use too much
memory and not terminate.

### Display

Fixed an issue where hunks would be missing lines. This occurred in
certain circumstances when a line contained both changed and unchanged
parts.

Fixed an issue where blank lines at the beginning or end of a file
would be excluded from context.

Fixed an issue where lines containing only whitespace would be
highlighted in purple.

Fixed an issue with changed multiline strings where blank lines were
not highlighted.

Improved Clojure syntax highlighting.

### Parsing

Added support for Dart.

### Command Line Interface

Difftastic will now warn if both arguments point to the same file.

When diffing directories, diff results are printed incrementally
rather than waiting for the results of all files before printing.

## 0.23.1 (released 19th March 2022)

Fixed crash where the 'shrink unchanged' logic would not set the
change state on the outer list.

## 0.23 (released 17th March 2022)

### Diffing

Improved performance on very large files that are compared by text.

Fixed some cases where changing list delimiters would lead to
incorrect diffs.

Fixed an issue where lines were not aligned correctly after correcting
sliders.

Fixed an issue the outermost delimiter in lists was sometimes
incorrectly marked as unchanged, producing non-optimal diffs.

### Display

Display now prefers to align blank lines in the display, producing
significantly better results in many cases.

Fixed an issue where some lines in a hunk were not displayed.

## 0.22 (released 10th March 2022)

Difftastic now requires Rust 1.56 to build.

### Parsing

Added support for PHP.

Fixed handling of `<` `>` delimiters in C++ and Rust.

### Diffing

Difftastic will now split files that contain obviously unchanged
regions, substantially improving performance when a file has multiple
changes that have many unchanged items between them.

Improved diff results when choosing between syntax nodes at different
nesting levels. This is restoring a heuristic that was removed in
0.20.

Improved diff results when lists have unequal sizes.

Improved diff results when the language parser thinks that names occur
in different syntactic positions.

Adjusted the heuristics for 'so much has changed in this expression
that it is confusing to highlight the unchanged parts'. The heuristic
is now less aggressive, which helps performance and seems to produce
slightly better results.

## 0.21 (released 28th February 2022)

### Parsing

Difftastic now understands `-*-` file headers (as used by Emacs) when
performing language detection.