Port sum-type-update-conflicts to projects

This commit is contained in:
Chris Penner 2024-06-26 11:53:59 -07:00
parent 2e1a95443a
commit c419cd088d
2 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@
https://github.com/unisonweb/unison/issues/2786 https://github.com/unisonweb/unison/issues/2786
```ucm:hide ```ucm:hide
scratch/main ns> builtins.merge scratch/main> builtins.merge lib.builtins
``` ```
First we add a sum-type to the codebase. First we add a sum-type to the codebase.
@ -13,7 +13,7 @@ structural type X = x
``` ```
```ucm ```ucm
scratch/main ns> add scratch/main> add
``` ```
Now we update the type, changing the name of the constructors, _but_, we simultaneously Now we update the type, changing the name of the constructors, _but_, we simultaneously
@ -32,5 +32,5 @@ This update should succeed since the conflicted constructor
is removed in the same update that the new term is being added. is removed in the same update that the new term is being added.
```ucm ```ucm
scratch/main ns> update.old scratch/main> update.old
``` ```

View File

@ -19,16 +19,16 @@ structural type X = x
⍟ These new definitions are ok to `add`: ⍟ These new definitions are ok to `add`:
structural type X structural type X
(also named builtin.Unit) (also named lib.builtins.Unit)
``` ```
```ucm ```ucm
.ns> add scratch/main> add
⍟ I've added these definitions: ⍟ I've added these definitions:
structural type X structural type X
(also named builtin.Unit) (also named lib.builtins.Unit)
``` ```
Now we update the type, changing the name of the constructors, _but_, we simultaneously Now we update the type, changing the name of the constructors, _but_, we simultaneously
@ -60,14 +60,14 @@ dependsOnX = Text.size X.x
new definition: new definition:
structural type X structural type X
(The old definition is also named builtin.Unit.) (The old definition is also named lib.builtins.Unit.)
``` ```
This update should succeed since the conflicted constructor This update should succeed since the conflicted constructor
is removed in the same update that the new term is being added. is removed in the same update that the new term is being added.
```ucm ```ucm
.ns> update.old scratch/main> update.old
⍟ I've added these definitions: ⍟ I've added these definitions:
@ -77,6 +77,6 @@ is removed in the same update that the new term is being added.
⍟ I've updated these names to your new definition: ⍟ I've updated these names to your new definition:
structural type X structural type X
(The old definition was also named builtin.Unit.) (The old definition was also named lib.builtins.Unit.)
``` ```