Skip to content

Instantly share code, notes, and snippets.

@ceedubs
Created November 2, 2021 21:22
Show Gist options
  • Save ceedubs/57403ccff78f89a8ac4ccc9702ab239b to your computer and use it in GitHub Desktop.
Save ceedubs/57403ccff78f89a8ac4ccc9702ab239b to your computer and use it in GitHub Desktop.
Unison transitive update issue

We create one (oops with the wrong value).

one = "two"
.>add

We realize our mistake, so we fix the definition of one.

one = "one"
.>update

We create two (oops with the wrong value).

two = "three"
.>update
.>view one two

We realize our mistake, so we fix the definition of two.

two = "two"

After an update, one and two are both equal to the string literal "one".

.>update
.>view one
.>view two

If we look at the patch we see the "two" -> "one" update followed by the "three" -> "two" update.

.>view.patch patch

But based on the terms one and two are both ending up as "one", then the two term must be getting the "three" -> "two" update followed by the "two" -> "one" update, even though though the latter happened later in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment