v0.2.2
This is the last release before commencing the move to the new evaluator.
Backwards incompatible changes
yaml.Validate
This now uses Unification again. This brings it in line with the json package.
This change was done to facilitate moving to the new evaluator. This seems no longer necessary. Either way, using subsumption for validation seems wrong. It is better if the desired validation can be specified in the language itself.
Language feature support override
This is the last version that supports :: under the hood and the last release that will allow moving from :: to new-style definitions using cue fix. The cue tool now supports the CUE_SYNTAX_OVERRIDE environment variable to specify the features to allow at a specific version. So even though this feature disallows :: by default, it can be allowed again by setting this environment variable to v0.1.0, for instance.
This will not re-enable features that have been permanently removed.
OpenAPI fixes
OpenAPI is not always compatible with JSON Schema. For instance, it may use an older version. CUE used the new interpretation of exclusive ranges, whereas OpenAPI v3.0.0 and before required the old interpretation. Both interpretations are now supported and are switched based on the selected version (an API feature).
cue completion
This release exposes the Cobra command completion feature. This is currently only tested for bash and is known to not work, for instance, for Fish.
cue get go
This will now generate unexported constants using the _# prefix.
API
Fill
Now allows a cue.Value to be set anywhere in a Go value.
Builtins
list.SliceRunes
Allow slicing of strings per rune.
Embedding in NewStruct
Added ast.Embed helper to specify embeddings in ast.NewStruct.
Testing
Most txtar-based tests now support the CUE_UPDATE environment variable for updating tests. This allows running
CUE_UPDATE=1 go test ./...to update all these tests at once. It is not possible to use the --update flag for a bulk update, because not all tests implement it, causing such tests to fail.
All changes
22 changesby area
cmd3
cmd/cue/cmdallow overriding syntax limitationcmd/cue/cmdinclude tool and test files in fixcmd/cue/cmdinclude unexported constants for get go
cue8
cue/astallow use of Embed in NewStructcue/astfix typocue/errorsdon't equate error messages without line infocue/gen.gofix bug in generation.cueadd test casescueallow Value to be set at any path in Fillcueprint hex numbers correctlycuereturn empty struct for disallowed unification
encoding4
encoding/openapidate-time & string formatencoding/openapifix generation bug in CRD pathencoding/openapiupdate testsencoding/yamlfix bug where an empty document is not treated as null
internal3
internal/cuetxtaradd Load functioninternal/cuetxtarallow CUE_UPDATE env variable.internaladd ToStruct helper.
Other4
doc/ref/spec.mdalternative definitions for closedness and friendsfeatadd completion commandpkg/encoding/yamlvalidate concreteness instead of instance of for Validatepkg/stringsadd SliceRunes
Downloads
Every file this release published on GitHub, with its SHA-256. Most people install CUE as Installing CUE describes, which also shows how to check a download.
Archives
| Platform | File and SHA-256 |
|---|---|
| macOS, Intel | cue_d782602b0387d19cb004eab90b47d51bb207007396450153af751ce7581228be |
| Linux, Arm64 | cue_9bf889f511a0fd0f0f70c18827b1c0732ab4b01da22b402c432c00dcc6206a8a |
| Linux, x86-64 | cue_810851e0e7d38192a6d0e09a6fa89ab5ff526ce29c9741f697995601edccb134 |
| Windows, x86-64 | cue_062d17ea61eec8065af02433277ef42833fc8f139202c5743c31bcf316c0431a |
SHA-256 checksums for all of these: checksums.txt