this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/cueexperiment: clarify the docs and update the ordering

We no longer need to maintain the list of flags manually in help.go,
as https://cuelang.org/cl/1222518 added a generator.

We keep two sections to separate active from completed experiments,
but we completed two experiments without moving them. Do so.

Finally, clarify that we try to keep the fields ordered chronologically.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I6665f8c68d095cd47150ef57b2689bc9909a0698
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1229645
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+16 -13
+16 -13
internal/cueexperiment/exp.go
··· 12 12 13 13 // Config holds the set of known CUE_EXPERIMENT flags. 14 14 // 15 - // When adding, deleting, or modifying entries below, 16 - // update cmd/cue/cmd/help.go as well for `cue help environment`. 15 + // Keep the fields sorted from oldest to newest based on when the experiment was added. 17 16 type Config struct { 18 - // CmdReferencePkg requires referencing an imported tool package to declare tasks. 19 - // Otherwise, declaring tasks via "$id" or "kind" string fields is allowed. 20 - CmdReferencePkg bool `experiment:"preview:v0.13.0,default:v0.14.0,stable:v0.16.0"` 21 - 22 - // KeepValidators prevents validators from simplifying into concrete values, 23 - // even if their concrete value could be derived, such as '>=1 & <=1' to '1'. 24 - // Proposal: https://cuelang.org/discussion/3775. 25 - // Spec change: https://cuelang.org/cl/1217013 26 - // Spec change: https://cuelang.org/cl/1217014 27 - KeepValidators bool `experiment:"preview:v0.14.0,default:v0.14.0,stable:v0.15.0"` 17 + // The flags in this first section describe active experiments. 18 + // Sort from oldest to newest based on when they were introduced as a `preview`. 28 19 29 - // The flags below describe completed experiments; they can still be set 20 + // The flags in this second section describe completed experiments; they can still be set 30 21 // as long as the value aligns with the final behavior once the experiment finished. 31 22 // Breaking users who set such a flag seems unnecessary, 32 23 // and it simplifies using the same experiment flags across a range of CUE versions. 24 + // Sort from oldest to newest based on when they were completed as `stable` or `withdrawn`. 33 25 34 26 // Modules enables support for the modules and package management proposal 35 27 // as described in https://cuelang.org/discussion/2939. ··· 55 47 // EvalV3 enables the new CUE evaluator, addressing performance issues 56 48 // and bringing better algorithms for disjunctions, closedness, and cycles. 57 49 EvalV3 bool `experiment:"preview:v0.9.0,default:v0.13.0,stable:v0.15.0"` 50 + 51 + // KeepValidators prevents validators from simplifying into concrete values, 52 + // even if their concrete value could be derived, such as '>=1 & <=1' to '1'. 53 + // Proposal: https://cuelang.org/discussion/3775. 54 + // Spec change: https://cuelang.org/cl/1217013 55 + // Spec change: https://cuelang.org/cl/1217014 56 + KeepValidators bool `experiment:"preview:v0.14.0,default:v0.14.0,stable:v0.15.0"` 57 + 58 + // CmdReferencePkg requires referencing an imported tool package to declare tasks. 59 + // Otherwise, declaring tasks via "$id" or "kind" string fields is allowed. 60 + CmdReferencePkg bool `experiment:"preview:v0.13.0,default:v0.14.0,stable:v0.16.0"` 58 61 } 59 62 60 63 // initExperimentFlags initializes the experiment flags by processing both