"field ... not allowed" error #481
Replies: 4 comments 3 replies
-
This looks like a bug to me @powerduncan. Please can you re-raise this as an issue? (apologies, GitHub discussions is still in beta and the "convert discussion to issue" feature has not landed yet). Thanks |
Beta Was this translation helpful? Give feedback.
-
I have a fix almost ready that will fix this, hopefully by tomorrow. |
Beta Was this translation helpful? Give feedback.
-
See https://cue-review.googlesource.com/c/cue/+/7002. This fixes this issue. |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#481. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
-
I've been struggling with a confusing "field ... not allowed" error. I think I've gotten it down to a minimal(-ish) reproduction, in that just about any change results in a successful evaluation, but I can't figure out why:
Changes from this state that result in completely unexplained success:
out: { instance }
out
to simplyout: instance
(rather than using an embedding)alpha
,bravo
, andcharlie
(overkill, sure, but just to be safe, I checked the removal of each independently, keeping the rest of the sequence intact:alpha?: bravo?: bool
,alpha?: charlie?: bool
, etc.)I have identified two other changes that also result in a successful evaluation. I understand these both to eliminate the effect of the "closed-ness" of
#Root
, but that doesn't quite make sense to me as I thought that...
was supposed to keep the struct open.#Root
toRoot
#Root
, instead of unifying with it (i.e.,#Type: { #Root, alpha?: ... }
)Interestingly, adding
delta
to the chain (alpha?: bravo?: charlie?: delta?: bool
, etc.), changes the error slightly:Any help in shining light on the problem would be much appreciated! (And my apologies if I am simply missing something obvious...)
Beta Was this translation helpful? Give feedback.
All reactions