Add failing transcript

This commit is contained in:
Chris Penner 2024-05-22 11:35:51 -07:00
parent 9fc96edbbf
commit b210679917
2 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<!-- https://github.com/unisonweb/unison/issues/4997 -->
# Delete namespace dependents check
This is a regression test, previously `delete.namespace` allowed a delete as long as the deletions had a name _anywhere_ in your codebase, it should only check the current project branch.
```ucm:hide
.> project.create-empty myproject
myproject/main> builtins.merge
```
```unison
sub.dependency = 123
dependent = dependency + 99
```
```ucm
myproject/main> add
myproject/main> branch /new
myproject/new> delete.namespace sub
myproject/new> view dependent
```

View File

@ -0,0 +1,53 @@
<!-- https://github.com/unisonweb/unison/issues/4997 -->
# Delete namespace dependents check
This is a regression test, previously `delete.namespace` allowed a delete as long as the deletions had a name _anywhere_ in your codebase, it should only check the current project branch.
```unison
sub.dependency = 123
dependent = dependency + 99
```
```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`:
dependent : Nat
sub.dependency : Nat
```
```ucm
myproject/main> add
⍟ I've added these definitions:
dependent : Nat
sub.dependency : Nat
myproject/main> branch /new
Done. I've created the new branch based off of main.
Tip: To merge your work back into the main branch, first
`switch /main` then `merge /new`.
myproject/new> delete.namespace sub
Done.
myproject/new> view dependent
dependent : Nat
dependent =
use Nat +
#mllb0u5378 + 99
```