v0.6.0-alpha.2

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

As announced on the 2023-06-20 Community Call, this release includes preliminary support for Wasm. It also includes a number of bug fixes, and a couple of builtin API additions.

Thank you to @4ad, @chee-zaram, @eraserhd, @ghostwheel42, @mpvl, @mvdan, @myitcv, @rogpeppe, and @toshi0607 for contributing to this release!

Language

No changes to note. There are various bug fixes related to required fields, which were first introduced and explained in the v0.6.0-alpha.1 release.

API

No changes to note.

Project

No changes to note.

Core Evaluator

Whilst it should not be a breaking change from a CUE perspective, we have upgraded to use github.com/cockroachdb/apd/v3. We have also increased apd.Context precision from 24 to 34.

Encoders

No changes to note.

Builtins

The following four functions have been added to the net package:

  • PathEscape
  • PathUnescape
  • QueryEscape
  • QueryUnescape

Thanks to @eraserhd for this change.

cmd/cue

https://cuelang.org/cl/555576 fixed an important bug where cmd/cue vet was not properly consuming all input data.

Spec

Various bug fixes, with special thanks to @nicuveo for raising many of these.

WebAssembly (Wasm)

We have added preliminary support for Wasm. Users can compile code from any language and toolchain that supports Wasm into plugins that are dynamically loaded by CUE. Users can then call and use functions from these Wasm modules, just like they can use standard library functions.

See the documentation at cuelang.org/go/cue/interpreter/wasm to learn more about Wasm and its current limitations.

All changes

50 changesby area

all4

  • allsed-replace all trivial uses of ioutil@mvdanf56ccf0
  • alluse strings.Builder in a few more places@mvdan97cba0b
  • allgo fix to remove old build tags@mvdan8868ae6
  • allmove pkg/gen and internal/cmd/qgo to build-ignored files@mvdanbad36b2

cmd5

  • cmd/cueproperly consume all data input in vet@mvdanb22ec6a
  • cmd/cueadd AllocBytes and AllocObjects to stats@mvdan03d85b8
  • cmd/cuerefactor our use of cobra@mvdan59080b6
  • cmd/cuedo not defer closing files in fmt's loop@mvdan7f79469
  • cmd/cuecheck all file I/O errors in fmt@mvdan8c6d9ba

cue8

  • cue/astfix staticcheck warnings@mvdancc6b544
  • cueallow iterating hidden fields and definitions of embedded scalars@mpvlde44cab
  • cue/astsupport specifying required fields in NewStruct@mpvl1432683
  • cueadd a "decimal" benchmark@mvdanf3be10a
  • cue/testdataadd regression test for #2244@mvdan442c023
  • cue/interpreter/wasmadd user-level docs@4ad40fb30d
  • cue/interpreter/wasmadd Wasm support for abi=c@4ad0520a3f
  • cue/loadreplace go-internal/semver with x/mod@mvdan6c92698

encoding3

  • encoding/protobuf/jsonpbremove unused code@rogpeppeb2476bd
  • encoding/protobufremove unused code@rogpeppeb41f26f
  • encoding/openapiremove unused code@rogpeppe36645d1

internal16

  • internal/cibump Go and GoReleaser prior to alpha.2@mvdanb6a32da
  • internal/core/exportavoid panics on computed comprehensions@mvdan6db2253
  • internal/core/adtreturn from Accept earlier for hidden fields@mpvlc724eef
  • internal/core/adtadd missed error@mpvl19749aa
  • internal/core/adtfail on missing required field in comprehension@mpvla991bd6
  • internal/core/adtadd position for required field error@mpvl452e143
  • internal/core/validateallow required fields in definitions@mpvl317f88d
  • internal/cuetestremove support for CUE_LONG@mvdancb461fd
  • internal/encodingremove unused code@rogpeppe251790e
  • internal/citrigger Unity on master as porcuepine@mvdan2148aed
  • internal/ciremove cue-unity/unity from codereview.cfg@mvdanc341427
  • internal/core/convermake use of reflect.Value.IsZero@mvdan5318af1
  • internal/cifurther tidy up@myitcv82f96c5
  • internal/pkgmove pkg/internal to internal/pkg@4ad88922d1
  • internal/cuetxtarprint error details@rogpeppe80d6ea0
  • internal/core/convertsplit the cue tag commas after the last quote@ghostwheel4249a64f4

tools3

  • tools/flowcheck cycle marker@mpvl9a566ed
  • tools/fixremove unused code@rogpeppe1f888b5
  • tools/flowsupport tasks inside slices@rogpeppe6e0366f

Other11

  • correct misleading phrases in documentation@chee-zaram0755dc8
  • specadd definition for dynamic fields@mpvl3a635fc
  • specvarious fixes@mpvle46324e
  • increase apd.Context precision from 24 to 34@mvdan7bcbcd6
  • update to cockroachdb/apd v3@mvdan4728223
  • depsswitch to use quicktest instead of testify@myitcv12908b3
  • pkg/pathremove unused code@rogpeppeab48c0f
  • codereview.cfgadd cue-unity-new@mvdana670427
  • doc/tutorialfix typo@toshi06072304cb5
  • pkg/netadd Path{E,Une}sape and Query{E,Une}scape@eraserhd9082446
  • docs/tutorialrevert to using cue eval -i@myitcv5e66c83

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.6.0-alpha.2_darwin_amd64.tar.gz88e5045aa3ee452cf8dea387bc5b43a0353cdde35b76d1ddf61ef4a90b634af7
macOS, Apple siliconcue_v0.6.0-alpha.2_darwin_arm64.tar.gz66abd69dc31224996e10a5c216bec44ffa346e72973a0b19307ce8665a022b2b
Linux, x86-64cue_v0.6.0-alpha.2_linux_amd64.tar.gzecae7e33622a13b0925186711caa4f8aae23d445d02cde37b894775b5ed91035
Linux, Arm64cue_v0.6.0-alpha.2_linux_arm64.tar.gzc438a43c420cb31c076ff8fa539a4184825c133dba9fe92e2d9a2c896edce31e
Windows, x86-64cue_v0.6.0-alpha.2_windows_amd64.zip6f31984f89c9508bc28b00b103c007cd6ee3eeb34ee775d8b81df2e7c397cd5b
Windows, Arm64cue_v0.6.0-alpha.2_windows_arm64.zip12e07f14d7cc1b70e2cf0ac72f9876d45eb9cd2b03242a17c459bca23d4753d6

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

Install CUE