Skip to content

Commit

Permalink
internal/core/adt: pass CloseInfo to validators
Browse files Browse the repository at this point in the history
The key change here is in context.go, where we now
also pass the CloseInfo asociated with the
validator. This ensures that cycles are tracked
across validator calls.

To accomplish this, we need to record the
CloseInfo for validators as well. For completeness
sake, we also track the Environment, which may
give us some additional contextual information
that we can use in error messages down the line.

This avoids a hang in #3443. It still is a bit
sloppy about whether something should be
considered a cycle or not. One could argue either
way.

Fixes #3443

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Id6c7f2ae48d07586e969af2353bb34b23771f977
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202289
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Matthew Sackman <[email protected]>
  • Loading branch information
mpvl committed Oct 10, 2024
1 parent a50fa63 commit 369bc9b
Show file tree
Hide file tree
Showing 7 changed files with 304 additions and 74 deletions.
Loading

0 comments on commit 369bc9b

Please sign in to comment.