-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c11caa
commit 78cbe72
Showing
4 changed files
with
100 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Previously `delete.namespace` would refuse to delete a namespace if it would leave any nameless references in `lib`. | ||
|
||
```ucm:hide | ||
scratch/main> builtins.merge lib.builtin | ||
``` | ||
|
||
```unison | ||
lib.one.foo = 17 | ||
lib.two.bar = foo Nat.+ foo | ||
``` | ||
|
||
```ucm | ||
scratch/main> add | ||
``` | ||
|
||
```ucm:error | ||
scratch/main> delete.namespace lib.one | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
``` unison | ||
lib.one.foo = 17 | ||
lib.two.bar = foo Nat.+ foo | ||
``` | ||
|
||
``` 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`: | ||
lib.one.foo : Nat | ||
lib.two.bar : Nat | ||
``` | ||
``` ucm | ||
scratch/main> add | ||
⍟ I've added these definitions: | ||
lib.one.foo : Nat | ||
lib.two.bar : Nat | ||
scratch/main> delete.namespace lib.one | ||
⚠️ | ||
I didn't delete the namespace because the following | ||
definitions are still in use. | ||
Dependency Referenced In | ||
foo 1. lib.two.bar | ||
If you want to proceed anyways and leave those definitions | ||
without names, use delete.namespace.force | ||
``` | ||
|
||
|
||
|
||
🛑 | ||
|
||
The transcript failed due to an error in the stanza above. The error is: | ||
|
||
|
||
⚠️ | ||
|
||
I didn't delete the namespace because the following | ||
definitions are still in use. | ||
|
||
Dependency Referenced In | ||
foo 1. lib.two.bar | ||
|
||
If you want to proceed anyways and leave those definitions | ||
without names, use delete.namespace.force | ||
|