@sdboyer/thema-ui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +25 -2
  3. package/dist/Diagnostics.d.ts +8 -0
  4. package/dist/Diagnostics.js +14 -0
  5. package/dist/Editor.d.ts +12 -0
  6. package/dist/Editor.js +95 -0
  7. package/dist/OpBar.d.ts +14 -0
  8. package/dist/OpBar.js +15 -0
  9. package/dist/Output.d.ts +20 -0
  10. package/dist/Output.js +56 -0
  11. package/dist/Tabs.d.ts +15 -0
  12. package/dist/Tabs.js +23 -0
  13. package/dist/cue-lang.d.ts +8 -0
  14. package/dist/cue-lang.js +82 -0
  15. package/dist/docs.d.ts +64 -0
  16. package/dist/docs.js +42 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +18 -0
  19. package/dist/markers.d.ts +11 -0
  20. package/dist/markers.js +45 -0
  21. package/dist/ops.d.ts +13 -0
  22. package/dist/ops.js +22 -0
  23. package/dist/positions.d.ts +7 -0
  24. package/dist/positions.js +40 -0
  25. package/dist/theme.d.ts +16 -0
  26. package/dist/theme.js +55 -0
  27. package/dist/types.d.ts +580 -0
  28. package/dist/types.js +85 -0
  29. package/errors/E0101.md +43 -0
  30. package/errors/E0102.md +34 -0
  31. package/errors/E0103.md +41 -0
  32. package/errors/E0104.md +5 -0
  33. package/errors/E0105.md +62 -0
  34. package/errors/E0106.md +46 -0
  35. package/errors/E0107.md +48 -0
  36. package/errors/E0108.md +45 -0
  37. package/errors/E0109.md +37 -0
  38. package/errors/E0110.md +17 -0
  39. package/errors/E0111.md +55 -0
  40. package/errors/E0112.md +40 -0
  41. package/errors/E0120.md +34 -0
  42. package/errors/E0121.md +34 -0
  43. package/errors/E0122.md +26 -0
  44. package/errors/E0123.md +37 -0
  45. package/errors/E0124.md +36 -0
  46. package/errors/E0125.md +43 -0
  47. package/errors/E0126.md +38 -0
  48. package/errors/E0128.md +34 -0
  49. package/errors/E0129.md +42 -0
  50. package/errors/E0130.md +43 -0
  51. package/errors/E0131.md +42 -0
  52. package/errors/E0132.md +40 -0
  53. package/errors/E0133.md +46 -0
  54. package/errors/E0134.md +36 -0
  55. package/errors/E0135.md +109 -0
  56. package/errors/E0137.md +37 -0
  57. package/errors/E0140.md +46 -0
  58. package/errors/E0141.md +35 -0
  59. package/errors/E0142.md +38 -0
  60. package/errors/E0143.md +62 -0
  61. package/errors/E0144.md +49 -0
  62. package/errors/E0145.md +48 -0
  63. package/errors/E0146.md +38 -0
  64. package/errors/E0147.md +57 -0
  65. package/errors/E0148.md +42 -0
  66. package/errors/E0149.md +27 -0
  67. package/errors/E0150.md +77 -0
  68. package/errors/E0151.md +47 -0
  69. package/errors/E0152.md +35 -0
  70. package/errors/E0201.md +35 -0
  71. package/errors/E0202.md +42 -0
  72. package/errors/E0203.md +37 -0
  73. package/errors/E0204.md +46 -0
  74. package/errors/E0205.md +47 -0
  75. package/errors/E0206.md +47 -0
  76. package/errors/E0208.md +59 -0
  77. package/errors/E0210.md +44 -0
  78. package/errors/E0211.md +43 -0
  79. package/errors/E0212.md +41 -0
  80. package/errors/E0213.md +42 -0
  81. package/errors/E0214.md +42 -0
  82. package/errors/E0215.md +44 -0
  83. package/errors/E0216.md +41 -0
  84. package/errors/E0217.md +43 -0
  85. package/errors/E0218.md +44 -0
  86. package/errors/E0230.md +46 -0
  87. package/errors/E0232.md +42 -0
  88. package/errors/E0233.md +42 -0
  89. package/errors/E0234.md +43 -0
  90. package/errors/E0240.md +31 -0
  91. package/errors/E0242.md +5 -0
  92. package/errors/E0243.md +5 -0
  93. package/errors/E0250.md +39 -0
  94. package/errors/E0251.md +83 -0
  95. package/errors/E0252.md +42 -0
  96. package/errors/E0253.md +142 -0
  97. package/errors/E0254.md +38 -0
  98. package/errors/E0301.md +43 -0
  99. package/errors/E0302.md +58 -0
  100. package/errors/E0303.md +57 -0
  101. package/errors/E0304.md +9 -0
  102. package/errors/E0305.md +55 -0
  103. package/errors/E0307.md +9 -0
  104. package/errors/E0308.md +9 -0
  105. package/errors/E0310.md +46 -0
  106. package/errors/E0311.md +46 -0
  107. package/errors/E0330.md +67 -0
  108. package/errors/E0331.md +64 -0
  109. package/errors/E0332.md +52 -0
  110. package/errors/E0333.md +61 -0
  111. package/errors/E0334.md +61 -0
  112. package/errors/E0335.md +57 -0
  113. package/errors/E0336.md +50 -0
  114. package/errors/E0337.md +54 -0
  115. package/errors/E0338.md +62 -0
  116. package/errors/E0340.md +57 -0
  117. package/errors/E0341.md +51 -0
  118. package/errors/E0342.md +53 -0
  119. package/errors/E0343.md +56 -0
  120. package/errors/E0344.md +58 -0
  121. package/errors/E0345.md +51 -0
  122. package/errors/E0346.md +45 -0
  123. package/errors/E0347.md +53 -0
  124. package/errors/E0348.md +50 -0
  125. package/errors/E0349.md +52 -0
  126. package/errors/E0350.md +54 -0
  127. package/errors/E0351.md +54 -0
  128. package/errors/E0352.md +60 -0
  129. package/errors/E0353.md +53 -0
  130. package/errors/E0354.md +43 -0
  131. package/errors/E0355.md +55 -0
  132. package/errors/E0356.md +65 -0
  133. package/errors/E0357.md +68 -0
  134. package/errors/E0358.md +50 -0
  135. package/errors/E0359.md +53 -0
  136. package/errors/E0360.md +59 -0
  137. package/errors/E0361.md +59 -0
  138. package/errors/E0362.md +56 -0
  139. package/errors/E0364.md +58 -0
  140. package/errors/E0365.md +58 -0
  141. package/errors/E0366.md +56 -0
  142. package/errors/E0367.md +57 -0
  143. package/errors/E0368.md +58 -0
  144. package/errors/E0369.md +60 -0
  145. package/errors/E0370.md +59 -0
  146. package/errors/E0371.md +59 -0
  147. package/errors/E0372.md +57 -0
  148. package/errors/E0380.md +71 -0
  149. package/errors/E0381.md +61 -0
  150. package/errors/E0382.md +64 -0
  151. package/errors/E0383.md +61 -0
  152. package/errors/E0384.md +63 -0
  153. package/errors/E0385.md +61 -0
  154. package/errors/E0386.md +59 -0
  155. package/errors/E0387.md +59 -0
  156. package/errors/E0388.md +60 -0
  157. package/errors/E0389.md +59 -0
  158. package/errors/E0390.md +59 -0
  159. package/errors/E0401.md +56 -0
  160. package/errors/E0402.md +51 -0
  161. package/errors/E0403.md +51 -0
  162. package/errors/E0404.md +57 -0
  163. package/errors/E0405.md +56 -0
  164. package/errors/E0406.md +53 -0
  165. package/errors/E0407.md +54 -0
  166. package/errors/E0410.md +56 -0
  167. package/errors/E0411.md +59 -0
  168. package/errors/E0412.md +59 -0
  169. package/errors/E0413.md +74 -0
  170. package/errors/E0414.md +53 -0
  171. package/errors/E0415.md +72 -0
  172. package/errors/E0416.md +67 -0
  173. package/errors/E0418.md +59 -0
  174. package/errors/E0420.md +71 -0
  175. package/errors/E0421.md +82 -0
  176. package/errors/E0422.md +82 -0
  177. package/errors/E0423.md +83 -0
  178. package/errors/E0501.md +51 -0
  179. package/errors/E0502.md +50 -0
  180. package/errors/E0503.md +52 -0
  181. package/errors/E0504.md +64 -0
  182. package/errors/E0505.md +51 -0
  183. package/errors/E0506.md +48 -0
  184. package/errors/E0507.md +41 -0
  185. package/errors/E0508.md +39 -0
  186. package/errors/E0601.md +22 -0
  187. package/errors/E0602.md +28 -0
  188. package/errors/E0603.md +65 -0
  189. package/errors/E0604.md +37 -0
  190. package/errors/E0605.md +36 -0
  191. package/errors/E0606.md +44 -0
  192. package/errors/E0607.md +57 -0
  193. package/errors/E0608.md +37 -0
  194. package/errors/E0609.md +33 -0
  195. package/errors/E0611.md +37 -0
  196. package/errors/E0612.md +34 -0
  197. package/errors/E0613.md +30 -0
  198. package/errors/E0614.md +36 -0
  199. package/errors/E0616.md +33 -0
  200. package/errors/E0617.md +15 -0
  201. package/errors/E0618.md +16 -0
  202. package/errors/E0620.md +37 -0
  203. package/errors/E0621.md +45 -0
  204. package/errors/E0622.md +34 -0
  205. package/errors/E0623.md +33 -0
  206. package/errors/E0624.md +34 -0
  207. package/errors/E0625.md +28 -0
  208. package/errors/E0626.md +54 -0
  209. package/errors/E0627.md +27 -0
  210. package/errors/E0628.md +63 -0
  211. package/errors/E0701.md +25 -0
  212. package/errors/E0801.md +23 -0
  213. package/errors/E0802.md +22 -0
  214. package/errors/E0803.md +22 -0
  215. package/errors/E0804.md +25 -0
  216. package/errors/E0805.md +26 -0
  217. package/errors/E0901.md +27 -0
  218. package/errors/E0902.md +40 -0
  219. package/errors/E0903.md +23 -0
  220. package/errors/E1001.md +53 -0
  221. package/errors/E1002.md +43 -0
  222. package/errors/E1003.md +40 -0
  223. package/errors/E1004.md +44 -0
  224. package/errors/README.md +215 -0
  225. package/package.json +34 -4
