You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A slightly shorter reproducer, which shows the success on v0.4.3 and failure on v0.5.0-rc.1:
exec go get cuelang.org/go@v0.4.3
exec go mod tidy
exec go run main.go
! stdout .
exec go get cuelang.org/go@v0.5.0-rc.1
exec go mod tidy
exec go run main.go
! stdout .
-- main.go --
package main
import (
"fmt"
"cuelang.org/go/cue"
"cuelang.org/go/cue/cuecontext"
"cuelang.org/go/cue/errors"
)
func main() {
ctx := cuecontext.New()
schema := ctx.CompileString(`
#T: {}
`).LookupPath(cue.MakePath(cue.Def("#T")))
data := ctx.CompileString(`
let foobar = {}
_use: foobar
`)
fmt.Println(errors.Details(schema.Unify(data).Err(), nil))
}
-- go.mod --
module test
go 1.19
$ testscript -v -e GOMODCACHE=$(go env GOMODCACHE) repro-go.txtar
> exec go get cuelang.org/go@v0.4.3
> exec go mod tidy
> exec go run main.go
[stdout]
> ! stdout .
> exec go get cuelang.org/go@v0.5.0-rc.1
> exec go mod tidy
> exec go run main.go
[stdout]
#T: field not allowed: foobar
> ! stdout .
FAIL: /tmp/testscript2657663051/repro-go.txtar/script.txtar:9: unexpected match for `.` found in stdout: #
error running repro-go.txtar in /tmp/testscript2657663051/repro-go.txtar
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
No.
What did you do?
What did you expect to see?
No errors.
What did you see instead?
The text was updated successfully, but these errors were encountered: