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

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

Open
mvdan opened this issue Oct 23, 2024 · 0 comments
Open

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

mvdan opened this issue Oct 23, 2024 · 0 comments

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant