Closed
Description
# 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.