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

"field not allowed" regression in evalv3 when duplicating definitions #3641

Open
mvdan opened this issue Dec 31, 2024 · 0 comments
Open

"field not allowed" regression in evalv3 when duplicating definitions #3641

mvdan opened this issue Dec 31, 2024 · 0 comments
Labels
closedness evaluator evalv3 issues affecting only the evaluator version 3

Comments

@mvdan
Copy link
Member

mvdan commented Dec 31, 2024

# With the old evaluator.
env CUE_EXPERIMENT=evalv3=0
exec cue vet -c

# With the new evaluator.
env CUE_EXPERIMENT=evalv3=1
exec cue vet -c

-- input.cue --
package p

#Context1: ctx: {}
#Context2: ctx: {}

#Config1: cfg: #Context1
#Config2: cfg: #Context2

#Schema: sch: #Config1

#Config: #Config1 & #Config2

let config = #Config
out: #Schema & {
	sch: config
}

As of 46fc54a:

# With the old evaluator. (0.010s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue vet -c
# With the new evaluator. (0.029s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue vet -c
[stderr]
out.sch.cfg.ctx: field not allowed:
    ./input.cue:7:16
    ./input.cue:3:12
[exit status 1]

Note that deduplicating either the Context or Config schemas, which should be a no-op, fixes this issue. So it seems like something is broken with the new evaluator.

Perhaps this is the same underlying issue as #3639, although we haven't reduced that one yet.

@mvdan mvdan added closedness evaluator evalv3 issues affecting only the evaluator version 3 labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closedness evaluator evalv3 issues affecting only the evaluator version 3
Projects
None yet
Development

No branches or pull requests

1 participant