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
cue/cuecontext: fix EvalDefault to follow the default, add EvalStable
When we flipped evalv3 on by default in https://cuelang.org/cl/1211974
we flipped the default for the experiment flag,
but we forgot about cuecontext.EvalDefault, which remained at evalv2.
We could tweak Evaldefault to instead be fixed at evalv3, but that isn't
quite right either; if a user creates an evaluator context via
cuecontext.New()
the selected version follows the CUE_EXPERIMENT=evalv3 flag,
which is the default behavior implemented in cmd/cue as well.
It would then follow that using
cuecontext.New(cuecontext.EvaluatorVersion(cuecontext.EvalDefault))
would result in the same behavior, but it does not if EvalDefault
is fixed at either EvalV2 or EvalV3 as a constant.
Make EvalDefault select a default version as described above,
and add EvalStable as an alias for the latest stable version of
the evaluator, which is what EvalDefault used to implement.
Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I3420fbbadde4e45e3e2c5b27a710a85fda66a12b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212505
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Matthew Sackman <[email protected]>
Reviewed-by: Marcel van Lohuizen <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
0 commit comments