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
We have just officially deprecated FieldByName. Hidden fields are tricky, as they are scoped by package, pretty much like Go's non-exported names. So FieldByName was broken for that purpose.
Really the only thing you'll need for looking up fields is LookupPath.
E.g. v.LookupPath(cue.MakePath(cue.Hid("_schema", "_"))).
This API will allow looking up hidden fields related to any of the packages.
Note that the Iterator interface is broken too in that regard. We should implement Selector, instead of Label, to be accurate.
The API is currently being reworked to use the Path/Selector approach, which is nice, much more powerful, and prepares for the CUE query extension (#165 ).
Originally opened by @rawkode in cuelang/cue#880
What version of CUE are you using (
cue version
)?0.3.0
Does this issue reproduce with the latest release?
FieldByName
has a second parameter, a bool; which according to the comments should allow us to get a hidden field or definition.The text was updated successfully, but these errors were encountered: