this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs/tutorial: revert to using cue eval -i

cuelang.org/issue/1786 (and linked issues) identified that cue eval -i
was not working as advertised.

In cuelang.org/cl/542692 we identified that the tour itself had been
silently skipped since https://cue-review.googlesource.com/c/cue/+/6081
because of a bug.

Fixing that bug helped to confirm the reports in cuelang.org/issue/1786
and led to a fix in cuelang.org/cl/546243.

In cuelang.org/cl/542692 we patched the broken tutorial scripts to
workaround the bug that was then later fixed in cuelang.org/cl/546243.
As part of that patch we added a comment that indicated the workaround
should be reverted once the fix for cuelang.org/issue/1786 had landed.

The fix for cuelang.org/issue/1786 landed in cuelang.org/cl/546243, but
we have not to date reverted the workarounds in the tour files.

Now that we have released v0.5.0 this has become very apparent because
there is a non-trivial delta in the generated tour files for
cuelang.org.

Fix this by reverting the workarounds at tip in this CL, backport the
resulting commit to the release-branch.v0.5 (in a later CL), and then
have cuelang.org temporarily depend on the latest v0.5.x release (detail
will be explained in a CL in that repo).

Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I9e5ed7514e5ae33f11b7f579910d5d60e3de1309
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/552601
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+79 -85
+1 -2
doc/tutorial/basics/0_intro/50_order.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - exec cue eval order.cue 1 + exec cue eval -i order.cue 3 2 cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml --
+8 -12
doc/tutorial/basics/2_types/20_bottom.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval bottom.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -i bottom.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Bottom / Error" ··· 28 27 list: [0, 1, 2] 29 28 val: list[3] 30 29 31 - -- expect-stderr -- 32 - a: conflicting values 5 and 4: 33 - ./bottom.cue:1:4 34 - ./bottom.cue:2:4 35 - l.1: conflicting values 3 and 2: 36 - ./bottom.cue:4:9 37 - ./bottom.cue:5:9 38 - val: index out of range [3] with length 3: 39 - ./bottom.cue:8:11 30 + -- expect-stdout-cue -- 31 + a: _|_ // a: conflicting values 5 and 4 32 + l: [1, _|_, // l.1: conflicting values 3 and 2 33 + ] 34 + list: [0, 1, 2] 35 + val: _|_ // val: index out of range [3] with length 3
+8 -7
doc/tutorial/basics/2_types/30_numbers.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval numbers.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -i numbers.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Numbers" ··· 38 37 0x1000_0000, // 268_435_456 39 38 ] 40 39 41 - -- expect-stderr -- 42 - c: conflicting values int and 4.0 (mismatched types int and float): 43 - ./numbers.cue:7:4 44 - ./numbers.cue:8:4 40 + -- expect-stdout-cue -- 41 + a: 4 42 + b: 4.0 43 + c: _|_ // c: conflicting values int and 4.0 (mismatched types int and float) 44 + d: 4 45 + e: [1_234, 5M, 1.5Gi, 0x1000_0000]
+10 -8
doc/tutorial/basics/2_types/50_closed.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval structs.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -i structs.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Closed structs" ··· 27 26 feild: 3 28 27 } 29 28 30 - -- expect-stderr -- 31 - b.feild: field not allowed: 32 - ./structs.cue:1:10 33 - ./structs.cue:5:4 34 - ./structs.cue:6:5 29 + -- expect-stdout-cue -- 30 + a: { 31 + field: int 32 + } 33 + b: { 34 + field: int 35 + feild: _|_ // b.feild: field not allowed 36 + }
+11 -8
doc/tutorial/basics/2_types/55_defs.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval -c defs.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -ic defs.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Definitions" ··· 27 26 a: #A & { field: 3 } 28 27 err: #A & { feild: 3 } 29 28 30 - -- expect-stderr -- 31 - err.feild: field not allowed: 32 - ./defs.cue:5:5 33 - ./defs.cue:10:6 34 - ./defs.cue:10:13 29 + -- expect-stdout-cue -- 30 + msg: "Hello world!" 31 + a: { 32 + field: 3 33 + } 34 + err: { 35 + field: int 36 + feild: _|_ // err.feild: field not allowed 37 + }
+9 -10
doc/tutorial/basics/2_types/70_bounds.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval -c bounds.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -ic bounds.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Bounds" ··· 29 28 30 29 r1: #rn & >=5 & <10 31 30 32 - -- expect-stderr -- 33 - b: conflicting values int and 3.5 (mismatched types int and float): 34 - ./bounds.cue:2:17 35 - ./bounds.cue:7:10 36 - e: invalid value "mu" (out of bound <"mo"): 37 - ./bounds.cue:4:14 38 - ./bounds.cue:10:10 31 + -- expect-stdout-cue -- 32 + a: 3.5 33 + b: _|_ // b: conflicting values int and 3.5 (mismatched types int and float) 34 + c: 3 35 + d: "ma" 36 + e: _|_ // e: invalid value "mu" (out of bound <"mo") 37 + r1: >=5 & <8
+6 -6
doc/tutorial/basics/2_types/75_bounddef.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval -c bound.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -ic bound.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Predefined Bounds" ··· 38 37 b: #byte & 128 39 38 c: #word & 2_000_000_000 40 39 41 - -- expect-stderr -- 42 - a: invalid value -1 (out of bound >=0): 43 - ./bound.cue:5:16 40 + -- expect-stdout-cue -- 41 + a: _|_ // a: invalid value -1 (out of bound >=0) 42 + b: 128 43 + c: 2000000000
+7 -17
doc/tutorial/basics/2_types/80_lists.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval lists.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -i lists.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Lists" ··· 39 38 yourIP: PrivateIP 40 39 yourIP: [11, 1, 2, 3] 41 40 42 - -- expect-stderr -- 43 - yourIP: 3 errors in empty disjunction: 44 - yourIP.0: conflicting values 10 and 11: 45 - ./lists.cue:6:13 46 - ./lists.cue:13:9 47 - ./lists.cue:14:10 48 - yourIP.0: conflicting values 172 and 11: 49 - ./lists.cue:8:6 50 - ./lists.cue:13:9 51 - ./lists.cue:14:10 52 - yourIP.0: conflicting values 192 and 11: 53 - ./lists.cue:7:6 54 - ./lists.cue:13:9 55 - ./lists.cue:14:10 41 + -- expect-stdout-cue -- 42 + IP: [uint8, uint8, uint8, uint8] 43 + PrivateIP: [10, uint8, uint8, uint8] | [192, 168, uint8, uint8] | [172, uint & >=16 & <=32, uint8, uint8] 44 + myIP: [10, 2, 3, 4] 45 + yourIP: _|_ // yourIP: 3 errors in empty disjunction: (and 3 more errors)
+8 -6
doc/tutorial/basics/4_references/80_cycle.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval -c cycle.cue 3 - cmp stderr expect-stderr 1 + # Note: the output here is wrong. Reported as cuelang.org/issue/2342 2 + exec cue eval -i -c cycle.cue 3 + cmp stdout expect-stdout-cue 4 4 5 5 -- frontmatter.toml -- 6 6 title = "Reference Cycles" ··· 27 27 a: b + 100 28 28 b: a - 100 29 29 30 - -- expect-stderr -- 31 - cycle error: 32 - ./cycle.cue:7:4 30 + -- expect-stdout-cue -- 31 + x: 200 32 + y: 100 33 + a: b + 100 34 + b: a - 100
+3 -1
doc/tutorial/basics/6_expressions/20_interpolation.txtar
··· 1 - exec cue export interpolation.cue 1 + exec cue eval interpolation.cue 2 2 cmp stdout expect-stdout-cue 3 3 4 4 -- frontmatter.toml -- ··· 19 19 20 20 -- expect-stdout-cue -- 21 21 "You are 14 dollars over budget!" 22 + #cost: 102 23 + #budget: 88
+8 -8
doc/tutorial/basics/6_expressions/70_regexp.txtar
··· 1 - # TODO: revert to cue eval -i post fix for #1786 2 - ! exec cue eval regexp.cue 3 - cmp stderr expect-stderr 1 + exec cue eval -i regexp.cue 2 + cmp stdout expect-stdout-cue 4 3 5 4 -- frontmatter.toml -- 6 5 title = "Regular expressions" ··· 27 26 e: c 28 27 e: "foo bar" 29 28 30 - -- expect-stderr -- 31 - e: invalid value "foo bar" (out of bound =~"^[a-z]{3}$"): 32 - ./regexp.cue:4:4 33 - ./regexp.cue:9:4 34 - ./regexp.cue:10:4 29 + -- expect-stdout-cue -- 30 + a: true 31 + b: true 32 + c: =~"^[a-z]{3}$" 33 + d: "foo" 34 + e: _|_ // e: invalid value "foo bar" (out of bound =~"^[a-z]{3}$")