Skip to content

Commit

Permalink
internal/core/export: update error todos
Browse files Browse the repository at this point in the history
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 <mpvl@gmail.com>
Change-Id: I123e9d5e6f0c296bb993ce82bbce404eec8ece19
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194466
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
mpvl committed May 13, 2024
1 parent 336a991 commit 22b8c74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions internal/core/export/testdata/main/dynamic.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ diff old new
["s-r"]
["s-q1"]
-["s-q1" r1]
-- diff/out/todo/p1 --
Missing lines.
-- diff/out/todo/p3 --
One missing entry is the result of the new evaluator not generating a
bogus field for a failed dynamic field.
The second one results from the fact that the new evaluator does not
resolve `r1`, but rather propagates the error of the top-level node.
This is probably okay.
-- out/doc --
[]
[x]
Expand Down
5 changes: 3 additions & 2 deletions internal/core/export/testdata/main/issue2584.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ diff old new
-[F2 _]
[D]
[L]
-- diff/out/todo/p1 --
Missing line item.
-- diff/doc/explanation --
An incomplete dynamic field does not manifest itself as an invalid field
in the new evaluator. This is probably for the better.
-- out/doc --
[]
[F1]
Expand Down

0 comments on commit 22b8c74

Please sign in to comment.