v0.4.2-rc.1
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-rc.1
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-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
| Platform | File and SHA-256 |
|---|---|
| macOS, Intel | cue_3e57ed01bf505c9b97a5fc3e501b0e6efb0eb929a059e6d2407f2e841bc7bb4f |
| macOS, Apple silicon | cue_121cfb452bfa2aed783c55ad677d528f74fb539fc2f14ab9e02120907dc9bd0e |
| Linux, x86-64 | cue_c014c92dd43bc9df67d10bab50ee6bfd573e660e315f2a7a1424e2124b6acf6d |
| Linux, Arm64 | cue_bb5b9571a8a2d589b3ba619461c9c00f228eca379439f3b6a5c8f25d5617c03f |
| Windows, x86-64 | cue_924d838b43f508bca726ac1c1b78eb8a9b8963f705e015aa1e554625101cfb45 |
| Windows, Arm64 | cue_3d75b80466d802ec76d45470ac70e5d072bcd60e3b56c4edd6a5e750e94db54c |
SHA-256 checksums for all of these: checksums.txt