Skip to content

evalv3 "field not allowed" regression involving embeddings and selectors #3853

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

Closed
mvdan opened this issue Mar 26, 2025 · 0 comments
Closed
Labels
evalv3-win Issues resolved by switching from evalv2 to evalv3 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 26, 2025

# evalv2
env CUE_EXPERIMENT=evalv3=0
exec cue export

# evalv3
env CUE_EXPERIMENT=evalv3=1
exec cue export

-- input.cue --
package p

#Schema: {
	msg: "hello"
	unused: {
		{embed: embedded: "foo"}.embed
	} & {
		embedded: string
		extra: "never printed"
	}
}

// Remove `& {}` below to fix evalv3.
out: {result: (#Schema & {}).msg}.result

As of 447e98d:

# evalv2 (0.010s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "out": "hello"
}
# evalv3 (0.028s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue export
[stderr]
unused.extra: field not allowed:
    ./input.cue:14:16
    ./input.cue:9:3
[exit status 1]
FAIL: repro-evalv3.txtar:7: unexpected command failure

Reduced from @nyarly's project in Unity.

@mvdan mvdan added evalv3 issues affecting only the evaluator version 3 evalv3-win Issues resolved by switching from evalv2 to evalv3 unity-win bugs found thanks to projects added to Unity labels Mar 26, 2025
cueckoo pushed a commit that referenced this issue Mar 27, 2025
Issue #3853

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Ic0c197a08d4accda78689134f3d728ab10f377a1
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212289
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evalv3-win Issues resolved by switching from evalv2 to evalv3 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

1 participant