v0.3.0-alpha5

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

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 errorse05eee7
  • cue/literalfix multiline quotes54b13db
  • cueallow access to Selectors of Path6165736
  • cuedig up wrapped error in valueErrorf4f2a02
  • cuedoc improvements74329a1
  • cuegenerate error node rather than panic on faulty output.56eb4b1
  • cueremove most uses of xerrors03abe87
  • cuesupport getting and looking up paths409dacf

internal21

  • internal/core/compilefix mutual dependent let clausesb886b0f
  • internal/core/convertfix for embedded structs are not honored3585705
  • internal/core/cuefix hang on cycles in embeddings in comprehensionsb99fd08
  • internal/core/depfirst stab at precise dependency analyzerc60e115
  • internal/core/depsupport dynamic dependencies7463d11
  • internal/core/evalfix bug in cycle handling1888d65
  • internal/core/evalfix bug with nested embeded comprehensions1d8c688
  • internal/core/evalfix cycle bug for comprehensionsaee9955
  • internal/core/evalfix hang in cyclic in comprehension evaluation1a2105e
  • internal/core/evalfix irregular dynamic fields3cfb4ab
  • internal/core/evalfix spurious cycle detectiond1cbe10
  • internal/core/evalfix spurious cycle for bulk constraints635fbdd
  • internal/core/evalhandle disjunction failure more properly7980ec5
  • internal/core/evalre-allow ... with embeddingsab0a2f3
  • internal/core/evalreduce per-node allocations30704a7
  • internal/core/exportdedup let clauses for merged structs1e0faf0
  • internal/core/exporthandle alias and lets187c734
  • internal/cue/evalfix faulty status in tentative resultcd621ff
  • internal/cuetxtarallow multiple golden filesdbfa73b
  • internal/filetypeshard-wire common casef2a4a42
  • internalhoist a single embedding in ToExpr737a103

Other10

  • allimplement hidden identifiers scoped per-packageb4aa96d
  • cidrop use of set-env in CI scriptsaa87887
  • cmd/cue/cmdallow inlined embedding of pointer types4cda4a3
  • cmd/cue/cmduse tools/flowc715b94
  • doc/ref/spec.mddefine "regular"; fix typosfcd96de
  • encoding/protobuffix trailing comment in oneof bug8661255
  • interanal/core/runtimemove building logic from cue packageb5821dc
  • pkg/list/sortalways use stable sort99d18dc
  • tools/flowAPI for CUE-based workflow engine00f345b
  • tools/flowadd IgnoreConcrete optiond3ff4a1

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_0.3.0-alpha5_Darwin_x86_64.tar.gz1b9815a00d0afc305c8a4cc40f2b78dc440ce9047f1778d933c330675de0a690
Linux, Arm64cue_0.3.0-alpha5_Linux_arm64.tar.gzd39dcb718d14071829f325bd79e57c069fa5bb1a84cabdb12df6a1eee87b18d0
Linux, x86-64cue_0.3.0-alpha5_Linux_x86_64.tar.gz9d3131e470cdb5182afd9966688f1c052d383145cce005a947156b5591da39b7
Windows, x86-64cue_0.3.0-alpha5_Windows_x86_64.zip936084adace91705b4e3720d3f54b3a6156d1e2d8662f5bbb1b79fe8afcb2dae

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

Install CUE