Skip to content

Commit

Permalink
cue: add regression test for issue 3042
Browse files Browse the repository at this point in the history
In helping Richard on Slack with a use case needing a recursive schema,
we noticed that one of the constraints in the schema wasn't applying
properly when the data used a few levels of nesting.

Luckily, the new evaluator already seems to handle this well,
erroring as expected where the old evaluator incorrectly succeeds.
Add a regression test to ensure that the new evaluator doesn't regress.
Given that we never spotted this bug in the old evaluator before,
we clearly did not have any equivalent or close enough test case.

The issue can now be closed with the regression test.
Given that all work is focused on the new evaluator, it doesn't seem
worthwhile to spend the time to backport a fix into the old evaluator.

Closes #3042.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I964776fe6057bccf74ab6ae7546fdf2b74d2420b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194086
Reviewed-by: Marcel van Lohuizen <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mvdan committed May 1, 2024
1 parent 21b0039 commit 612f1ae
Showing 1 changed file with 399 additions and 6 deletions.
Loading

0 comments on commit 612f1ae

Please sign in to comment.