Skip to content

evalv3: "field not allowed" regression with hidden field #3535

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 Oct 23, 2024 · 0 comments
Closed

evalv3: "field not allowed" regression with hidden field #3535

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

Comments

@mvdan
Copy link
Member

mvdan commented Oct 23, 2024

env CUE_EXPERIMENT=evalv3=0
exec cue export

env CUE_EXPERIMENT=evalv3=1
exec cue export

-- input.cue --
package p

#Component: {
	kind: string
	output: {}
}

foo: #Component & {
	kind: string
	if kind == "foo" {
		_hidden: {}
	}
}

foo: kind: "foo"

as of `62b21c8c44e84ca6b45224562298b1102b825766:

> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "foo": {
        "kind": "foo",
        "output": {}
    }
}
> env CUE_EXPERIMENT=evalv3=1
> exec cue export
[stderr]
foo._hidden: field not allowed:
    ./input.cue:11:12
    ./input.cue:11:3
[exit status 1]
FAIL: ../repro-evalv3.txtar:5: unexpected command failure

This definitely seems wrong - hidden fields should not be affected by closedness.

@mvdan mvdan added Triage Requires triage/attention closedness and removed Triage Requires triage/attention labels Oct 23, 2024
@cueckoo cueckoo closed this as completed in 698da05 Dec 4, 2024
@mvdan mvdan added evalv3 issues affecting only the evaluator version 3 evaluator labels Dec 10, 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