github cue-lang/cue v0.0.13
Streamlining embedding semantics

latest releases: v0.11.0-rc.1, v0.11.0-alpha.5, v0.11.0-alpha.4...
3 years ago

This release introduces two changes that may break existing configurations. One is really a bug fix relative to the spec.
These changes were not included in v0.0.12 to allow some of the bug fixes of the latter release
to be available before introducing these changes.

Top-level "emit" structs are embedded

Previously, a top-level embedded struct had different semantics from embedded structs within structs itself.
For instance, this configuration

{ 
  a: 3
}
b: 3

would previously yield { a: 3 }, but will now yield { a: 3, b: 3 }.
This semantics was a leftover from before CUE supported embedding.
But keeping this around was just too confusing.

Other values, like lists or strings retain their original semantics.
However, for consistency sake, these may only be accompanied by definitions.

So previously this was allowed

"Hello \(who)!"

who: "World"

but must now be

"Hello \(who)!"

who :: "World"

Failing Definitions are an error

Previously a definition was, unlike a normal field, not an error.
This was not according to the spec and this has now been rectified.
To allow a definition to fail, make it optional (using a `?).

Changelog

a3c7bef cue: change emit value semantics
3022ae9 cue: fail if non-optional definitions are bottom
0d0b9ad doc/ref/spec.md: add newline before comments

Don't miss a new cue release

NewReleases is sending notifications on new releases.