Skip to content

evalv3 regression involving embeddings and unifying extra fields #3834

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 Mar 20, 2025 · 0 comments
Closed

evalv3 regression involving embeddings and unifying extra fields #3834

mvdan opened this issue Mar 20, 2025 · 0 comments
Assignees
Labels
evaluator evalv3 issues affecting only the evaluator version 3

Comments

@mvdan
Copy link
Member

mvdan commented Mar 20, 2025

# -- evalv2 --
env CUE_EXPERIMENT=evalv3=0
exec cue export out.cue
stdout 'out.*true'

# -- evalv3 openinline=1 --
env CUE_EXPERIMENT=evalv3=1
env CUE_DEBUG=openinline=1
exec cue export out.cue
stdout 'out.*true'

# -- evalv3 openinline=0 --
env CUE_EXPERIMENT=evalv3=1
env CUE_DEBUG=openinline=0
exec cue export out.cue
stdout 'out.*true'

-- out.cue --
#Foo: {
	_data: Foo: true
	_data: _ | close({Extra!: optional?: _})

	_dataWithExtra: _data & {Extra: {}}

	out: _dataWithExtra.Extra != _|_
}

{#Foo}

As of e311d45, evalv2 prints out: true, but evalv3 with or without openinline prints out: false:

# -- evalv2 -- (0.011s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export out.cue
[stdout]
{
    "out": true
}
> stdout 'out.*true'
# -- evalv3 openinline=1 -- (0.023s)
> env CUE_EXPERIMENT=evalv3=1
> env CUE_DEBUG=openinline=1
> exec cue export out.cue
[stdout]
{
    "out": false
}
> stdout 'out.*true'
FAIL: repro-evalv3.txtar:10: no match for `out.*true` found in stdout
# -- evalv3 openinline=0 -- (0.022s)
> env CUE_EXPERIMENT=evalv3=1
> env CUE_DEBUG=openinline=0
> exec cue export out.cue
[stdout]
{
    "out": false
}
> stdout 'out.*true'
FAIL: repro-evalv3.txtar:16: no match for `out.*true` found in stdout

Reduced with @myitcv from an original reproducer that was related to openinline. We found an underlying regression unrelated to the use of openinline.

@mvdan mvdan added evaluator evalv3 issues affecting only the evaluator version 3 labels Mar 20, 2025
cueckoo pushed a commit that referenced this issue Mar 21, 2025
Issue #3834

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I9bdaa8c4f901db4417e044ab5ca45bc2a97336f1
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211932
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
cueckoo pushed a commit that referenced this issue Mar 21, 2025
Embeddings are tested for closedness within the
embedding. There is code in V2 that relies on this
behavior in a nested fashion. This change handles
that.

Note that the output of bulk.txtar has changed.
This change seems correct for evalv3. Note that
`output` is defined a [for x in input {x}]. We
should therefore expect that output is as input.
In V3 this is the case, in V2 output has an
unresolved disjunction.

Note that although this fixes the mentioned issue,
there are some related cases that are still open.
We therefore refrain from closing the issue.

Issue #3834

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I0d8d6660cfd08d763870964e65ec573720d3d99d
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211935
Reviewed-by: Daniel Martí <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
@mpvl mpvl self-assigned this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluator evalv3 issues affecting only the evaluator version 3
Projects
None yet
Development

No branches or pull requests

2 participants