@@ -0,0 +1,34 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0102: a version file is not CUE syntax
4
+
5
+ A version file is CUE syntax. CUE's parser found something it could not read;
6
+ its account is in the detail, positioned where parsing failed.
7
+
8
+ ## Example
9
+
10
+ `ship/history/0.0.thema`:
11
+
12
+ ```cue
13
+ Schema: {
14
+ a: string
15
+ ```
16
+
17
+ `ship/tip.thema`:
18
+
19
+ ```cue
20
+ Schema: {
21
+ a: string
22
+ ```
23
+
24
+ thema reports:
25
+
26
+ ```
27
+ error[E0102]: a version file is not CUE syntax
28
+ --> history/0.0.thema:2:12
29
+ |
30
+ 2 | a: string
31
+ | ^
32
+ |
33
+ = detail: expected '}', found 'EOF'
34
+ ```
@@ -0,0 +1,41 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0103: a version file has a package clause
4
+
5
+ A version file is not a CUE package: it is one version of one lineage, and the
6
+ compiler assembles the lineage from the files. A package clause does not belong
7
+ in it.
8
+
9
+ ## Example
10
+
11
+ `ship/history/0.0.thema`:
12
+
13
+ ```cue
14
+ package ship
15
+
16
+ Schema: {
17
+ a: string
18
+ }
19
+ ```
20
+
21
+ `ship/tip.thema`:
22
+
23
+ ```cue
24
+ package ship
25
+
26
+ Schema: {
27
+ a: string
28
+ }
29
+ ```
30
+
31
+ thema reports:
32
+
33
+ ```
34
+ error[E0103]: history/0.0.thema has a package clause
35
+ --> history/0.0.thema:1:1
36
+ |
37
+ 1 | package ship
38
+ | ^^^^^^^
39
+ |
40
+ = help: a version file is not a CUE package; remove the clause
41
+ ```
@@ -0,0 +1,5 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0104: a version file imports a package
4
+
5
+ **Retired.** A version file may import CUE's builtin packages since #104. An import of any other package is E0143, the rule for schemas and lenses in either form.
@@ -0,0 +1,62 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0105: a version file has a field that is not schema, ForwardLens or BackwardLens
4
+
5
+ A version file has at most three fields: schema, ForwardLens and BackwardLens.
6
+ Anything else is usually a typo; when the name is close to one of the three,
7
+ the help names it.
8
+
9
+ ## Example
10
+
11
+ `ship/history/0.0.thema`:
12
+
13
+ ```cue
14
+ Schema: {
15
+ a: string
16
+ }
17
+ ```
18
+
19
+ `ship/history/1.0.thema`:
20
+
21
+ ```cue
22
+ scehma: {
23
+ a: string
24
+ b: int
25
+ }
26
+
27
+ ForwardLens: {
28
+ v0_0: _
29
+ v1_0: {
30
+ b: 1
31
+ }
32
+ }
33
+ ```
34
+
35
+ `ship/tip.thema`:
36
+
37
+ ```cue
38
+ scehma: {
39
+ a: string
40
+ b: int
41
+ }
42
+ ```
43
+
44
+ thema reports:
45
+
46
+ ```
47
+ error[E0105]: scehma is not a field of a version file
48
+ --> history/1.0.thema:1:1
49
+ |
50
+ 1 | scehma: {
51
+ | ^^^^^^
52
+ |
53
+ = help: did you mean Schema?
54
+
55
+ error[E0108]: history/1.0.thema declares no Schema
56
+ --> history/1.0.thema:1:1
57
+ |
58
+ 1 | scehma: {
59
+ | ^^^^^^
60
+ |
61
+ = help: every version file declares Schema: {...}
62
+ ```
@@ -0,0 +1,46 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0106: a version file declares a field twice
4
+
5
+ A version file declares each of its fields once. CUE would unify two
6
+ declarations of schema; a version file has one schema, written in one place.
7
+
8
+ ## Example
9
+
10
+ `ship/history/0.0.thema`:
11
+
12
+ ```cue
13
+ Schema: {
14
+ a: string
15
+ }
16
+
17
+ Schema: {
18
+ b: int
19
+ }
20
+ ```
21
+
22
+ `ship/tip.thema`:
23
+
24
+ ```cue
25
+ Schema: {
26
+ a: string
27
+ }
28
+
29
+ Schema: {
30
+ b: int
31
+ }
32
+ ```
33
+
34
+ thema reports:
35
+
36
+ ```
37
+ error[E0106]: history/0.0.thema declares Schema twice
38
+ --> history/0.0.thema:5:1
39
+ |
40
+ 1 | Schema: {
41
+ | ------ first declared here
42
+ ...
43
+ 5 | Schema: {
44
+ | ^^^^^^
45
+ |
46
+ ```
@@ -0,0 +1,48 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0107: a lens block is not a struct
4
+
5
+ A lens block is a struct: `{v<from>: _, v<to>: {...}}`, declaring the instance
6
+ the lens takes and the body that produces the instance it returns.
7
+
8
+ ## Example
9
+
10
+ `ship/history/0.0.thema`:
11
+
12
+ ```cue
13
+ Schema: {
14
+ a: string
15
+ }
16
+ ```
17
+
18
+ `ship/history/1.0.thema`:
19
+
20
+ ```cue
21
+ Schema: {
22
+ a: string
23
+ b: int
24
+ }
25
+
26
+ ForwardLens: 5
27
+ ```
28
+
29
+ `ship/tip.thema`:
30
+
31
+ ```cue
32
+ Schema: {
33
+ a: string
34
+ b: int
35
+ }
36
+ ```
37
+
38
+ thema reports:
39
+
40
+ ```
41
+ error[E0107]: ForwardLens is not a struct
42
+ --> history/1.0.thema:6:14
43
+ |
44
+ 6 | ForwardLens: 5
45
+ | ^
46
+ |
47
+ = help: a lens block is {v<from>: _, v<to>: {...}}, naming the tip's instance tip
48
+ ```
@@ -0,0 +1,45 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0108: a version file declares no schema
4
+
5
+ Every version file declares a schema; that is what a version is. A file with
6
+ only lenses has nothing for them to map to.
7
+
8
+ ## Example
9
+
10
+ `ship/history/0.0.thema`:
11
+
12
+ ```cue
13
+ Schema: {
14
+ a: string
15
+ }
16
+ ```
17
+
18
+ `ship/history/1.0.thema`:
19
+
20
+ ```cue
21
+ ForwardLens: {
22
+ v0_0: _
23
+ v1_0: {
24
+ a: v0_0.a
25
+ }
26
+ }
27
+ ```
28
+
29
+ `ship/tip.thema`:
30
+
31
+ ```cue
32
+
33
+ ```
34
+
35
+ thema reports:
36
+
37
+ ```
38
+ error[E0108]: history/1.0.thema declares no Schema
39
+ --> history/1.0.thema:1:1
40
+ |
41
+ 1 | ForwardLens: {
42
+ | ^^^^^^^^^^^
43
+ |
44
+ = help: every version file declares Schema: {...}
45
+ ```
@@ -0,0 +1,37 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0109: a version file uses CUE's struct shorthand
4
+
5
+ A version file's three fields, Schema, ForwardLens and BackwardLens, keep
6
+ their braces, so that each reads as the block it is. CUE's struct shorthand,
7
+ `Schema: a: b`, collapses one into a line, and is refused there. Beneath the
8
+ three fields the shorthand is accepted; thema's formatter expands it.
9
+
10
+ ## Example
11
+
12
+ `ship/history/0.0.thema`:
13
+
14
+ ```cue
15
+ Schema: name: string
16
+ ```
17
+
18
+ `ship/tip.thema`:
19
+
20
+ ```cue
21
+ Schema: {
22
+ name: string
23
+ }
24
+ ```
25
+
26
+ thema reports:
27
+
28
+ ```
29
+ error[E0109]: Schema: name: ... is CUE's struct shorthand, which a version file's Schema does not use
30
+ --> history/0.0.thema:1:9
31
+ |
32
+ 1 | Schema: name: string
33
+ | ^^^^
34
+ |
35
+ = note: a version file's three fields keep their braces, so that each reads as the block it is
36
+ = help: write Schema: {name: ...}
37
+ ```
@@ -0,0 +1,17 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0110: the lineage's directory has no version files
4
+
5
+ The lineage has no frozen versions under `history/`. Binding reads only the
6
+ frozen versions, and ignores the tip, so a lineage whose only version is its
7
+ tip binds only on the development path, until the tip is cut to
8
+ `history/0.0.thema`.
9
+
10
+ thema reports:
11
+
12
+ ```
13
+ error[E0110]: the lineage has no versions under history/
14
+ |
15
+ = note: binding reads the frozen versions under history/ and ignores the tip; a lineage whose only version is its tip binds only on the development path
16
+ = help: cut the tip to history/0.0.thema
17
+ ```
@@ -0,0 +1,55 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0111: a lens block is not shaped as a lens
4
+
5
+ A lens block reads like a function: `{v0_0: _, v1_0: {...}}` declares that the
6
+ lens takes an instance of 0.0 and produces an instance of 1.0, with an optional
7
+ `lacunas: {...}`. Here the instance it takes is given a type, where it must be
8
+ `_`: the lens takes any instance of its source version.
9
+
10
+ ## Example
11
+
12
+ `ship/history/0.0.thema`:
13
+
14
+ ```cue
15
+ Schema: {
16
+ a: string
17
+ }
18
+ ```
19
+
20
+ `ship/history/1.0.thema`:
21
+
22
+ ```cue
23
+ Schema: {
24
+ a: string
25
+ b: int
26
+ }
27
+
28
+ ForwardLens: {
29
+ v0_0: {a: string}
30
+ v1_0: {
31
+ b: 1
32
+ }
33
+ }
34
+ ```
35
+
36
+ `ship/tip.thema`:
37
+
38
+ ```cue
39
+ Schema: {
40
+ a: string
41
+ b: int
42
+ }
43
+ ```
44
+
45
+ thema reports:
46
+
47
+ ```
48
+ error[E0111]: ForwardLens takes an instance of 0.0: declare it as v0_0: _
49
+ --> history/1.0.thema:7:8
50
+ |
51
+ 7 | v0_0: {a: string}
52
+ | ^
53
+ |
54
+ = help: ForwardLens for the lens from 0.0 to 1.0 is {v0_0: _, v1_0: {...}}, with an optional lacunas: {...}
55
+ ```
@@ -0,0 +1,40 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0112: a version file's schema has an error
4
+
5
+ A version file's schema is evaluated on its own before the lineage is
6
+ assembled, and this one has an error of its own: a conflict CUE reports.
7
+
8
+ ## Example
9
+
10
+ `ship/history/0.0.thema`:
11
+
12
+ ```cue
13
+ Schema: {
14
+ a: 1
15
+ a: 2
16
+ }
17
+ ```
18
+
19
+ `ship/tip.thema`:
20
+
21
+ ```cue
22
+ Schema: {
23
+ a: 1
24
+ a: 2
25
+ }
26
+ ```
27
+
28
+ thema reports:
29
+
30
+ ```
31
+ error[E0112]: a version file's schema has an error
32
+ --> history/0.0.thema:3:5
33
+ |
34
+ 2 | a: 1
35
+ | - also here
36
+ 3 | a: 2
37
+ | ^
38
+ |
39
+ = detail: schema.a: conflicting values 2 and 1
40
+ ```
@@ -0,0 +1,34 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0120: the lineage does not declare a field every lineage has
4
+
5
+ Every lineage declares a name and its schemas. This one declares no name. The
6
+ primary position is the lineage itself.
7
+
8
+ ## Example
9
+
10
+ `lineage.cue`:
11
+
12
+ ```cue
13
+ schemas: {
14
+ "0": {
15
+ "0": {
16
+ schema: {
17
+ a: string
18
+ }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ thema reports:
25
+
26
+ ```
27
+ error[E0120]: the lineage does not declare name
28
+ --> lineage.cue:1:1
29
+ |
30
+ 1 | schemas: {
31
+ | ^^^^^^^
32
+ |
33
+ = help: every lineage declares name and schemas
34
+ ```
@@ -0,0 +1,34 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0121: a field every lineage has is not concrete
4
+
5
+ A lineage's name and schemas are concrete: the name is a string literal, not a
6
+ constraint on one. Here the name is left as `string`, so there is no name.
7
+
8
+ ## Example
9
+
10
+ `lineage.cue`:
11
+
12
+ ```cue
13
+ name: string
14
+ schemas: {
15
+ "0": {
16
+ "0": {
17
+ schema: {
18
+ a: string
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ thema reports:
26
+
27
+ ```
28
+ error[E0121]: name is not concrete
29
+ --> lineage.cue:1:1
30
+ |
31
+ 1 | name: string
32
+ | ^^^^
33
+ |
34
+ ```
@@ -0,0 +1,26 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0122: the lineage declares no schemas
4
+
5
+ A lineage declares at least one schema, version 0.0. This one declares none.
6
+
7
+ ## Example
8
+
9
+ `lineage.cue`:
10
+
11
+ ```cue
12
+ name: "ship"
13
+ schemas: {}
14
+ ```
15
+
16
+ thema reports:
17
+
18
+ ```
19
+ error[E0122]: the lineage declares no schemas
20
+ --> lineage.cue:2:1
21
+ |
22
+ 2 | schemas: {}
23
+ | ^^^^^^^
24
+ |
25
+ = help: declare at least version 0.0 under schemas
26
+ ```
@@ -0,0 +1,37 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0123: a field that is not part of a lineage, a schema entry or a lens
4
+
5
+ A lineage, a schema entry and a lens each have a fixed set of fields; a field
6
+ outside that set is usually a typo, and the help names the field that is
7
+ closest. Hidden fields and definitions are not checked: they are the author's
8
+ own helpers.
9
+
10
+ ## Example
11
+
12
+ `lineage.cue`:
13
+
14
+ ```cue
15
+ name: "ship"
16
+ schemas: {
17
+ "0": {
18
+ "0": {
19
+ shcema: {
20
+ a: string
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ thema reports:
28
+
29
+ ```
30
+ error[E0123]: shcema is not a field of a schema entry
31
+ --> lineage.cue:5:4
32
+ |
33
+ 5 | shcema: {
34
+ | ^^^^^^
35
+ |
36
+ = help: did you mean schema?
37
+ ```
@@ -0,0 +1,36 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0124: a schemas key that is not a version
4
+
5
+ Schemas are keyed by major version, then minor version, each a non-negative
6
+ integer written as a string: `"0": "0"` is version 0.0. A key that is not such
7
+ an integer is not a version.
8
+
9
+ ## Example
10
+
11
+ `lineage.cue`:
12
+
13
+ ```cue
14
+ name: "ship"
15
+ schemas: {
16
+ "v0": {
17
+ "0": {
18
+ schema: {
19
+ a: string
20
+ }
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ thema reports:
27
+
28
+ ```
29
+ error[E0124]: "v0" is not a major version
30
+ --> lineage.cue:3:2
31
+ |
32
+ 3 | "v0": {
33
+ | ^^^^
34
+ |
35
+ = help: schemas are keyed by major, then minor version, each a non-negative integer such as "0"
36
+ ```
@@ -0,0 +1,43 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0125: a lenses key that is not a lens edge
4
+
5
+ Lenses are keyed by the edge they map across, `"<from>-><to>"`, such as
6
+ `"1.0->0.1"`. A key of any other shape is not an edge.
7
+
8
+ ## Example
9
+
10
+ `lineage.cue`:
11
+
12
+ ```cue
13
+ name: "ship"
14
+ schemas: {
15
+ "0": {
16
+ "0": {
17
+ schema: {
18
+ a: string
19
+ }
20
+ }
21
+ }
22
+ }
23
+ lenses: {
24
+ "0.0=>1.0": {
25
+ input: _
26
+ result: {
27
+ a: input.a
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ thema reports:
34
+
35
+ ```
36
+ error[E0125]: "0.0=>1.0" is not a lens edge
37
+ --> lineage.cue:12:2
38
+ |
39
+ 12 | "0.0=>1.0": {
40
+ | ^^^^^^^^^^
41
+ |
42
+ = help: lenses are keyed by "<from>-><to>" versions, such as "1.0->0.1"
43
+ ```
@@ -0,0 +1,38 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0126: the lineage is not an instance of thema.Lineage
4
+
5
+ The lineage is not an instance of thema.Lineage, for a reason thema has no more
6
+ specific code for; CUE's own account is in the detail. Here the name is a
7
+ number where a lineage's name is a string.
8
+
9
+ ## Example
10
+
11
+ `lineage.cue`:
12
+
13
+ ```cue
14
+ name: 5
15
+ schemas: {
16
+ "0": {
17
+ "0": {
18
+ schema: {
19
+ a: string
20
+ }
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ thema reports:
27
+
28
+ ```
29
+ error[E0126]: the lineage is not an instance of thema.Lineage
30
+ --> lineage.cue:1:7
31
+ |
32
+ 1 | name: 5
33
+ | ^
34
+ |
35
+ = note: in thema's own CUE
36
+ --> thema/lineage.cue:28:9
37
+ = detail: name: conflicting values 5 and =~"^[A-Za-z][A-Za-z0-9_]*$" (mismatched types int and string)
38
+ ```