v0.4.2

cue-lang/cue Released

A release of CUE OSS · its page on GitHub

This patch release largely focuses on bug fixes, but also includes some additions to the cmd/cue cmd tooling layer and builtins. Some of the bug fixes were identified as part of preparing for an upcoming CUE talk at FOSDEM.

Thank you to @brandonbloom, @eonpatapon, @obowersa and @seh for contributing to this release!

Core evaluator

A number of bug fixes relating to edge cases of CUE evaluation. Notably, 1374dc99007937166e204302792df34c46138df0 fixes some subtle bugs where fields can be missed if patterns are inserted too late.

0aaf4c69be6394bcb20c0a659382f48b9cffec33 disallows _ as a field label, fixing a bug where the following CUE was previously accepted as valid:

cue
_: 5

This now results in:

cannot use _ as label:
    ./x.cue:1:1

Tooling layer (cmd/cue cmd)

@eonpatapon added Mkdir, MkdirAll to pkg/tool/file. https://github.com/cue-lang/cue/issues/1502 was raised as a follow-up, a wider review of how the pkg/… API needs to change pre v1.

Spec

@seh contributed to the “Declarations and scope” section, clarifying that top-level let identifiers are scoped to the containing file block.

cmd/cue

@slewiskelly highlighted a regression introduced as far back as aaf6e846d8450663dd4fd265021a969d02a2bf4e where cmd/cue is used to validate data using a schema. In this regression, CUE inadvertently marks the failures as “fatal”, instead of “incomplete” (that is, could be satisfied by making a value more concrete). 04812bfb515de3300ac21ca181542f8ea02c9ea1 disables schema checking for now whilst we consider a more precise solution.

Builtins

Both pkg/encoding/yaml and pkg/encoding/json now support UnmarshalStream.

Docker images

  • docker pull docker.io/cuelang/cue:0.4.2

All changes

21 changesby area

cmd4

  • cmd/cue/cmdonly consider "kind" field for known tasks802a852
  • cmd/cueadd newline between imported objectsbd3b6ea
  • cmd/cuefix spurious errors04812bf
  • cmd/cue/cmdremove stale reference to ::f29b460

doc3

  • doc/ref/spec.mdclarify scope of top-level let ID2fe5251
  • doc/tutorialfix typo in 55_defs.txt556f57f
  • docfix heading level for div et al builtins5581d64

internal4

  • internal/coredisallow _ as field label0aaf4c6
  • internal/core/evaldereference indirections earlierc1bf550
  • internal/core/adtzero-value feature means "invalid"9f6a40e
  • internal/core/adtsingle place for inserting matched patterns1374dc9

pkg4

  • pkg/encoding/jsonimplement UnmarshalStream9aeaf70
  • pkg/encoding/yamlimplement UnmarshalStream480b28b
  • pkg/tool/fileadd Mkdir, MkdirAll45c54f8
  • pkg/tool/fileadd Mkdir, MkdirAll23cc102

Other6

  • tools/trimprevent nil-pointer panic6bc922c
  • encoing/jsonmade independent of pkg/encoding/json880863a
  • cue/astfix typo in docstringf0d03f3
  • allprepare for private repository support in unity50d69c9
  • Revert "pkg/tool/file: add Mkdir, MkdirAll"34c4f9c
  • **Full Changelog**: https://github.com/cue-lang/cue/compare/v0.4.1...v0.4.2

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_v0.4.2_darwin_amd64.tar.gz3da1576d36950c64acb7d7a7b80f34e5935ac76b9ff607517981eef44a88a31b
macOS, Apple siliconcue_v0.4.2_darwin_arm64.tar.gz21fcfbe52beff7bae510bb6267fe33a5785039bd7d5f32e3c3222c55580dd85c
Linux, x86-64cue_v0.4.2_linux_amd64.tar.gzd43cf77e54f42619d270b8e4c1836aec87304daf243449c503251e6943f7466a
Linux, Arm64cue_v0.4.2_linux_arm64.tar.gz6515c1f1b6fc09d083be533019416b28abd91e5cdd8ef53cd0719a4b4b0cd1c7
Windows, x86-64cue_v0.4.2_windows_amd64.zip95be4cd6b04b6c729f4f85a551280378d8939773c2eaecd79c70f907b5cae847
Windows, Arm64cue_v0.4.2_windows_arm64.zipe03325656ca20d464307f68e3070d774af37e5777156ae983e166d7d7aed60df

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

Install CUE