2020-02-13 18:59:53 +03:00
|
|
|
```ucm:hide
|
2020-04-09 02:34:43 +03:00
|
|
|
.> builtins.mergeio
|
2020-02-13 18:59:53 +03:00
|
|
|
```
|
2020-01-08 20:51:49 +03:00
|
|
|
|
2020-01-17 00:39:41 +03:00
|
|
|
```unison:hide
|
|
|
|
x = 23
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
|
|
|
.b1> add
|
|
|
|
.b1> alias.term x fslkdjflskdjflksjdf
|
|
|
|
.> fork b1 b2
|
|
|
|
.b2> alias.term x abc
|
|
|
|
```
|
|
|
|
```unison:hide
|
|
|
|
fslkdjflskdjflksjdf = 663
|
|
|
|
```
|
|
|
|
```ucm
|
|
|
|
.b0> add
|
|
|
|
.> merge b0 b1
|
|
|
|
.> diff.namespace b1 b2
|
|
|
|
```
|
2020-01-08 20:51:49 +03:00
|
|
|
Things we want to test:
|
|
|
|
|
|
|
|
* Diffing identical namespaces
|
|
|
|
* Adds, removes, updates (with and without metadata updates)
|
|
|
|
* Adds with multiple names
|
|
|
|
* Adds with multiple names and different metadata on each
|
|
|
|
* Moved and copied definitions
|
|
|
|
* Moves that have more that 1 initial or final name
|
|
|
|
* ... terms and types
|
|
|
|
* New patches, modified patches, deleted patches, moved patches
|
|
|
|
* With and without propagated updates
|
|
|
|
|
2020-01-11 00:32:41 +03:00
|
|
|
```unison:hide
|
2020-01-09 19:47:31 +03:00
|
|
|
fromJust = 1
|
2020-01-08 20:51:49 +03:00
|
|
|
b = 2
|
2020-01-09 19:47:31 +03:00
|
|
|
bdependent = b
|
2020-01-08 20:51:49 +03:00
|
|
|
c = 3
|
2021-04-26 03:30:25 +03:00
|
|
|
helloWorld = "Hello, world!"
|
2020-01-08 20:51:49 +03:00
|
|
|
|
|
|
|
type A a = A Nat
|
|
|
|
ability X a1 a2 where x : Nat
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
|
|
|
.ns1> add
|
2020-01-09 19:47:31 +03:00
|
|
|
.ns1> alias.term fromJust fromJust'
|
2020-01-10 18:25:07 +03:00
|
|
|
.ns1> alias.term helloWorld helloWorld2
|
2020-02-07 23:17:43 +03:00
|
|
|
.ns1> link b fromJust
|
2020-01-08 20:51:49 +03:00
|
|
|
.ns1> fork .ns1 .ns2
|
|
|
|
.ns1> cd .
|
2020-01-16 20:26:33 +03:00
|
|
|
```
|
|
|
|
Here's what we've done so far:
|
|
|
|
```ucm
|
|
|
|
.> diff.namespace nothing ns1
|
2020-01-08 20:51:49 +03:00
|
|
|
.> diff.namespace ns1 ns2
|
|
|
|
```
|
|
|
|
|
2020-01-11 00:32:41 +03:00
|
|
|
```unison:hide
|
2020-01-09 19:47:31 +03:00
|
|
|
fromJust = "asldkfjasldkfj"
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
|
|
|
.ns1b> add
|
|
|
|
.> merge ns1b ns1
|
|
|
|
```
|
|
|
|
|
2020-01-11 00:32:41 +03:00
|
|
|
```unison:hide
|
2020-01-09 19:47:31 +03:00
|
|
|
fromJust = 99
|
|
|
|
b = "oog"
|
2020-01-08 20:51:49 +03:00
|
|
|
d = 4
|
|
|
|
e = 5
|
2020-01-09 00:32:18 +03:00
|
|
|
f = 6
|
|
|
|
unique type Y a b = Y a b
|
2020-01-08 20:51:49 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2020-01-09 00:32:18 +03:00
|
|
|
.ns2> update
|
2020-01-16 01:51:17 +03:00
|
|
|
.ns2> links fromJust
|
2020-01-08 20:51:49 +03:00
|
|
|
.> diff.namespace ns1 ns2
|
|
|
|
.> alias.term ns2.d ns2.d'
|
|
|
|
.> alias.type ns2.A ns2.A'
|
|
|
|
.> alias.type ns2.X ns2.X'
|
|
|
|
.> diff.namespace ns1 ns2
|
2020-02-07 23:17:43 +03:00
|
|
|
.> link ns1.c ns2.f
|
2020-01-16 20:26:33 +03:00
|
|
|
.> link ns2.c ns2.c
|
2020-01-09 19:47:31 +03:00
|
|
|
.> diff.namespace ns1 ns2
|
2020-02-13 18:59:53 +03:00
|
|
|
.> unlink ns2.b ns2.fromJust
|
2020-01-09 00:32:18 +03:00
|
|
|
.> diff.namespace ns1 ns2
|
2020-01-09 19:47:31 +03:00
|
|
|
.> alias.type ns1.X ns1.X2
|
|
|
|
.> alias.type ns2.A' ns2.A''
|
2020-01-15 01:13:52 +03:00
|
|
|
.> view.patch ns2.patch
|
|
|
|
.> fork ns2 ns3
|
|
|
|
.> alias.term ns2.fromJust' ns2.yoohoo
|
2020-01-10 18:25:07 +03:00
|
|
|
.> delete.term ns2.fromJust'
|
2020-01-15 01:13:52 +03:00
|
|
|
.> diff.namespace ns3 ns2
|
2020-01-08 20:51:49 +03:00
|
|
|
```
|
2020-01-17 00:39:41 +03:00
|
|
|
```unison:hide
|
2020-01-16 23:50:50 +03:00
|
|
|
bdependent = "banana"
|
|
|
|
```
|
|
|
|
```ucm
|
|
|
|
.ns3> update
|
|
|
|
.> diff.namespace ns2 ns3
|
|
|
|
```
|
2020-01-17 00:39:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
## Two different auto-propagated changes creating a name conflict
|
|
|
|
Currently, the auto-propagated name-conflicted definitions are not explicitly
|
|
|
|
shown, only their also-conflicted dependency is shown.
|
|
|
|
```unison:hide
|
|
|
|
a = 333
|
|
|
|
b = a + 1
|
|
|
|
```
|
|
|
|
```ucm
|
|
|
|
.nsx> add
|
|
|
|
.> fork nsx nsy
|
|
|
|
.> fork nsx nsz
|
|
|
|
```
|
|
|
|
```unison:hide
|
|
|
|
a = 444
|
|
|
|
```
|
|
|
|
```ucm
|
|
|
|
.nsy> update
|
|
|
|
```
|
|
|
|
```unison:hide
|
|
|
|
a = 555
|
|
|
|
```
|
|
|
|
```ucm
|
|
|
|
.nsz> update
|
|
|
|
.> merge nsy nsw
|
2020-02-06 08:04:34 +03:00
|
|
|
```
|
|
|
|
```ucm:error
|
2020-01-17 00:39:41 +03:00
|
|
|
.> merge nsz nsw
|
2020-02-06 08:04:34 +03:00
|
|
|
```
|
|
|
|
```ucm
|
2020-01-17 00:39:41 +03:00
|
|
|
.> diff.namespace nsx nsw
|
|
|
|
.nsw> view a b
|
|
|
|
```
|
|
|
|
```unison
|
|
|
|
a = 777
|
|
|
|
```
|
|
|
|
|
2020-02-06 08:04:34 +03:00
|
|
|
```ucm:error
|
2020-01-17 00:39:41 +03:00
|
|
|
.nsw> update
|
2020-02-06 08:04:34 +03:00
|
|
|
.nsw> view a b
|
2020-01-17 00:39:41 +03:00
|
|
|
```
|
|
|
|
|
2020-01-16 20:26:33 +03:00
|
|
|
##
|
|
|
|
|
|
|
|
Updates: -- 1 to 1
|
|
|
|
|
|
|
|
New name conflicts: -- updates where RHS has multiple hashes (excluding when RHS=LHS)
|
|
|
|
|
|
|
|
1. foo#jk19sm5bf8 : Nat - do we want to force a hashqualified? Arya thinks so
|
|
|
|
↓
|
|
|
|
2. ┌ foo#0ja1qfpej6 : Nat
|
2020-02-13 18:59:53 +03:00
|
|
|
3. └ foo#jk19sm5bf8 : Nat
|
2020-01-16 20:26:33 +03:00
|
|
|
|
|
|
|
Resolved name conflicts: -- updates where LHS had multiple hashes and RHS has one
|
|
|
|
|
|
|
|
4. ┌ bar#0ja1qfpej6 : Nat
|
2020-02-13 18:59:53 +03:00
|
|
|
5. └ bar#jk19sm5bf8 : Nat
|
2020-01-16 20:26:33 +03:00
|
|
|
↓
|
2020-02-13 18:59:53 +03:00
|
|
|
6. bar#jk19sm5bf8 : Nat
|
2020-01-08 20:51:49 +03:00
|
|
|
|
|
|
|
## Display issues to fixup
|
2020-01-15 21:25:36 +03:00
|
|
|
|
2020-01-17 00:39:41 +03:00
|
|
|
- [d] Do we want to surface new edit conflicts in patches?
|
|
|
|
- [t] two different auto-propagated changes creating a name conflict should show
|
2020-01-15 01:13:52 +03:00
|
|
|
up somewhere besides the auto-propagate count
|
2020-01-17 00:39:41 +03:00
|
|
|
- [t] Things look screwy when the type signature doesn't fit and has to get broken
|
2020-01-11 01:05:56 +03:00
|
|
|
up into multiple lines. Maybe just disallow that?
|
2020-01-17 00:39:41 +03:00
|
|
|
- [d] Delete blank line in between copies / renames entries if all entries are 1 to 1
|
2020-01-11 01:05:56 +03:00
|
|
|
see todo in the code
|
2020-01-17 00:39:41 +03:00
|
|
|
- [x] incorrectly calculated bracket alignment on hashqualified "Name changes" (delete.output.md)
|
|
|
|
- [x] just handle deletion of isPropagated in propagate function, leave HandleInput alone (assuming this does the trick)
|
2020-01-16 23:50:50 +03:00
|
|
|
- [x] might want unqualified names to be qualified sometimes:
|
|
|
|
- [x] if a name is updated to a not-yet-named reference, it's shown as both an update and an add
|
|
|
|
- [x] similarly, if a conflicted name is resolved by deleting the last name to
|
|
|
|
a reference, I (arya) suspect it will show up as a Remove
|
2020-01-17 00:39:41 +03:00
|
|
|
- [d] Maybe group and/or add headings to the types, constructors, terms
|
2020-01-16 23:50:50 +03:00
|
|
|
- [x] check whether creating a name conflict + adding metadata puts the update
|
|
|
|
in both categories; if it does, then filter out metadataUpdates from the
|
|
|
|
other categories
|
2020-01-16 01:51:17 +03:00
|
|
|
- [x] add tagging of propagated updates to test propagated updates output
|
2020-01-15 21:25:36 +03:00
|
|
|
- [x] missing old names in deletion ppe (delete.output.md) (superseded by \#1143)
|
|
|
|
- [x] delete.term has some bonkers output
|
2020-01-11 01:35:33 +03:00
|
|
|
- [x] Make a decision about how we want to show constructors in the diff
|
2020-01-11 01:05:56 +03:00
|
|
|
- [x] When you delete a name with metadata, it also shows up in updates section
|
|
|
|
with the deleted metadata.
|
2020-01-09 00:32:18 +03:00
|
|
|
- [x] An add with new metadata is getting characterized as an update
|
2020-01-10 18:25:07 +03:00
|
|
|
- [x] can there be a metadata-only update where it's not a singleton old and new reference
|
2020-01-09 19:47:31 +03:00
|
|
|
- [x] 12.patch patch needs a space
|
|
|
|
- [x] This looks like garbage
|
2020-01-08 20:51:49 +03:00
|
|
|
- [x] Extra 2 blank lines at the end of the add section
|
2020-01-09 19:47:31 +03:00
|
|
|
- [x] Fix alignment issues with buildTable, convert to column3M (to be written)
|
2020-01-10 18:25:07 +03:00
|
|
|
- [x] adding an alias is showing up as an Add and a Copy; should just show as Copy
|
2020-01-11 01:05:56 +03:00
|
|
|
- [x] removing one of multiple aliases appears in removes + moves + copies section
|
|
|
|
- [x] some overlapping cases between Moves and Copies^
|
|
|
|
- [x] Maybe don't list the type signature twice for aliases?
|