Commit b05c541
[1.15] numDoStatements, and [1.14] an unknown -type is now an error
**1.15** renames the stored field and keeps `numPromptStatements` as a deprecated
accessor -- derived, not a second field, because two fields describing one count can
disagree.
It also corrects the note that deferred the rename. That note said the old name was
part of the published JS/TypeScript API because the class is `@JSExportTopLevel`. That
is not how Scala.js works: exporting a CLASS does not export its members, there is no
`@JSExportAll` here, and no reader exists anywhere in the repo. The rename was deferred
on a premise that did not hold.
**1.14** makes a typo in `-type` a parameter error (exit 7) instead of `0 matched` and
exit 0 -- which was indistinguishable from a correct query with no hits, the
confident-answer-over-nothing failure `find` exists to end. The message names close
matches: `unknown -type 'entty'; did you mean entity?`.
The vocabulary is the union of the categories, `Keyword.allKeywordsSet`, and 87 node
kinds OBSERVED across both corpora -- not guessed. `ProjectionPass.kindOf` derives a
kind from `RiddlValue.kind` at runtime, so there is no static list to read, and a
guessed one would fail in the direction that matters: rejecting a legitimate query.
`FindTypeVocabularyTest` re-derives the vocabulary from the corpus and fails on drift.
**Its first canary did not redden, and that was the useful part**: removing `entity`
changed nothing because `entity` is also a RIDDL keyword, so the union still covered
it. A canary has to target something only the removed set supplies -- `value-reference`
does, and the test then failed naming exactly what to add.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent ba7a608 commit b05c541
3 files changed
Lines changed: 181 additions & 11 deletions
File tree
- commands/src
- main/scala/com/ossuminc/riddl/commands/find
- test/scala-jvm-native/com/ossuminc/riddl/commands
- passes/src/main/scala/com/ossuminc/riddl/passes/stats
Lines changed: 57 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
25 | 26 | | |
26 | 27 | | |
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 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
28 | 80 | | |
29 | 81 | | |
30 | 82 | | |
| |||
52 | 104 | | |
53 | 105 | | |
54 | 106 | | |
55 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
56 | 112 | | |
57 | 113 | | |
58 | 114 | | |
| |||
Lines changed: 97 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
Lines changed: 27 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
| |||
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
84 | | - | |
| 96 | + | |
85 | 97 | | |
86 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
87 | 104 | | |
88 | 105 | | |
89 | 106 | | |
| |||
226 | 243 | | |
227 | 244 | | |
228 | 245 | | |
229 | | - | |
| 246 | + | |
230 | 247 | | |
231 | 248 | | |
232 | 249 | | |
| |||
251 | 268 | | |
252 | 269 | | |
253 | 270 | | |
254 | | - | |
| 271 | + | |
255 | 272 | | |
256 | 273 | | |
257 | 274 | | |
| |||
265 | 282 | | |
266 | 283 | | |
267 | 284 | | |
268 | | - | |
| 285 | + | |
269 | 286 | | |
270 | 287 | | |
271 | 288 | | |
| |||
284 | 301 | | |
285 | 302 | | |
286 | 303 | | |
287 | | - | |
| 304 | + | |
288 | 305 | | |
289 | 306 | | |
290 | 307 | | |
| |||
0 commit comments