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

Fixes #78: Implement diffing between values which have a common schema #79

Merged
merged 16 commits into from
Jun 21, 2021

Conversation

thinkharderdev
Copy link
Contributor

This is still a WIP but the design is (mostly) done.

This will implement diffing between values of type A when a Schema[A] is available.


import zio.Chunk

trait DiffAlgorithm[A] { self =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
trait DiffAlgorithm[A] { self =>
trait Differ[A] { self =>

Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really amazing work. Will be useful in so many different ways (e.g. json patching, data ETL, etc.).

@thinkharderdev thinkharderdev marked this pull request as ready for review June 18, 2021 22:35
@thinkharderdev thinkharderdev requested a review from a team as a code owner June 18, 2021 22:35
@thinkharderdev thinkharderdev changed the title Draft: Fixes #78: Implement diffing between values which have a common schema Fixes #78: Implement diffing between values which have a common schema Jun 18, 2021
@thinkharderdev
Copy link
Contributor Author

Might need a few more unit tests but this is good to go I think now.

Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful work. ❤️

@jdegoes jdegoes merged commit e8ef6dc into zio:main Jun 21, 2021
landlockedsurfer pushed a commit to landlockedsurfer/zio-schema that referenced this pull request May 28, 2022
…hema (zio#79)

* Remove setup gpg

* Update setup-java

* Test

* test2

* test 3

* Fixes zio#78: Implement diffing between instances described by a schema

* Specs and additional implementations

* Rename DiffAlgorithm to Differ

* Add diffs for product and sum types

* Copy Myers diff implementation from zio-test

* Implement binary diff and unit tests

* Fix various temporal diffs and add unit tests

* formatting

* Test coverage and tweaks

* Alphabetical sorting and comments on diff method

Co-authored-by: thinkharder <thinkharderdev@users.noreply.github.com>
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.

None yet

2 participants