v0.13.0-alpha.4

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release adds further fixes and optimizations to the new evaluator, and introduces an experimental XML encoding for CUE.

Changes which may break some users are marked below with: ⚠️

Evaluator

The new evaluator is improved to fix a few more regressions which led to incorrect errors. Since the last alpha release, one more project in Unity is fully working with evalv3, and just one remains with a breakage compared to evalv2.

Performance work for the new evaluator is ongoing; a number of changes in this release led to performance improvements of between 5% and 70% for a variety of projects. For more details, see Marcel’s last performance update.

As a reminder, the old evaluator is still accessible via CUE_EXPERIMENT=evalv3=0. If you encounter any errors or other problems, please file an issue with details.

Filenames beginning with a dot can now be embedded as long as the glob pattern uses an explicit dot, such as @embed(glob="dir/.data_*.json").

⚠️ @embed(glob="pattern...") directives whose file globbing results in zero files now result in an error, to avoid situations where a glob pattern silently stops working as intended.

⚠️ The CUE_DEBUG=openinline evaluator debug flag is removed, now that evalv3’s closedness implementation closely matches the semantics of evalv2.

cmd/cue

cue mod tidy now preserves the top-level custom field as intended.

cue get go now interprets Go fields with the new json:",omitzero" struct tag as CUE optional fields.

cue cmd now fails if no tasks were actually defined, to avoid situations where a user is misled into thinking a task was defined when it was not.

Builtins

⚠️ The uuid.ToString function is removed, given that it never did anything useful and could mislead users into thinking it did.

tool/http gained a followRedirects option to let the user disable HTTP redirection.

Encodings

The XML “Koala” encoding proposed in February is now available via an experimental implementation. Try it out via the CLI like cue export xml+koala: data.xml, or via its Go API.

All changes

41 changes since v0.13.0-alpha.3by area

cmd8

  • cmd/cue/cmdadd test case for embedding a pattern with an explicit dot file@rogpeppe572a6cc
  • cmd/cueerror on useless commands@myitcv4b5dd6b
  • cmd/cueremove test files related to old old closedness@myitcv93e82f2
  • cmd/cueconvert examples to 'cue vet -c'@myitcv08c3542
  • cmd/cuego get Go fields with the json omitempty tag as optional@mvdand9da212
  • cmd/cueadd get go test case with the new omitzero json tag@mvdanbe6c3db
  • cmd/cueactually update the _gen.go.want gengotypes testscript files@mvdan52d9689
  • cmd/cuewire up xml+koala via encoding/xml/koala@mvdan096a114

internal25

  • internal/cibump Go and goreleaser for the next alpha release@mvdand1fb074
  • internal/golangorgxcuelsp: remove unneeded code@cuematthewe223de9
  • internal/core/adtcache reqSets in nodeContext@mpvlfac9a30
  • internal/core/adtadd benchmark for 3881@mpvl3eef4dd
  • internal/core/adtadd stats for new closedness algo@mpvl5f329ce
  • internal/core/adtfix Vertex dereferencing for disjunctions@mpvl96e0ebc
  • internal/core/adtadd tests for 3850 and 3875@mpvl7cfe774
  • internal/core/adtfix test names@mpvl5dcc768
  • internal/core/topsortprevent duplicates in nodeToStructMeta@mvdana753c37
  • internal/core/adtremove unused nodeContext fields@mvdanb12e201
  • internal/core/adtshow correct path for incomplete values@mpvle714489
  • internal/core/adtskip work in checkTypos when a vertex has no arcs@mvdan3c149f1
  • internal/core/adtreuse a local buffer in checkTypos@mvdanab8bd45
  • internal/golangorgx/goplsUse the correct error.@alingse19403a4
  • internal/core/adtavoid more allocations when LogEval is disabled@mvdan34a512f
  • internal/core/adtremove unused code low-hanging fruit@mvdan8fef4d3
  • internal/golangorgx/goplsGet cue lsp to initialize with emacs lsp@cuematthewc54251d
  • internal/core/adtdo not activate ids for non-definitions@mpvl2824405
  • internal/core/adtadd tests for 3858@mpvleec6a2a
  • internal/core/adtreuse reqSets slices via OpContext@mvdan1d028fc
  • internal/core/adtprevent logging overhead when disabled@mvdane778137
  • internal/cuedebugdrop openinline flag@mvdana09a38b
  • internal/encoding/yamlsupport alias to scalars as map keys@OmriSteinera6fff27
  • internal/encoding/gotypesgenerate valid json tags for quoted fields@trumant93c1421
  • internal/mod/modloadpreserve custom struct in module when tidying requirements@snuxolle058014

Other8

  • cue/interpreter/embedfix "glob" typo@mvdan2666081
  • cue/interpreter/embedfail when glob pattern has no matches@rogpeppeb6d7332
  • interpreter/embedallow glob to match explicit dot files@rogpeppe6741c90
  • pkg/tool/httpallow configuration of following redirects@myitcvacc06c5
  • pkg/uuidremove ToString@mvdanf836184
  • update golang.org/x/... dependencies@mvdan433ac2c
  • update pelletier/go-toml to drop testify@mvdan9b5b10f
  • encoding/xml/koalaintroduce the first experimental XML encoder@matts85ebf42e5

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_v0.13.0-alpha.4_darwin_amd64.tar.gz81d2deb4c72de25768b8dc054234770b8a5451216ee2e3d750c25598d843ccf0
macOS, Apple siliconcue_v0.13.0-alpha.4_darwin_arm64.tar.gzb1219ec5866c204d210f79032c5fb126b600ae2b5664d50ff1acef2676f72254
Linux, x86-64cue_v0.13.0-alpha.4_linux_amd64.tar.gz4289c1399f584f3b262787b3aeed40ff1cef1184073347737e39b8a2cd94e516
Linux, Arm64cue_v0.13.0-alpha.4_linux_arm64.tar.gz28a884f334be907714540d879df7090ea2b00b8db9716a0d0ffcba2be01c3c68
Windows, x86-64cue_v0.13.0-alpha.4_windows_amd64.zip34341f578c236f7c741bac489996884a6fb8504edbe23be514056ed810087629
Windows, Arm64cue_v0.13.0-alpha.4_windows_arm64.zip7efaa680f2fa4df7c088c06ac8b55fa8a8358bd589a000fb2ed33df93dcf956b

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

Install CUE