petertrr / kotlin-multiplatform-diff

Multiplaform kotlin library for calculating text differences. Based on java-diff-utils, supports JVM, JS and native targets.
Apache License 2.0
74 stars 5 forks source link

Introduce Myers algorithm in linear space #112

Closed lppedd closed 1 month ago

lppedd commented 2 months ago

This PR requires #111 to be merged first.
I will then rebase.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 94.21769% with 17 lines in your changes missing coverage. Please review.

Project coverage is 86.07%. Comparing base (875f4ce) to head (37933be).

Files Patch % Lines
...github/petertrr/diffutils/text/DiffRowGenerator.kt 93.61% 3 Missing and 6 partials :warning:
...futils/algorithm/myers/MyersDiffWithLinearSpace.kt 92.78% 1 Missing and 6 partials :warning:
...hub/petertrr/diffutils/algorithm/myers/PathNode.kt 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #112 +/- ## ============================================ + Coverage 84.26% 86.07% +1.80% - Complexity 151 221 +70 ============================================ Files 22 30 +8 Lines 534 632 +98 Branches 89 117 +28 ============================================ + Hits 450 544 +94 - Misses 57 59 +2 - Partials 27 29 +2 ``` | [Flag](https://app.codecov.io/gh/petertrr/kotlin-multiplatform-diff/pull/112/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Peter+Trifanov) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/petertrr/kotlin-multiplatform-diff/pull/112/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Peter+Trifanov) | `86.07% <94.21%> (+1.80%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Peter+Trifanov#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lppedd commented 1 month ago

I'm done with this one. The refactor: clean up DiffRowGenerator commit has a bit of changes but they're mostly to remove "untyped" lambdas.

This PR is a breaking API change for DiffRowGenerator.

lppedd commented 1 month ago

what's the breaking change in the DiffRowGenerator

It's just the constructor, we introduced new interfaces so I'm not sure it would work straight away.
Edit: well, the new interfaces are not only there, so I'd say this is a general breaking change, but, guess it's ok!

lppedd commented 1 month ago

@petertrr np. I have another PR with a small cleanup and then it would be cool to do a release imo!

lppedd commented 1 month ago

Ah I see you already released ahaha, well no problem, will be for another minor release.