Closed NathanReb closed 1 month ago
Hello,
I am an outreachy applicant, I am interested in contributing to this project. I have just built the project successfully as requested.
Could this issue be assigned to me, please ?
Thank you!
Hello @azzsal !
Yes, let this issue be assigned to you!
We are currently using the
diffutils
project to print API diffs as human readable text diffs.diffutils
is not released to opam and it prevents us from releasingapi-watch
.Vendoring the whole diffutils project would be a bit overkill as we're only using a very small part of it.
We would like to instead embed the types and functions we use directly in the project.
This makes sense as it is likely that our need for custom diff printing utilities will grow as we move toward a proper structural diff representation of API diffs.
What to import
All of our uses of
Diffutils
are contained within ourText_diff
module. All the types we use come fromDiffutils.Diff
:t
that's used to represent a textual diffprinter
type used to represent the different pretty printersprinter
function that creates a value of the above typegit_printer
value that prints textual diff similarly togit diff
pp
function that takes a printer and returns a function to pretty print textual diffsFor now we'll simply re-implement those exactly like they are defined in
Diffutils
, we'll make adjustment to suit our needs in the future.Those parts of the code are already tested so we won't need to write new ones there. Making sure our existing test pass should be enough.