-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUE_EXPERIMENT and possibly CUE_DEBUG should not fail on unknown keys #3689
Comments
Here is an example of a new experiment which an old CUE does not yet know about:
Resolving this would require a very lax approach, such as option 4 above. Here is an example of a completed experiment which we removed entirely, following option 1 above:
And here is an example of a completed experiment which we left behind following option 2 above, as @rogpeppe correctly pointed out that we don't need to break users who set the env var to the right value:
So we currently follow a mix of options 1 and 2 above, being a bit inconsistent. |
Note that this is most important with Alternatively, if we only relax |
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]>
We currently fail if CUE_EXPERIMENT or CUE_DEBUG contain keys which are unknown:
As @mpvl points out, this is potentially a problem, because being able to enable or disable a number of experiments across CUE versions - even if some very old or very new versions do not support them - is useful to compare behavior, such as when investigating or bisecting bugs.
I see a spectrum of possible approaches, from most to least strict:
CUE_EXPERIMENT=modules
, but notCUE_EXPERIMENT=modules=0
, as the pre-modules code is now deleted.CUE_EXPERIMENT=modules=0
in CUE v0.11.0 and it would be a no-op.CUE_EXPERIMENT=modules
all the way back in CUE v0.4.0 for example, even if it did nothing at all. It would also make typos such asCUE_EXPERIMENT=evlav3
silently do nothing, which is unfortunate.I believe Marcel was arguing for option 4 above. My personal take is that we should do more of a middle ground for the sake of preventing human error such as typos, or users being misled into thinking that an env var is doing something when it's doing nothing at all. So my inclination is for option 2 above.
The text was updated successfully, but these errors were encountered: