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
cmd/cue: actually drop unsupported Go std types in get go
The Go logic fell through if altType returned nil,
meaning that we would try to generate and import Go std packages
as if they were CUE std packages, which does not work at all.
While here, move the extractor fields to clarify that pkg and consts
are per-package and not per-file, and declare a pkg variable which
simplifies the named type logic a bit and lets us see that a nil check
further down was redundant.
Some Go standard library packages may declare a structure
which can be imported as CUE correctly, and our thinking is that they
could be generated under a non-CUE-std namespace like
cue.mod/gen/pkg.go.dev/reflect rather than cue.mod/gen/reflect.
That is left for a future change in the form of TODOs in both
the testscript, which includes two such examples, and the code.
Fixes#648.
Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Ic2bd39a2024c76449978c44ae70dc75b65297314
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1210516
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
0 commit comments