File: selfcontained.txtar

package info (click to toggle)
golang-github-cue-lang-cue 0.12.0.-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,072 kB
  • sloc: sh: 57; makefile: 17
file content (53 lines) | stat: -rw-r--r-- 895 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#path: a.b

TODO: alternatives to consider
- `b.s` rewrites to `s` here. But we could interpret this as
   a "closed" value and write string instead. So

	s: string
	t: string

	or

	s: string
	t: _s
	_s: string

   Theoretically this seems more appropriate. It just may not be
   what users expect. Note that `t: s` would still remain `t: s`,
   as that reference does not refer to a node outside the closed
   node.

-- in.cue --
x: "out"
y: {
	s: "foo"
	t: "bar"
}
let X = "a: " + x

a: b: {
	c: x
	// TODO: should most likely resolve to "out", not c, because b points to
	// outside the exported value
	d: b.c
	e: y
	f: X
	g: "a: " + x // TODO: resolve

	s: string
	t: b.s
}
-- out/self/default --
c: "out"
// TODO: should most likely resolve to "out", not c, because b points to
// outside the exported value
d: c
e: {
	s: "foo"
	t: "bar"
}
f: "a: " + "out"
g: "a: " + "out"
s: string
t: s