Skip to content
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

eval: invalid structural cycle error with matchN #3410

Closed
rogpeppe opened this issue Aug 30, 2024 · 1 comment
Closed

eval: invalid structural cycle error with matchN #3410

rogpeppe opened this issue Aug 30, 2024 · 1 comment

Comments

@rogpeppe
Copy link
Member

What version of CUE are you using (cue version)?

$ cue version
e48fb9db492048b213b6a56fdce5c3660e69a189

Does this issue reproduce with the latest stable release?

N/A

What did you do?

env CUE_EXPERIMENT=evalv3
exec cue export x.cue

-- x.cue --
_s
_s: {
    #x: matchN(1, [_s, [..._s]])
}

What did you expect to see?

Passing test.

What did you see instead?

> env CUE_EXPERIMENT=evalv3
> exec cue export x.cue
[stderr]
0: structural cycle:
    ./x.cue:3:19
_s.0: structural cycle:
    ./x.cue:3:19
[exit status 1]
FAIL: /tmp/testscript4122338254/x.txtar/script.txtar:2: unexpected command failure
@mpvl
Copy link
Member

mpvl commented Aug 30, 2024

FTR: this also happens with or:

s: or([s, []])

@mpvl mpvl added the cycle label Oct 3, 2024
@cueckoo cueckoo closed this as completed in 2d4a895 Oct 8, 2024
@mvdan mvdan removed this from Release v0.10 Oct 8, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Release v0.11 Oct 8, 2024
vanhtuan0409 pushed a commit to anduintransaction/cue that referenced this issue Oct 15, 2024
This is needed to pass various tests.

Bugs still remains, but the main point is that it
unblocks a next phase in structure sharing.

Issue cue-lang#2854
Issue cue-lang#2850
Issue cue-lang#3165
Fixes cue-lang#3410
Fixes cue-lang#3420
Issue cue-lang#3443

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ibd2a41e25e07bd37899620af6bd9665435d68e8a
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202212
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
@mvdan mvdan moved this from Backlog to v0.11.0 in Release v0.11 Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: v0.11.0
Development

No branches or pull requests

2 participants