three delete examples

This commit is contained in:
Travis Staton 2024-03-19 10:51:45 -04:00
parent 2e2fc04bdd
commit bbbac576f8
No known key found for this signature in database
GPG Key ID: 431DD911A00DAE49
2 changed files with 309 additions and 0 deletions

View File

@ -151,6 +151,108 @@ proj/main> view foo
.> project.delete proj
```
## Alice deletes x bob adds y
```ucm:hide
.> project.create-empty proj
proj/main> builtins.mergeio
```
```unison
foo : Nat
foo = 1
```
```ucm
proj/main> add
proj/main> branch topic
proj/main> delete.term foo
proj/topic>
```
```unison
bar : ()
bar = ()
```
```ucm
proj/topic> add
```
```ucm
proj/main> merge2 /topic
proj/main> ls
```
```ucm:hide
.> project.delete proj
```
## Alice adds x bob deletes y
```ucm:hide
.> project.create-empty proj
proj/main> builtins.mergeio
```
```unison
foo : Nat
foo = 1
```
```ucm
proj/main> add
proj/main> branch topic
proj/topic> delete.term foo
proj/main>
```
```unison
bar : ()
bar = ()
```
```ucm
proj/main> add
```
```ucm
proj/main> merge2 /topic
proj/main> ls
```
```ucm:hide
.> project.delete proj
```
## Alice deletes x bob deletes x
```ucm:hide
.> project.create-empty proj
proj/main> builtins.mergeio
```
```unison
foo : Nat
foo = 1
```
```ucm
proj/main> add
proj/main> branch topic
proj/topic> delete.term foo
proj/main> delete.term foo
```
```ucm
proj/main> merge2 /topic
proj/main> ls
```
```ucm:hide
.> project.delete proj
```
## Altered dependent
```ucm:hide

View File

@ -328,6 +328,213 @@ proj/main> view foo
foo : Nat
foo = 2
```
## Alice deletes x bob adds y
```unison
foo : Nat
foo = 1
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
foo : Nat
```
```ucm
proj/main> add
⍟ I've added these definitions:
foo : Nat
proj/main> branch topic
Done. I've created the topic branch based off of main.
Tip: Use `merge /topic /main` to merge your work back into the
main branch.
proj/main> delete.term foo
Done.
```
```unison
bar : ()
bar = ()
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
bar : ()
```
```ucm
proj/topic> add
⍟ I've added these definitions:
bar : ()
```
```ucm
proj/main> merge2 /topic
I merged topic into main.
proj/main> ls
1. bar (())
2. builtin/ (627 terms, 89 types)
```
## Alice adds x bob deletes y
```unison
foo : Nat
foo = 1
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
foo : Nat
```
```ucm
proj/main> add
⍟ I've added these definitions:
foo : Nat
proj/main> branch topic
Done. I've created the topic branch based off of main.
Tip: Use `merge /topic /main` to merge your work back into the
main branch.
proj/topic> delete.term foo
Done.
```
```unison
bar : ()
bar = ()
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
bar : ()
```
```ucm
proj/main> add
⍟ I've added these definitions:
bar : ()
```
```ucm
proj/main> merge2 /topic
I merged topic into main.
proj/main> ls
1. bar (())
2. builtin/ (627 terms, 89 types)
```
## Alice deletes x bob deletes x
```unison
foo : Nat
foo = 1
```
```ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
foo : Nat
```
```ucm
proj/main> add
⍟ I've added these definitions:
foo : Nat
proj/main> branch topic
Done. I've created the topic branch based off of main.
Tip: Use `merge /topic /main` to merge your work back into the
main branch.
proj/topic> delete.term foo
Done.
proj/main> delete.term foo
Done.
```
```ucm
proj/main> merge2 /topic
😶
proj/main was already up-to-date with proj/topic.
proj/main> ls
1. builtin/ (627 terms, 89 types)
```
## Altered dependent