Tags: varomodt/cue
Tags
internal/core/eval: handle embedded top correctly Other basic types were already correctly handled, but top slipped through the maze. Uncovered while debugging Issue cuelang#758 Change-Id: Iee99e0a0c5e8c1a7b2faa02b484c64f0e549391f Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8707 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
internal/core/adt: "fix" disjunction resolution The recent performance improvement eliminated disjuncts too aggressively, causing some disjuncts to disappear. Early elimination prevents exponential blowup, but of course it should not make it incorrect. Note that for most common uses, like protobuf and K8s structs with discriminator fields, special optimizations exist that make this linear. But this has not been implemented yet. Now this fix exposed another bug. This bug was deliberate to work around a limitation of default values when representing oneOf fields. We planned to introduce a "required field" annotation which would also allow to represent these kind of semantics much more elegantly. For now, though, we are stuck in a position that more than one oneOf field cannot be represented properly with defaults. We fix it for now in an even more AWFUL way, and instead work towards a proper solution based on required fields. Issue cuelang#726 Change-Id: Id4bcd0445612e12fba48a744654de4e1852c552e Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8641 Reviewed-by: Paul Jolly <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
internal/core/adt: fix performance issue with disjunctions Fixes a performance TODO, which was a deliberate regression to deal with a semantic bug. Fixes cuelang#651 Change-Id: I9d95dc9d250064e79552425331912f58175cc094 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8282 Reviewed-by: Marcel van Lohuizen <[email protected]>
internal/core/adt: fix regression in close builtin Would in some cases recursively close. Now uses just one method for marking closedness. Marking Closed in the Vertex was only used so that the debug printer would show the closed status. This has now fixed. This was not possible before but is now as the code was recently simplified. Fixes cuelang#642 Change-Id: I9aab6a02f36ddbc8ed9bce356a2f4ad77cd30cda Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8228 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
internal/core/adt: catch errors for circular failures This mechansim can ultimately also be used for communicating any change that makes a Vertex more specific. Change-Id: Ia5d86fd4cc7da53290998aa5e08de12a474ec440 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8113 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
internal/core/eval: keep semantics for [K]: T We were contemplating to redefine [string]: T to be JSON Schema semantics. For this purpose, tool fix rewrote it into a form that means the same in both interpretations. In the end, the original CUE semantics seem useful enough to keep with the benefit of not breaking people. We now anticipate to add the JSON semantics using the notation: `[...K]: V`. With this approach, any additional fields are always indicated with `...`. Change-Id: I09dd4cd0bedc87917a29edba959e30a7b22cac5e Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7906 Reviewed-by: Marcel van Lohuizen <[email protected]> Reviewed-by: CUE cueckoo <[email protected]>
internal/core/export: dedup let clauses for merged structs Let deduping already existed, but it could miss cases where an identical let was added to the same scope, but originating from different conjuncts, where the let originated from the same struct. Fixes cuelang#593 Change-Id: I47c806096ba885421005dfb297ae700c1c734040 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7723 Reviewed-by: Marcel van Lohuizen <[email protected]> Reviewed-by: CUE cueckoo <[email protected]>
cue/parser: support string selector labels Allowed by the spec, but previously unimplemented. Change-Id: I2fb7aad303cdfac8862a0744b80d524cb749f5b3 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7342 Reviewed-by: Marcel van Lohuizen <[email protected]> Reviewed-by: CUE cueckoo <[email protected]>
internal/core/adt: exclude definitions in data conversion Definitions incorrectly trigger closedness for sub structures. They also don't belong in data. IMPORTANT: this implies that it is no longer possible to refer to definitions from within tool files. As a workaround we will allow it still for single-instance commands. Fixes cuelang#525 Change-Id: I481dd16e7cacb1096f68d446ce1c5349b5cd4531 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7143 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
cue/load: relax places where @tag is allowed Currently @tag can already be arbitrarily nested. This now also allows embeddings. It now explicitly disallows fields defined within lists or the scope of an optional field in the help. It also reports an error for invalid tag attributes. These restrictions avoid an injection from being spread to widely by being generated, which may increase the ability to analyze a configuration. But if these restrictions prove to be too cumbersome, they could be removed. Closes cuelang#437 Change-Id: I3af3a49adb20e67fcce7c6693d40bfd14aa8eb0b Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7082 Reviewed-by: Marcel van Lohuizen <[email protected]>
PreviousNext