2022-01-17 03:25:50 +03:00
|
|
|
# Block on required update
|
|
|
|
|
|
|
|
Should block an `add` if it requires an update on an in-file dependency.
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2022-01-17 03:25:50 +03:00
|
|
|
x = 1
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2022-01-17 03:25:50 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2022-01-17 03:25:50 +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`:
|
|
|
|
|
|
|
|
x : Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2022-01-17 03:25:50 +03:00
|
|
|
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
|
|
|
x : Nat
|
|
|
|
|
|
|
|
```
|
|
|
|
Update `x`, and add a new `y` which depends on the update
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2022-01-17 03:25:50 +03:00
|
|
|
x = 10
|
|
|
|
y = x + 1
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2022-01-17 03:25:50 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2022-01-17 03:25:50 +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`:
|
|
|
|
|
|
|
|
y : Nat
|
|
|
|
|
|
|
|
⍟ These names already exist. You can `update` them to your
|
|
|
|
new definition:
|
|
|
|
|
|
|
|
x : Nat
|
|
|
|
|
|
|
|
```
|
|
|
|
Try to add only the new `y`. This should fail because it requires an update to `x`, but we only ran an 'add'.
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add y
|
2022-01-17 03:25:50 +03:00
|
|
|
|
|
|
|
x These definitions failed:
|
|
|
|
|
|
|
|
Reason
|
|
|
|
needs update x : Nat
|
|
|
|
blocked y : Nat
|
|
|
|
|
|
|
|
Tip: Use `help filestatus` to learn more.
|
|
|
|
|
|
|
|
```
|