-
Notifications
You must be signed in to change notification settings - Fork 329
Closed
Labels
modulesIssues related to CUE modules and the experimental implementationIssues related to CUE modules and the experimental implementation
Description
$ cue version
cue version v0.9.0-alpha.4.0.20240514085722-e9bf33c50d3f
go version devel go1.23-7f9edb4225 2024-05-11 20:38:24 +0000
-buildmode exe
-compiler gc
-ldflags -w -s
DefaultGODEBUG asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0
CGO_ENABLED 1
GOARCH amd64
GOOS linux
GOAMD64 v1
cue.lang.version v0.9.0
$ cat repro-cmd.txtar
exec cue export valid.cue
cmp stdout stdout.golden
env CUE_EXPERIMENT=modules
exec cue export valid.cue
cmp stdout stdout.golden
-- stdout.golden --
{
"out": "bar"
}
-- cue.mod/module.cue --
module: "foo.test/bar"
language: version: "v0.9.0"
-- valid.cue --
#foo: "bar"
out: #foo
-- invalid.cue --
foo :: "bar"
out: foo
$ testscript -v repro-cmd.txtar
[...]
> exec cue export valid.cue
[stdout]
{
"out": "bar"
}
> cmp stdout stdout.golden
> env CUE_EXPERIMENT=modules
> exec cue export valid.cue
[stderr]
instance: cannot enumerate all module imports: cannot read "invalid.cue": expected operand, found ':'
[exit status 1]
FAIL: /tmp/testscript2634378284/repro-cmd.txtar/script.txtar:6: unexpected command failure
error running repro-cmd.txtar in /tmp/testscript2634378284/repro-cmd.txtar
This appears to be some sort of bug in cmd/cue or cue/load - when naming a single file to load, we shouldn't be parsing other files in the same directory at all. This regression was spotted via Unity.
Metadata
Metadata
Assignees
Labels
modulesIssues related to CUE modules and the experimental implementationIssues related to CUE modules and the experimental implementation
Type
Projects
Status
Done