Open cueckoo opened 3 years ago
Original reply by @myitcv in https://github.com/cuelang/cue/issues/648#issuecomment-782089553
Another good test case here is https://github.com/goreleaser/goreleaser/discussions/2065
still a problem with v0.5.0-beta.2
cue get go github.com/helmfile/helmfile/pkg/helmexec
cue def github.com/helmfile/helmfile/pkg/helmexec
builtin package "io" undefined:
./cue.mod/gen/github.com/helmfile/helmfile/pkg/helmexec/context_go_gen.cue:7:8
cue.mod/gen/io/
to cue.mod/pkg/golang.org/pkg/io/
cue.mod/gen/github.com/helmfile/helmfile/pkg/helmexec/
to cue.mod/pkg/github.com/helmfile/helmfile/pkg/helmexec/
cue.mod/pkg/github.com/helmfile/helmfile/pkg/helmexec/context_go_gen.cue
import "io"
import "golang.org/pkg/io"
Multiple duplicates of this issue have been filed, so in the hopes of making this issue more discoverable, I've given it a slightly more specific title.
Dropping the now-defunct v0.4.x milestone from this issue, but leaving the zGarden
label such that we come round to considering what milestone this should sit in.
Per offline discussion with @mpvl, Go standard library packages need to mapped to a domain-qualified module path. Perhaps something like
golang.org/pkg/io
etc.
Or pkg.go.dev/io
?
Are we getting any closer to resolving this issue?
I've run into a similar issue relative to sigstore.
$ cue eval
builtin package "reflect" undefined:
./cue.mod/gen/github.com/sigstore/k8s-manifest-sigstore/pkg/util/mapnode/node_go_gen.cue:7:8
I've just ran into the same issue importing the cilium api with cue get go github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2
builtin package "reflect" undefined:
./cue.mod/gen/github.com/go-openapi/strfmt/format_go_gen.cue:7:8
I've run into this tying to get the Kyverno schema. Fails with same sigstore error as @bradbeck but adding it here for searchability.
go get github.com/kyverno/kyverno/api/kyverno/v1
cue get go github.com/kyverno/kyverno/api/kyverno/v1
builtin package "reflect" undefined:
./cue.mod/gen/github.com/sigstore/k8s-manifest-sigstore/pkg/util/mapnode/node_go_gen.cue:7:8
# but also:
builtin package "internal/abi" undefined:
./cue.mod/gen/pkg.go.dev/pkg/reflect/type_go_gen.cue:18:8
I was able to use @sjwl 's workaround. But I feel like that's going to blow up in my face one day :)
Originally opened by @myitcv in https://github.com/cuelang/cue/issues/648
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
Success.
What did you see instead?
Per offline discussion with @mpvl, Go standard library packages need to mapped to a domain-qualified module path. Perhaps something like
golang.org/pkg/io
etc.