v0.4.2-rc.1

cue-lang/cue Pre-release 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-rc.1

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-rc.1

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-rc.1_darwin_amd64.tar.gz3e57ed01bf505c9b97a5fc3e501b0e6efb0eb929a059e6d2407f2e841bc7bb4f
macOS, Apple siliconcue_v0.4.2-rc.1_darwin_arm64.tar.gz121cfb452bfa2aed783c55ad677d528f74fb539fc2f14ab9e02120907dc9bd0e
Linux, x86-64cue_v0.4.2-rc.1_linux_amd64.tar.gzc014c92dd43bc9df67d10bab50ee6bfd573e660e315f2a7a1424e2124b6acf6d
Linux, Arm64cue_v0.4.2-rc.1_linux_arm64.tar.gzbb5b9571a8a2d589b3ba619461c9c00f228eca379439f3b6a5c8f25d5617c03f
Windows, x86-64cue_v0.4.2-rc.1_windows_amd64.zip924d838b43f508bca726ac1c1b78eb8a9b8963f705e015aa1e554625101cfb45
Windows, Arm64cue_v0.4.2-rc.1_windows_arm64.zip3d75b80466d802ec76d45470ac70e5d072bcd60e3b56c4edd6a5e750e94db54c

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

Install CUE