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, 1374dc9 fixes some subtle bugs where fields can be missed if patterns are inserted too late.
0aaf4c6 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
. #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 aaf6e84 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). 04812bf disables schema checking for now whilst we consider a more precise solution.
Builtins
Both pkg/encoding/yaml
and pkg/encoding/json
now support UnmarshalStream
.
Changelog
- 6bc922c tools/trim: prevent nil-pointer panic
- 9aeaf70 pkg/encoding/json: implement UnmarshalStream
- 480b28b pkg/encoding/yaml: implement UnmarshalStream
- 880863a encoing/json: made independent of pkg/encoding/json
- 802a852 cmd/cue/cmd: only consider "kind" field for known tasks
- bd3b6ea cmd/cue: add newline between imported objects
- 04812bf cmd/cue: fix spurious errors
- 2fe5251 doc/ref/spec.md: clarify scope of top-level let ID
- 556f57f doc/tutorial: fix typo in 55_defs.txt
- f0d03f3 cue/ast: fix typo in docstring
- f29b460 cmd/cue/cmd: remove stale reference to ::
- 50d69c9 all: prepare for private repository support in unity
- 5581d64 doc: fix heading level for div et al builtins
- 45c54f8 pkg/tool/file: add Mkdir, MkdirAll
- 34c4f9c Revert "pkg/tool/file: add Mkdir, MkdirAll"
- 23cc102 pkg/tool/file: add Mkdir, MkdirAll
- 0aaf4c6 internal/core: disallow
_
as field label - c1bf550 internal/core/eval: dereference indirections earlier
- 9f6a40e internal/core/adt: zero-value feature means "invalid"
- 1374dc9 internal/core/adt: single place for inserting matched patterns
Full Changelog: v0.4.1...v0.4.2
Docker images
docker pull docker.io/cuelang/cue:0.4.2