v0.4.2
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:
_: 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 taskscmd/cueadd newline between imported objectscmd/cuefix spurious errorscmd/cue/cmdremove stale reference to ::
doc3
doc/ref/spec.mdclarify scope of top-level let IDdoc/tutorialfix typo in 55_defs.txtdocfix heading level for div et al builtins
internal4
internal/coredisallow_as field labelinternal/core/evaldereference indirections earlierinternal/core/adtzero-value feature means "invalid"internal/core/adtsingle place for inserting matched patterns
pkg4
pkg/encoding/jsonimplement UnmarshalStreampkg/encoding/yamlimplement UnmarshalStreampkg/tool/fileadd Mkdir, MkdirAllpkg/tool/fileadd Mkdir, MkdirAll
Other6
tools/trimprevent nil-pointer panicencoing/jsonmade independent of pkg/encoding/jsoncue/astfix typo in docstringallprepare for private repository support in unity- Revert "pkg/tool/file: add Mkdir, MkdirAll"
- **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
| Platform | File and SHA-256 |
|---|---|
| macOS, Intel | cue_3da1576d36950c64acb7d7a7b80f34e5935ac76b9ff607517981eef44a88a31b |
| macOS, Apple silicon | cue_21fcfbe52beff7bae510bb6267fe33a5785039bd7d5f32e3c3222c55580dd85c |
| Linux, x86-64 | cue_d43cf77e54f42619d270b8e4c1836aec87304daf243449c503251e6943f7466a |
| Linux, Arm64 | cue_6515c1f1b6fc09d083be533019416b28abd91e5cdd8ef53cd0719a4b4b0cd1c7 |
| Windows, x86-64 | cue_95be4cd6b04b6c729f4f85a551280378d8939773c2eaecd79c70f907b5cae847 |
| Windows, Arm64 | cue_e03325656ca20d464307f68e3070d774af37e5777156ae983e166d7d7aed60df |
SHA-256 checksums for all of these: checksums.txt