Skip to content

evalv3 "non-concrete value _" regression compared to evalv2 #3875

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
MarcWort opened this issue Apr 3, 2025 · 1 comment
Closed

evalv3 "non-concrete value _" regression compared to evalv2 #3875

MarcWort opened this issue Apr 3, 2025 · 1 comment
Labels
evaluator evalv3 issues affecting only the evaluator version 3

Comments

@MarcWort
Copy link

MarcWort commented Apr 3, 2025

What version of CUE are you using (cue version)?

with eval3 on current master

~/github/cue/cue-c565c1d3 version                      
cue version v0.13.0-alpha.3

go version go1.24.1
      -buildmode exe
       -compiler gc
  DefaultGODEBUG gotestjsonbuildtext=1,multipathtcp=0,randseednop=0,rsa1024min=0,tlsmlkem=0,x509rsacrt=0,x509usepolicies=0
     CGO_ENABLED 1
          GOARCH amd64
            GOOS linux
         GOAMD64 v1
             vcs git
    vcs.revision c565c1d31f2920ec79219ab04699e68fd32af93b
        vcs.time 2025-03-31T13:58:15Z
    vcs.modified false
cue.lang.version v0.13.0

and with experimental eval3 on current stable release:

➜  ~ cue version                          
cue version v0.12.0

go version go1.23.5
      -buildmode exe
       -compiler gc
       -trimpath true
     CGO_ENABLED 0
          GOARCH amd64
            GOOS linux
         GOAMD64 v1
cue.lang.version v0.12.0

Does this issue reproduce with the latest stable release?

Yes, but only with CUE_EXPERIMENT=evalv3

What did you do?

Minimal reproducer

cd $(mktemp -d)
(
set -e
git clone https://github.com/MarcWort/example-cue.git
cd example-cue
git checkout default-string-empty
cue eval standalone.cue -o json:-
CUE_EXPERIMENT=evalv3 cue eval standalone.cue -o json:-
)

What did you expect to see?

No difference between the old and the new eval v3.

The summary field should not be empty or "non-concrete".

What did you see instead?

groups.one_rulegroup.rules.0.annotations.summary: invalid interpolation: non-concrete value _ (type _):
    ./standalone.cue:24:20

or if defining "" as summary default: (see line https://github.com/MarcWort/example-cue/blob/default-string-empty/standalone.cue#L46)

                    "alert": "Stage",
                    "annotations": {
                        "summary": ""
                    }
@MarcWort MarcWort added NeedsInvestigation Triage Requires triage/attention labels Apr 3, 2025
@mvdan
Copy link
Member

mvdan commented Apr 4, 2025

Reduced to the following:

# evalv2
env CUE_EXPERIMENT=evalv3=0
exec cue export

# evalv3
env CUE_EXPERIMENT=evalv3=1
exec cue export

-- input.cue --
package p

_global: name: "foo"

out: desc: {
	_hidden: _global.name
	name: _hidden
}
out: #Schema | "never"

#Schema: desc: {...}

As of c565c1d:

# evalv2 (0.009s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "out": {
        "desc": {
            "name": "foo"
        }
    }
}
# evalv3 (0.030s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue export
[stderr]
out.desc.name: incomplete value _
[exit status 1]

@mvdan mvdan added evaluator evalv3 issues affecting only the evaluator version 3 and removed NeedsInvestigation Triage Requires triage/attention labels Apr 4, 2025
@mvdan mvdan changed the title evalv3: invalid interpolation: non-concrete value _ (type _) evalv3 "non-concrete value _" regression compared to evalv2 Apr 4, 2025
cueckoo pushed a commit that referenced this issue Apr 16, 2025
Issue #3830
Issue #3875

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I8e9c3d3ecf225807deba217b22c2e96a3f687937
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1213569
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Matthew Sackman <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
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