Closed NathanReb closed 4 months ago
Might be worth looking at https://github.com/panglesd/ocaml-diffutils, could be useful to turn our diff into their Diff.t
and let them handle the printing!
CC @panglesd, do you think it could fit our usecase?
CC @Siddhi-agg
@NathanReb Please assign me.
If integrating with ocaml-diffutils
is possible, that would be great!
I only see now that I completely missed the ping, sorry! (I think I was on vacation at the time, it must have been list in the sea of notification when I returned).
Using ocaml-diffutils
for handling the printing could make sense, although I believe it will be limited for your usecase whenever you will go fancy!
You might want to have a look at diffcessible which show diffs as a TUI.
(Both of these libraries are focused on showing text diffs (with numbered lines). So they might not be suitable be we are open to making them suitable to other contexts, eg where line numbers/filenames do not make sense!)
Before diving deeper in the range of changes we can properly detect, it would be good to be able to display the changes we already detect.
We now have a basic representation of changes to values. We would like to be able to pretty print such changes in a text diff-like format for human consumption.
The goal here is to add functions to the library that can print our diff as a text diff and to update the binary diff tool so that it outputs such diffs instead of simply printing
API changed!
.