Skip to content

Commit

Permalink
internal/cueexperiment: keep all past experiments around
Browse files Browse the repository at this point in the history
So that any existing users setting them to their final value
when the experiment was completed are not broken unnecessarily.

We had only removed yamlv3decoder so far; the modules experiment
was slated for removal via a TODO, so remove that TODO as well.

Updates #3689.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I8fddb699b85bdc8b1115da1d042a9c92084db743
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207501
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mvdan committed Jan 21, 2025
1 parent e34f770 commit 74c12e0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions internal/cueexperiment/exp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import (
// When adding, deleting, or modifying entries below,
// update cmd/cue/cmd/help.go as well for `cue help environment`.
var Flags struct {
// TODO(mvdan): remove in December 2025; leaving it around for now
// so that we delay breaking any users enabling this experiment.
Modules bool `envflag:"deprecated,default:true"`

// EvalV3 enables the new evaluator. The new evaluator addresses various
// performance concerns.
EvalV3 bool
Expand All @@ -29,6 +25,17 @@ var Flags struct {

// Enable topological sorting of struct fields.
TopoSort bool

// The flags below describe completed experiments; they can still be set
// as long as the value aligns with the final behavior once the experiment finished.
// Breaking users who set such a flag seems unnecessary,
// and it simplifies using the same experiment flags across a range of CUE versions.

// Modules was an experiment which ran from early 2023 to late 2024.
Modules bool `envflag:"deprecated,default:true"`

// YAMLV3Decoder was an experiment which ran from early 2024 to late 2024.
YAMLV3Decoder bool `envflag:"deprecated,default:true"`
}

// Init initializes Flags. Note: this isn't named "init" because we
Expand Down

0 comments on commit 74c12e0

Please sign in to comment.