Skip to content

eval: error messages mention definition with evalv3 #3864

Closed
@myitcv

Description

@myitcv

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

$ cue version
cue version v0.13.0-alpha.3

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

Does this issue reproduce with the latest release?

Yes

What did you do?

# -- evalv2 --
env CUE_EXPERIMENT=evalv3=0
! exec cue export x.cue --out yaml
stderr 'config.serviceB.metadata.name: incomplete value string'

# -- evalv3 - CUE_DEBUG=sharing=0 --
env CUE_EXPERIMENT=evalv3=1
env CUE_DEBUG=sharing=0
! exec cue export x.cue --out yaml
stderr 'config.serviceB.metadata.name: incomplete value string'

# -- evalv3 - CUE_DEBUG=sharing=1 --
env CUE_EXPERIMENT=evalv3=1
env CUE_DEBUG=sharing=1
! exec cue export x.cue --out yaml
stderr 'config.serviceB.metadata.name: incomplete value string'

-- x.cue --
#Metadata: {
	name:      string
	namespace: string
}

#BaseConfig: {
	metadata: #Metadata
}

#Config: {
	metadata: #Metadata

	serviceA: #BaseConfig & {
		metadata: metadata
	}

	serviceB: #BaseConfig & {
		metadata: metadata
	}
}

config: #Config & {
	metadata: {
		name:      "test"
		namespace: "dev"
	}
}

What did you expect to see?

Passing test.

What did you see instead?

# -- evalv2 -- (0.010s)
# -- evalv3 - CUE_DEBUG=sharing=0 -- (0.037s)
# -- evalv3 - CUE_DEBUG=sharing=1 -- (0.030s)
> env CUE_EXPERIMENT=evalv3=1
> env CUE_DEBUG=sharing=1
> ! exec cue export x.cue --out yaml
[stderr]
#Metadata.name: incomplete value string:
    ./x.cue:2:13
#Metadata.namespace: incomplete value string:
    ./x.cue:3:13
[exit status 1]
> stderr 'config.serviceB.metadata.name: incomplete value string'
FAIL: repro.txtar:16: no match for `config.serviceB.metadata.name: incomplete value string` found in stderr
failed run

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions