You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/core/adt: force finalizing of shared values
When finalizing a value, CUE currently only finalized
direct arcs and skipped shared values. The reasoning
there is that CUE will anyway evaluated these shared
values eventually as the stack unwinds, meaning that
at the end of a CUE evaluation, all these shared values
are evaluated anyway.
However, this logic does not hold for builtins: if a
value is passed to a builtin mid evaluation, a shared
value may still be unprocessed. Basically, because
evaluation has not finished yet, there is no guarantee
that shared values are finalized.
We now ensure that all shared values comply to the
same requirements as those for the current node
under evaluation.
This fixes the tests added for 3648, but also removes
some discrepancies between V2 and V3.
In one case in particular, constraints.txtar:brokenRing,
this CL reverses a fix and now makes V3 mimic the
same bug as V2. We will accept this regression as
not particularly harmful and the net result is
certainly positive.
Fixes#3648
Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Ie877e7d94107841e0d9cbcf8b6ecdbcfcde5676b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207912
Reviewed-by: Matthew Sackman <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
0 commit comments