Skip to content

evalv3 "field not allowed" regression with embeddings #3858

@mvdan

Description

@mvdan
# evalv2
env CUE_EXPERIMENT=evalv3=0
exec cue export

# evalv3
env CUE_EXPERIMENT=evalv3=1
exec cue export

-- input.cue --
package p

#Image: embed: image: "foo:v1"
#JobConfig: {
	image: #Image
	job: #Job & {
		image.embed
	}
}
#Job: {
	image: string
	vcs:   "git"
	args:  [...string]
	env:   [string]: string
}

#Output: {
	_in:  _
	out:  (_in & {})
}
#Output & {
	_in: (#JobConfig & {}).job
}

As of 721ca5d:

# evalv2 (0.010s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "out": {
        "image": "foo:v1",
        "vcs": "git",
        "args": [],
        "env": {}
    }
}
# evalv3 (0.029s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue export
[stderr]
out.args: field not allowed:
    ./input.cue:13:2
out.env: field not allowed:
    ./input.cue:14:2
out.vcs: field not allowed:
    ./input.cue:12:2
[exit status 1]

Reduced from @nyarly's project in Unity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    evaluatorevalv3issues affecting only the evaluator version 3unity-winbugs found thanks to projects added to Unity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions