-
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 #5324 from unisonweb/fix-5323
bugfix: fix suffixification logic in upgrade
- Loading branch information
Showing
6 changed files
with
104 additions
and
35 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
3 changes: 3 additions & 0 deletions
3
unison-src/transcripts/fix-5276.md → unison-src/transcripts/fix-5312.md
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
3 changes: 3 additions & 0 deletions
3
unison-src/transcripts/fix-5276.output.md → unison-src/transcripts/fix-5312.output.md
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 @@ | ||
This transcript demonstrates that dependents of an upgrade are suffixified properly. Previously, `c = b.y + 1` would | ||
render as `c = y + 1` (ambiguous). | ||
|
||
```ucm | ||
scratch/main> builtins.merge lib.builtin | ||
``` | ||
|
||
```unison | ||
lib.old.x = 17 | ||
lib.new.x = 100 | ||
a.y = 18 | ||
b.y = lib.old.x + 1 | ||
c = b.y + 1 | ||
``` | ||
|
||
```ucm | ||
scratch/main> add | ||
``` | ||
|
||
```ucm | ||
scratch/main> upgrade old new | ||
``` |
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,54 @@ | ||
This transcript demonstrates that dependents of an upgrade are suffixified properly. Previously, `c = b.y + 1` would | ||
render as `c = y + 1` (ambiguous). | ||
|
||
``` ucm | ||
scratch/main> builtins.merge lib.builtin | ||
Done. | ||
``` | ||
``` unison | ||
lib.old.x = 17 | ||
lib.new.x = 100 | ||
a.y = 18 | ||
b.y = lib.old.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 | ||
lib.new.x : Nat | ||
lib.old.x : Nat | ||
``` | ||
``` ucm | ||
scratch/main> add | ||
⍟ I've added these definitions: | ||
a.y : Nat | ||
b.y : Nat | ||
c : Nat | ||
lib.new.x : Nat | ||
lib.old.x : Nat | ||
``` | ||
``` ucm | ||
scratch/main> upgrade old new | ||
I upgraded old to new, and removed old. | ||
``` |