If the destination for move.namespace is outside of the current namespace, then it is effectively a delete.namespace from the perspective of the current namespace/project. However, it doesn't do the dependency checks that delete.namespace performs.
# Transcript output
❓
An error occurred while running the following file: move-namespace.md
```ucm
.> cd myproject
☝️ The namespace .myproject is empty.
.myproject> builtins.merge
Done.
```unison
foo.bar = "foo.bar"
dependsOnBar = "dependsOn: " ++ foo.bar
```
```ucm
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`:
dependsOnBar : Text
foo.bar : Text
```
```ucm
.myproject> add
⍟ I've added these definitions:
dependsOnBar : Text
foo.bar : Text
.myproject> move.namespace foo .void
Done.
.myproject> edit dependsOnBar
☝️
I added these definitions to the top of
/Users/cody/code/unison/scratch.u
dependsOnBar : Text
dependsOnBar =
use Text ++
"dependsOn: " ++ bar
You can edit them there, then do `update` to replace the
definitions currently in this namespace.
.myproject> load scratch.u
I couldn't find any definitions matching the name bar inside the namespace .myproject
4 | "dependsOn: " ++ bar
Some common causes of this error include:
* Your current namespace is too deep to contain the
definition in its subtree
* The definition is part of a library which hasn't been
added to this project
To add a library to this project use the command: `fork <.path.to.lib> .myproject.lib.<libname>`
Whatever it is, its type should conform to Text.
```
🛑
The transcript failed due to an error in the stanza above. The error is:
I couldn't find any definitions matching the name bar inside the namespace .myproject
4 | "dependsOn: " ++ bar
Some common causes of this error include:
* Your current namespace is too deep to contain the
definition in its subtree
* The definition is part of a library which hasn't been
added to this project
To add a library to this project use the command: `fork <.path.to.lib> .myproject.lib.<libname>`
Whatever it is, its type should conform to Text.
If the destination for
move.namespace
is outside of the current namespace, then it is effectively adelete.namespace
from the perspective of the current namespace/project. However, it doesn't do the dependency checks thatdelete.namespace
performs.Transcript