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.
|
|
|
|
|
|
|
|
```ucm:hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
2022-01-17 03:25:50 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
|
|
|
x = 1
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2022-01-17 03:25:50 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Update `x`, and add a new `y` which depends on the update
|
|
|
|
|
|
|
|
```unison
|
|
|
|
x = 10
|
|
|
|
y = x + 1
|
|
|
|
```
|
|
|
|
|
|
|
|
Try to add only the new `y`. This should fail because it requires an update to `x`, but we only ran an 'add'.
|
|
|
|
|
|
|
|
```ucm:error
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add y
|
2022-01-17 03:25:50 +03:00
|
|
|
```
|