Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal: separate the zero EvaluatorVersion value from EvalV2
We used to only have two valid EvaluatorVersion values via iota; 0 for EvalV2, also known as EvalDefault, and 1 for EvalV3, also known as EvalExperiment. The main issue with this approach is that it's impossible to tell whether an evaluator version value was not initialised properly, as its zero value already described EvalV2. Such a scenario could easily lead to bugs, such as the user setting CUE_EXPERIMENT=evalv3 and the value not being propagated leading to using EvalV2 instead. Separate the zero value as EvalVersionUnset, and stop using iota so that it's clear that the values should be static over time. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2d3695d32d6ccfbd6afda31492aeba56e41fc79b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202744 Reviewed-by: Marcel van Lohuizen <[email protected]> Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information