2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2023-11-13 23:23:57 +03:00
|
|
|
lib.old.foo = 17
|
|
|
|
lib.new.foo = 18
|
|
|
|
thingy = lib.old.foo + 10
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2023-11-13 23:23:57 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2023-11-13 23:23:57 +03:00
|
|
|
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.new.foo : Nat
|
|
|
|
lib.old.foo : Nat
|
|
|
|
thingy : Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2023-11-13 23:23:57 +03:00
|
|
|
proj/main> add
|
|
|
|
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
|
|
|
lib.new.foo : Nat
|
|
|
|
lib.old.foo : Nat
|
|
|
|
thingy : Nat
|
|
|
|
|
2024-02-08 00:37:32 +03:00
|
|
|
```
|
|
|
|
Test tab completion and fzf options of upgrade command.
|
2024-05-20 19:09:00 +03:00
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-02-08 00:37:32 +03:00
|
|
|
proj/main> debug.tab-complete upgrade ol
|
|
|
|
|
|
|
|
old
|
|
|
|
|
|
|
|
proj/main> debug.fuzzy-options upgrade _
|
|
|
|
|
|
|
|
Select a dependency to upgrade:
|
|
|
|
* builtin
|
|
|
|
* new
|
|
|
|
* old
|
|
|
|
|
|
|
|
proj/main> debug.fuzzy-options upgrade old _
|
|
|
|
|
|
|
|
Select a dependency to upgrade to:
|
|
|
|
* builtin
|
|
|
|
* new
|
|
|
|
* old
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2023-11-13 23:23:57 +03:00
|
|
|
proj/main> upgrade old new
|
|
|
|
|
|
|
|
I upgraded old to new, and removed old.
|
|
|
|
|
|
|
|
proj/main> ls lib
|
|
|
|
|
2024-05-10 20:33:01 +03:00
|
|
|
1. builtin/ (469 terms, 74 types)
|
2023-11-13 23:23:57 +03:00
|
|
|
2. new/ (1 term)
|
|
|
|
|
|
|
|
proj/main> view thingy
|
|
|
|
|
|
|
|
thingy : Nat
|
|
|
|
thingy =
|
|
|
|
use Nat +
|
|
|
|
foo + 10
|
|
|
|
|
|
|
|
```
|