Skip to content

evalv3 closedness regression with embeddings and definitions #3839

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 21, 2025 · 1 comment
Closed

evalv3 closedness regression with embeddings and definitions #3839

mvdan opened this issue Mar 21, 2025 · 1 comment
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 21, 2025

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

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

-- input.cue --
package p

_globals: glb: globalField: ""

#GlobalContext: globalField: string
#Context: {
	glb: #GlobalContext
	out: glb
}
out: {
	ingress: {
		#Ingress & {
			#def: (#Context & _globals).out
		}
	}

	ingress?: {
		foo: 1234
		bar: "http"
	}
}
#Embed: #def: {}

#Ingress: {
	#Embed
	...
}

as of 72567b9:

# With the old evaluator. (0.011s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "out": {
        "ingress": {
            "foo": 1234,
            "bar": "http"
        }
    }
}
# With the new evaluator. (0.023s)
> env CUE_EXPERIMENT=evalv3=1
> env CUE_DEBUG=openinline=0
> exec cue export
[stderr]
out.ingress.bar: field not allowed:
    ./input.cue:19:3
out.ingress.foo: field not allowed:
    ./input.cue:18:3
[exit status 1]

Once again reduced from @alecholmez's project in Unity.

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

mpvl commented Mar 21, 2025

Reduced to this:

x: { A & __no_sharing }
x: y: 1
#B: {}
A: {
	#B
	...
}

@mpvl mpvl self-assigned this Mar 21, 2025
cueckoo pushed a commit that referenced this issue Mar 24, 2025
Issue #3839

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Ic7cab1d4f997475b48ea7cf417aecb2a73a0f926
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212027
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Matthew Sackman <[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
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