Better Diff module for Tezt
Replace Diff
module used by Tezt.Regression
by a better implementation after license question has been resolved.
The following discussion from !5976 (merged) should be addressed:
-
@hhugo1 started a discussion: (+15 comments) The diff algorithm looks ok but for for the fallback part that uses arbitrary limit. I'm afraid we will hit the limit too often when something goes wrong, generating artificially large diffs that could mislead users.
Some alternatives would be:
- use
Sys.command
which would work on nodejs (this is what ppx_expect does). The benefit is that we could let user decide what diff tool to use. - Use existing libraries. For example,
Patience_diff_lib.Patience_diff.String.matches
, found in https://github.com/janestreet/patience_diff/
- use