-
Notifications
You must be signed in to change notification settings - Fork 302
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
evaluator: phase out and deprecate arithmetic on lists #2237
Comments
Marking this a v0.6.0 pending discussion with @mpvl |
Moving forward to v0.6.x to implement a "fix" to rewrite to use |
This should also remove multiplication on lists. |
We closed this prematurely; the only merged commit does the |
The existing conversion used the old multiplication of lists when converting Go Array types to CUE. E.g. [3]string{} -> [string] * 3. This was deprecated years ago, and removed in issue #2237 and https://review.gerrithub.io/c/cue-lang/cue/+/1200221 Instead, we now convert [3]string{} -> list.Repeat([string], 3) Signed-off-by: Matthew Sackman <[email protected]> Change-Id: I49aa552a5d7cb04ba5279b10d54d6b4804747f0e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207907 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
What did you expect to see?
testscript -v repro-cmd.txtar
should succeed; arithmetic on lists hasn't been part of the spec since 2021, per https://cue-review.googlesource.com/c/cue/+/8063. Right now, that feature continues to work, and I didn't even notice that I shouldn't be using it until @myitcv reminded me.I expect
cue export
to fail on arithmetic on lists, or at least for a command likecue fmt
to rewrite+
withlist.Concat
as a transition step. For example, we could make CUE 0.6 apply thiscue fmt
rewrite, and a future version (0.8? 0.9?) reject the old form entirely.What did you see instead?
An old and removed spec feature continues to work without hiccups.
The text was updated successfully, but these errors were encountered: