-
Notifications
You must be signed in to change notification settings - Fork 171
cmd/cue: get go misses an embed? #848
Comments
I think the issue is likely around here: https://github.com/cuelang/cue/blob/master/cmd/cue/cmd/get_go.go#L1010 because the original source crosses package boundaries (i.e. requires an import) Not sure if the (lack of) Go struct tags is playing into this... I'm curious about the sibling
So perhaps it is because the original source lacks the struct tag for |
Firstly, it would be helpful to have a full repro in cases like this to ensure anyone looking at this problem is looking at exactly the same types etc. Reason being, we're talking about a Go dependency here, hence we might be looking at subtly different versions of that dependency. The wiki gives details on how to provide such reproducers. For example, my attempt to repro this involved constructing a
This resulted in:
At which point I then ran:
which gave me:
which is what I believe we are talking about here.
I'm not entirely clear what you mean here, but I assume this is a reference to the fact that the generated CUE for
This appears to be working as documented, from
In this case neither field is marked with |
Despite having marked this as "working as intended", this issue does raise a broader point that I discussed with Marcel some time ago. Namely what semantics should |
In this case, based on how the YAML looks and the desire to |
This issue has been migrated to cue-lang/cue#848. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
What version of CUE are you using (
cue version
)?What did you do?
What did you expect to see?
A working Kustomize ConfigMapGenerator
c.f. https://cuelang.org/play/?id=d_RzGK2DVVt#cue@export@cue
The issue is that
cue get go
pulled in the (go) embeddedtypes.ConfigMapArgs
as an explicit sub-struct, when it should be an embedded definitionThe text was updated successfully, but these errors were encountered: