unison
unison copied to clipboard
deleting the last branch in a project makes things awkward
If you have only one branch in a project (let's say project foo and branch main) and you delete it, it's unclear how to continue to use the project.
If you try switch foo then it says that foo/main doesn't exist.
If you try branch foo/main then it will create main from your current namespace, which is likely the root of your codebase (and in my case takes ages to subsequently delete.branch).
.> project.create foo
🎉 I've created the project foo.
I'll now fetch the latest version of the base Unison library...
updateRoot: 531 ms (cpu), 548 ms (system)
🎨 Type `ui` to explore this project's code in your browser.
🔭 Discover libraries at https://share.unison-lang.org
📖 Use `help-topic projects` to learn more about projects.
Write your first Unison code with UCM:
1. Open scratch.u.
2. Write some Unison code and save the file.
3. In UCM, type `add` to save it to your new project.
🎉 🥳 Happy coding!
InputPattern: 619 ms (cpu), 1.78 s (system)
foo/main> branch.delete main
updateRoot: 259 ms (cpu), 270 ms (system)
InputPattern: 265 ms (cpu), 299 ms (system)
.> switch foo
foo/main does not exist.
InputPattern: 1.82 ms (cpu), 4.56 ms (system)
.> branch foo/main
updateRoot: 16.3 ms (cpu), 27.4 ms (system)
Done. I've created the foo/main branch from the namespace ..
InputPattern: 21.0 ms (cpu), 55.8 ms (system)