-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5311 from unisonweb/24-08-30-fix-update
bugfix: fix suffixification logic in update
- Loading branch information
Showing
3 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
```ucm | ||
scratch/main> builtins.merge lib.builtin | ||
``` | ||
|
||
```unison | ||
x = 17 | ||
a.y = 18 | ||
b.y = x + 1 | ||
c = b.y + 1 | ||
``` | ||
|
||
```ucm | ||
scratch/main> add | ||
``` | ||
|
||
```unison | ||
x = 100 | ||
``` | ||
|
||
```ucm | ||
scratch/main> update | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
``` ucm | ||
scratch/main> builtins.merge lib.builtin | ||
Done. | ||
``` | ||
``` unison | ||
x = 17 | ||
a.y = 18 | ||
b.y = x + 1 | ||
c = b.y + 1 | ||
``` | ||
|
||
``` ucm | ||
Loading changes detected in scratch.u. | ||
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`: | ||
a.y : Nat | ||
b.y : Nat | ||
c : Nat | ||
x : Nat | ||
``` | ||
``` ucm | ||
scratch/main> add | ||
⍟ I've added these definitions: | ||
a.y : Nat | ||
b.y : Nat | ||
c : Nat | ||
x : Nat | ||
``` | ||
``` unison | ||
x = 100 | ||
``` | ||
|
||
``` ucm | ||
Loading changes detected in scratch.u. | ||
I found and typechecked these definitions in scratch.u. If you | ||
do an `add` or `update`, here's how your codebase would | ||
change: | ||
⍟ These names already exist. You can `update` them to your | ||
new definition: | ||
x : Nat | ||
``` | ||
``` ucm | ||
scratch/main> update | ||
Okay, I'm searching the branch for code that needs to be | ||
updated... | ||
That's done. Now I'm making sure everything typechecks... | ||
Everything typechecks, so I'm saving the results... | ||
Done. | ||
``` |