Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Hex diff library for diff and patch #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dgoldie
Copy link

@dgoldie dgoldie commented Jul 2, 2021

No description provided.

@andyl
Copy link
Owner

andyl commented Jul 2, 2021

Doug, thanks for this!

Please submit a diff solution that will convert to/from JSON. The expression Diff.diff("asdf", "assdf") |> Jason.encode!() raises an error.

Also: if you can come up with a solution that does not require use of 3rd party dependency, that would be optimal. But in the near term, I would for sure prefer a dependency vs shelling out to the linux utils.

FYI I added a bit more context to Issue #2.

Thanks again for this PR!

@andyl
Copy link
Owner

andyl commented Jul 2, 2021

Just saw this on Elixir Forum - maybe a solution?

https://elixirforum.com/t/serialize-and-unserialize-structs-tuples-keyword-lists-atoms/40794

- using Hex diff and patch
- convert diff to map to pass through json
- 3 test cases
  - insert row
  - delete row
  - insert and delete row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants