v0.3.0-alpha5
This release is mainly focused on various bug fixes and error message improvements. This change also continues to factor out code from cmd/cue to make the functionality available outside of this tool.
Below is a selection of the fixes.
Although this is officially alpha, it is probably a more solid release to use than v0.2.2. For this reason the “Pre-release” tag has been left off from this release.
Language
Cycle handling
Various bugs related to cycle handing were fixed, including hangs and spurious detection of cycles.
Closing gaps with the specs
Hidden fields are now scoped per package.
Package pkg/sort
Sort now always uses stable so that reproducible outcomes between different compiles of CUE can be guaranteed.
API
cue.Path
The introduction of #-style definitions are not handled well by the old API. This is a consequence of them living in a separate namespace, which is not expressible in the old API.
The new cue.Path type is introduced to start addressing this. The first method that supports this is LookupPath.
This API is designed to be compatible with the planned query extension.
Package tools/flow
This new package allows arbitrary user-defined CUE schema to be interpreted as task definitions, automatically handling dependency analysis and scheduling tasks based on these dependencies.
This was written from scratch and makes use of a new native dependency analysis package, allowing for more precise analysis.
cue command
Go bridge
The translation of CUE to Go is now brought in line with Go’s encoding/json, fixing some bugs that caused the interpretation to differ.
cue cmd
This now uses the new tools/flow package, fixing a bunch of outstanding bugs. Most notably, it now allows dynamic task creation, for instance by using comprehension, and depending on such dynamic tasks: $after should now only be needed if there are really no dependencies at the CUE level.
All changes
39 changesby area
cue8
cue/errorscorrect handling of wrapping list errorscue/literalfix multiline quotescueallow access to Selectors of Pathcuedig up wrapped error in valueErrorcuedoc improvementscuegenerate error node rather than panic on faulty output.cueremove most uses of xerrorscuesupport getting and looking up paths
internal21
internal/core/compilefix mutual dependent let clausesinternal/core/convertfix for embedded structs are not honoredinternal/core/cuefix hang on cycles in embeddings in comprehensionsinternal/core/depfirst stab at precise dependency analyzerinternal/core/depsupport dynamic dependenciesinternal/core/evalfix bug in cycle handlinginternal/core/evalfix bug with nested embeded comprehensionsinternal/core/evalfix cycle bug for comprehensionsinternal/core/evalfix hang in cyclic in comprehension evaluationinternal/core/evalfix irregular dynamic fieldsinternal/core/evalfix spurious cycle detectioninternal/core/evalfix spurious cycle for bulk constraintsinternal/core/evalhandle disjunction failure more properlyinternal/core/evalre-allow ... with embeddingsinternal/core/evalreduce per-node allocationsinternal/core/exportdedup let clauses for merged structsinternal/core/exporthandle alias and letsinternal/cue/evalfix faulty status in tentative resultinternal/cuetxtarallow multiple golden filesinternal/filetypeshard-wire common caseinternalhoist a single embedding in ToExpr
Other10
allimplement hidden identifiers scoped per-packagecidrop use of set-env in CI scriptscmd/cue/cmdallow inlined embedding of pointer typescmd/cue/cmduse tools/flowdoc/ref/spec.mddefine "regular"; fix typosencoding/protobuffix trailing comment in oneof buginteranal/core/runtimemove building logic from cue packagepkg/list/sortalways use stable sorttools/flowAPI for CUE-based workflow enginetools/flowadd IgnoreConcrete option
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_1b9815a00d0afc305c8a4cc40f2b78dc440ce9047f1778d933c330675de0a690 |
| Linux, Arm64 | cue_d39dcb718d14071829f325bd79e57c069fa5bb1a84cabdb12df6a1eee87b18d0 |
| Linux, x86-64 | cue_9d3131e470cdb5182afd9966688f1c052d383145cce005a947156b5591da39b7 |
| Windows, x86-64 | cue_936084adace91705b4e3720d3f54b3a6156d1e2d8662f5bbb1b79fe8afcb2dae |
SHA-256 checksums for all of these: checksums.txt