github cuelang/cue v0.3.0-alpha5
Bug fixes and error message improvements

latest releases: v0.4.0, v0.4.0-rc.1, v0.4.0-beta.2...
3 years ago

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.

Changelog

b4aa96d all: implement hidden identifiers scoped per-package
aa87887 ci: drop use of set-env in CI scripts
4cda4a3 cmd/cue/cmd: allow inlined embedding of pointer types
c715b94 cmd/cue/cmd: use tools/flow
e05eee7 cue/errors: correct handling of wrapping list errors
54b13db cue/literal: fix multiline quotes
6165736 cue: allow access to Selectors of Path
f4f2a02 cue: dig up wrapped error in valueError
74329a1 cue: doc improvements
56eb4b1 cue: generate error node rather than panic on faulty output.
03abe87 cue: remove most uses of xerrors
409dacf cue: support getting and looking up paths
fcd96de doc/ref/spec.md: define "regular"; fix typos
8661255 encoding/protobuf: fix trailing comment in oneof bug
b5821dc interanal/core/runtime: move building logic from cue package
b886b0f internal/core/compile: fix mutual dependent let clauses
3585705 internal/core/convert: fix for embedded structs are not honored
b99fd08 internal/core/cue: fix hang on cycles in embeddings in comprehensions
c60e115 internal/core/dep: first stab at precise dependency analyzer
7463d11 internal/core/dep: support dynamic dependencies
1888d65 internal/core/eval: fix bug in cycle handling
1d8c688 internal/core/eval: fix bug with nested embeded comprehensions
aee9955 internal/core/eval: fix cycle bug for comprehensions
1a2105e internal/core/eval: fix hang in cyclic in comprehension evaluation
3cfb4ab internal/core/eval: fix irregular dynamic fields
d1cbe10 internal/core/eval: fix spurious cycle detection
635fbdd internal/core/eval: fix spurious cycle for bulk constraints
7980ec5 internal/core/eval: handle disjunction failure more properly
ab0a2f3 internal/core/eval: re-allow ... with embeddings
30704a7 internal/core/eval: reduce per-node allocations
1e0faf0 internal/core/export: dedup let clauses for merged structs
187c734 internal/core/export: handle alias and lets
cd621ff internal/cue/eval: fix faulty status in tentative result
dbfa73b internal/cuetxtar: allow multiple golden files
f2a4a42 internal/filetypes: hard-wire common case
737a103 internal: hoist a single embedding in ToExpr
99d18dc pkg/list/sort: always use stable sort
00f345b tools/flow: API for CUE-based workflow engine
d3ff4a1 tools/flow: add IgnoreConcrete option

Don't miss a new cue release

NewReleases is sending notifications on new releases.