Skip to content

Commit 4c1aa36

Browse files
committed
Add transcript to assert rejection from pushing ambiguous component
ordering changes.
1 parent 0d99db0 commit 4c1aa36

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
``` ucm :hide
2+
scratch/main> project.create-empty ambiguous
3+
4+
ambiguous/main> builtins.merge
5+
```
6+
7+
Create a flawed component which should be rejected with an ambiguous element ordering error.
8+
9+
``` unison
10+
ping = do
11+
pong()
12+
13+
pong = do
14+
ping()
15+
```
16+
17+
``` ucm :added-by-ucm
18+
Loading changes detected in scratch.u.
19+
20+
+ ping : 'r
21+
+ pong : 'r
22+
23+
Run `update` to apply these changes to your codebase.
24+
```
25+
26+
``` ucm :hide
27+
ambiguous/main> update
28+
```
29+
30+
Try to push, this should be rejected.
31+
32+
``` ucm
33+
ambiguous/main> push @transcripts/ambiguous/main
34+
```
35+
36+
🛑
37+
38+
The transcript failed due to an error in the stanza above. The error is:
39+
40+
```
41+
❗️
42+
43+
Failed to decode a term component entity with the hash
44+
#6nhsou2jbd9o95ftlp83v1dhqo7cmk0jb4tgkecmurku9en8qqnr205arlacgj3tumu6sfudhi100lqcvu2sbf4t412nngvbeuboeig
45+
.
46+
Please create an issue and report this to the Unison team
47+
48+
The error was: Incomplete element ordering in term components
49+
```

transcripts/transcript_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222

2323
# UCM to use within transcripts
2424
transcript_ucm() {
25-
XDG_DATA_HOME="${ucm_xdg_data_dir}" UNISON_SHARE_HOST="http://localhost:5424" "${UCM_PATH}" "$@"
25+
UNISON_PAGER=cat XDG_DATA_HOME="${ucm_xdg_data_dir}" UNISON_SHARE_HOST="http://localhost:5424" "${UCM_PATH}" "$@"
2626
}
2727

2828
cookie_jar_dir=$(mktemp -d)

0 commit comments

Comments
 (0)