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

evalv3 regression: key value of dynamic field must be concrete, found _|_ #3828

Closed
mvdan opened this issue Mar 18, 2025 · 1 comment
Closed
Assignees
Labels
evaluator evalv3 issues affecting only the evaluator version 3 unity-win bugs found thanks to projects added to Unity

Comments

@mvdan
Copy link
Member

mvdan commented Mar 18, 2025

# With the old evaluator.
env CUE_EXPERIMENT=evalv3=0
exec cue export

# With the new evaluator.
env CUE_EXPERIMENT=evalv3=1
exec cue export

-- input.cue --
package p

orgs: org1: {
	repos: repo1: {}
}

botUser: "bot1"

orgs: [_]: config={
	for repo_name, _ in config.repos
	let orgBotUser = botUser {
		collaborators: (repo_name): (orgBotUser): true
	}
}

As of c479844:

# With the old evaluator. (0.022s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "orgs": {
        "org1": {
            "repos": {
                "repo1": {}
            },
            "collaborators": {
                "repo1": {
                    "bot1": true
                }
            }
        }
    },
    "botUser": "bot1"
}
# With the new evaluator. (0.048s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue export
[stderr]
orgs.org1.collaborators.repo1: key value of dynamic field must be concrete, found _|_(orgs.org1.collaborators.repo1: cycle with field: orgBotUser):
    ./input.cue:12:32
[exit status 1]
FAIL: repro-evalv3.txtar:7: unexpected command failure

Reduced from our own infra repo.

@mvdan mvdan added evaluator evalv3 issues affecting only the evaluator version 3 unity-win bugs found thanks to projects added to Unity labels Mar 18, 2025
@mpvl
Copy link
Member

mpvl commented Mar 19, 2025

Somewhat reduced:

a: b: {}
a: [_]: {
	if true let x=str {
		(x): true
	}
}
str: "bot1"

@mpvl mpvl self-assigned this Mar 19, 2025
cueckoo pushed a commit that referenced this issue Mar 19, 2025
Issue #3828

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ief7ef6e4b9bd3bccd071b97ca61e30389b6188ca
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211805
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluator evalv3 issues affecting only the evaluator version 3 unity-win bugs found thanks to projects added to Unity
Projects
None yet
Development

No branches or pull requests

2 participants