Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Fix propagating child modifications throughout the DiffContext #423

Merged
merged 1 commit into from
Nov 6, 2022

Conversation

ghostbuster91
Copy link
Collaborator

Relates to #418

This is a partial fix, because the design of DiffContext and how the modifications are propagated is fundamentally broken.

For example following case won't work:

    case class Address(house: Int, street: String)
    case class Person(name: String, address: Address)

    val add = Diff.summon[Address].ignore(_.house)
    val d = Diff
      .summon[Person]
      .modify(_.address)
      .setTo(add)
      .modify(_.address.street).ignore

The second modification won't work and there is no good way to fix it.

@ghostbuster91 ghostbuster91 merged commit b1986c6 into master Nov 6, 2022
@mergify mergify bot deleted the fix/i418-2 branch November 6, 2022 15:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant