v0.2.2

cue-lang/cue Released

A release of CUE OSS · its page on GitHub

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 limitation29fa119
  • cmd/cue/cmdinclude tool and test files in fixab43a15
  • cmd/cue/cmdinclude unexported constants for get go94db2eb

cue8

  • cue/astallow use of Embed in NewStructf0f62b8
  • cue/astfix typo10fbc21
  • cue/errorsdon't equate error messages without line infoa20e1d4
  • cue/gen.gofix bug in generation.0ccdee2
  • cueadd test cases1784fca
  • cueallow Value to be set at any path in Fill097cf16
  • cueprint hex numbers correctly8f07f84
  • cuereturn empty struct for disallowed unificationed61df2

encoding4

  • encoding/openapidate-time & string formatecfbd72
  • encoding/openapifix generation bug in CRD path616d9e8
  • encoding/openapiupdate testsd3c0096
  • encoding/yamlfix bug where an empty document is not treated as nullc615c91

internal3

  • internal/cuetxtaradd Load function16a2b89
  • internal/cuetxtarallow CUE_UPDATE env variable.97b215f
  • internaladd ToStruct helper.8a0ac3e

Other4

  • doc/ref/spec.mdalternative definitions for closedness and friends21ca371
  • featadd completion command9ebfa80
  • pkg/encoding/yamlvalidate concreteness instead of instance of for Validate57f8242
  • pkg/stringsadd SliceRunesf01cfc5

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

PlatformFile and SHA-256
macOS, Intelcue_0.2.2_Darwin_x86_64.tar.gzd782602b0387d19cb004eab90b47d51bb207007396450153af751ce7581228be
Linux, Arm64cue_0.2.2_Linux_arm64.tar.gz9bf889f511a0fd0f0f70c18827b1c0732ab4b01da22b402c432c00dcc6206a8a
Linux, x86-64cue_0.2.2_Linux_x86_64.tar.gz810851e0e7d38192a6d0e09a6fa89ab5ff526ce29c9741f697995601edccb134
Windows, x86-64cue_0.2.2_Windows_x86_64.zip062d17ea61eec8065af02433277ef42833fc8f139202c5743c31bcf316c0431a

SHA-256 checksums for all of these: checksums.txt

Install CUE