janestreet / janestreet/patdiff
Miscalculated diff
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 252
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
With the two following files:
`notmp`
x: int
y: int
`tmp`
x: int
y: int
tmp: int
patdiff is able to compute the proper diff:

But if I put punctuation in it:
`notmp`
x: int
y: int
`tmp`
x: int;
y: int;
tmp: int
The calculated diff doesn't seem to be the optimal one:

Is this the expected behaviour?
Since this is my third issue, thanks for the package btw, sorry for the spam!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by running patdiff on the two file pairs shown in the report, with and without punctuation. Compare the generated diffs and inspect the diff algorithm's handling of punctuation to determine whether the behavior is expected. Done means the behavior is clarified and, if incorrect, covered by a regression case with the expected diff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100