Skip to content

Commit 22b8c74

Browse files
committed
internal/core/export: update error todos
The new evaluator ignores some fields for the doc tests if there are errors. The most common case in the tests is that it doesn't generate a bogus entry for a failed dynamic field. This is good. In another case it is arguably not the desired outcome, as the dynamic field can be resolved in principle. Update the diff comments accordingly. Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I123e9d5e6f0c296bb993ce82bbce404eec8ece19 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194466 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
1 parent 336a991 commit 22b8c74

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

internal/core/export/testdata/main/dynamic.txtar

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ diff old new
6868
["s-r"]
6969
["s-q1"]
7070
-["s-q1" r1]
71-
-- diff/out/todo/p1 --
72-
Missing lines.
71+
-- diff/out/todo/p3 --
72+
One missing entry is the result of the new evaluator not generating a
73+
bogus field for a failed dynamic field.
74+
The second one results from the fact that the new evaluator does not
75+
resolve `r1`, but rather propagates the error of the top-level node.
76+
This is probably okay.
7377
-- out/doc --
7478
[]
7579
[x]

internal/core/export/testdata/main/issue2584.txtar

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ diff old new
4141
-[F2 _]
4242
[D]
4343
[L]
44-
-- diff/out/todo/p1 --
45-
Missing line item.
44+
-- diff/doc/explanation --
45+
An incomplete dynamic field does not manifest itself as an invalid field
46+
in the new evaluator. This is probably for the better.
4647
-- out/doc --
4748
[]
4849
[F1]

0 commit comments

Comments
 (0)