Replies: 1 comment 6 replies
-
Original reply by @myitcv in cuelang/cue#845 (comment) Referencing a definition recursively closes it (spec). Embedding a definition (which involves referencing a definition) disregards closedness for the purposes of embedding, but the enclosing struct is recursively closed as a result (spec). As written, there is no difference however.
Please can you raise an issue for any problem you are seeing? I'm not aware of what you are referring to specifically (and we should have issues tracking these sorts of things) |
Beta Was this translation helpful? Give feedback.
-
Originally opened by @verdverm in cuelang/cue#845
Given the following, is there a meaningful difference from preventing incorrect values or extra fields w.r.t. the
n
field?They seem to be enforcing the same constraints. I suspect that the outer definition closes the innerards so I get an equivalent outcome. Inline is less ideal because we'd like to capture some common schema.
The context of this question is using Embed as a temporary and "correct enough" work around for the TBD Structural Sharing that is causing significant runtime increase with series of nested Conjuncts (i.e.
#SchemaConj
pattern repeated for multiple nesting levels).Beta Was this translation helpful? Give feedback.
All reactions