v0.7.0-rc.1

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release comprises a number of bug fixes and small improvements, as well as more ground work for Modules, WebAssembly, and the core evaluator’s performance refactors.

Note that v0.7 was originally planned to center around the core evaluator’s performance improvements. Since those refactors are not ready, and we have other fixes and improvements we want to release, we have slightly altered the release plan accordingly. We will share more details on our next community call.

As a reminder: users can register their projects with unity, our regression and performance testing setup. unity is used to ensure that a project’s CUE evaluations do not unexpectedly stop working, or regress in terms of performance. unity continues to catch multiple issues with each release. Adding your project to unity not only guarantees that we will not break your tests (if we do, we will work with you to fix your CUE code), but it also helps to improve the quality of each CUE release. Follow this link to learn more about Unity, install it, or get in touch with any questions.

Thank you to @SteVwonder, @bozaro, @cedricgc, @howardjohn, @mpvl, @mvdan, @myitcv, @nickfiggins, @rogpeppe, @rudifa, and @uhthomas for contributing to this release!

And a special thanks to all who joined the recent contributor office hours calls on our community calendar, as well as our #contributing channel on Slack! Thanks to their involvement, more issues can be investigated and fixed each release.

Go API

Note that this version of CUE requires Go 1.20 or later, per our policy to support the latest two stable Go releases just like upstream.

CL 1172105 fixes a regression introduced in v0.6.0 where calling Iterator.Selector.Index while iterating over a list would incorrectly panic.

CL 1167597 fixes cue/load so it now errors on package import cycles, following the spec.

CL 1167647 adjusts cue.Value.Decode to decode empty CUE lists into a Go interface{} as a non-nil empty slice.

CL 547369 teaches cue.Value.Decode how to decode values which aren’t entirely concrete into a Go type by using cue.Value as part of the destination type.

Language

There are no changes to the language in this version.

Spec

CL 1171216 fixes two errors in a dynamic fields example.

Core Evaluator

CL 1172014 disallows the direct use of unary operators with basic types, since they would result in confusing bounds which seemed incorrect.

CL 1172013 fixes a closedness bug where close did not properly apply when used inside definitions.

CL 1172874 fixes a panic in cue export introduced by v0.6.0.

Encoders

CL 1172314 teaches encoding/protobuf to follow the field_behavior annotation marking a field as either optional or required when decoding.

Builtins

CL 1172991 adds a mustSucceed boolean parameter to tool/exec.Run, which can be set to false to allow a command to fail and set its own field success to false.

CL 557322 fixes the values of math’s Log2E and Log10E constants, which were being incorrectly truncated.

cmd/cue

CLs 1170966 and 1171302 fix a number of issues in cue fmt (and by extension the cue/format package), resulting in better and more consistent formatting of CUE files.

CLs 1171292, 1171015, 1170115, and 1171971 implement a variety of improvements and bug fixes for cue get go.

CL 1172017 fixes a number of issues with the line and column positions reported by our YAML decoder, which could result in weird CUE formatting when using cue import or misleading positions being shown to the user.

CL 1169709 increases the robustness of cue export -o, which in some situations could ignore file errors or incorrectly replace an existing file without the -f flag.

CL 1173072 fixes a panic when using cue import --list with empty YAML input.

CL 1168436 updates the cue export documentation to add the missing cue and binary supported export formats.

Modules

A number of changes are included to support an experimental implementation of the proposed modules and package management support. These aren’t enabled by default, and will be announced soon.

All changes

132 changes since v0.6.0by area

all7

  • allreplace html/template by text/template@mvdan361ae4f
  • alladopt .gitignore for new delve binary naming@mpvl68e9d5d
  • allfix two minor printf bugs spotted by staticcheck@mvdan7b49758
  • allfix issues spotted by nilness@mvdan382449b
  • allclean up some TODOs for old Go versions@mvdan106fc3a
  • alladd Go 1.21, drop Go 1.19@mvdan3a101ba
  • allminor wins with strings.Cut and utf8.AppendRune@mvdan72ba066

cmd16

  • cmd/cuefix panic when importing empty files as a list@uhthomasb36b477
  • cmd/cuefix incorrect position in yaml import@uhthomasd97b0c3
  • cmd/cuesupport optional comments in get go@uhthomas67ea9cf
  • cmd/cueignore complex types in get go@uhthomas112b0b2
  • cmd/cuecue mod upload command@rogpeppeca20656
  • cmd/cuewire up OCI authorization@rogpeppeb2ac3f7
  • cmd/formatbe consistent with whitespace in lists@uhthomasd70007c
  • cmd/cuesupport type parameters in get go@uhthomas3b4e03d
  • cmd/cuesupport unsafe pointer in get go@uhthomas05ceba6
  • cmd/cue/cmdwire up modmux@rogpeppeac1b433
  • cmd/cue/cmdsupport CUE_REGISTRY@rogpepped5c0745
  • cmd/cuedo not ignore Encoder.Close errors on export@mvdanf3a515e
  • cmd/cueadd more test case for exporting to a filename@mvdan388f9a1
  • cmd/cue/cmdremove a few unused parameters@mvdan2f6b27b
  • cmd/cueupdate the list of output formats@mvdan42ae8e4
  • cmd/cuefix up fmt_multi comparison@mvdand4d109e

CONTRIBUTING3

  • CONTRIBUTINGmention the Slack channel and office hours calls@mvdan16a0cda
  • CONTRIBUTINGfix repo reference rendering@cedricgc7a4ea86
  • CONTRIBUTINGclarify two sections@cedricgcd947a69

cue18

  • cueexplicitly document values are not safe for concurrent use@mvdand805c22
  • cue/loadremove unused functionality@rogpeppeb727189
  • cuedon't panic on Iterator.Selector.Index with lists@mvdan9dd0f82
  • cueallow top level JSON marshalers in EncodeType@rogpeppe8f796bf
  • cuesupport decoding into cue.Value fields@rogpeppeb25fc05
  • cue/loaddo not format registry as a string@rogpeppe4fd631d
  • cueadd more godoc links@mvdan286dfcb
  • cue/formatindent list elements correctly@uhthomaseddccfc
  • cuemake use of some godoc links@mvdan63307bd
  • cue/loadmake Config.Registry an ociregistry.Interface@mvdanfefeb36
  • cue/loadupdate for OCI modules@rogpeppeb951b07
  • cuesimplify the reflect checks in Value.Decode@mvdan8709d8a
  • cue/ast/astutiluse generics to remove some reflect@mvdanb8cb9a4
  • cue/loaduse tdtest for TestLoad@rogpeppe7389fe9
  • cueminor drive-by cleanups@mvdana44c805
  • cuemake use of Go 1.20+ APIs@mvdanfae9c82
  • cue/loadadd package import cycle error@bozaro220b44e
  • cuedecode empty list as empty slice instead of slice-typed nil@bozaro66ebe0f

internal72

  • internal/core/adtchange semantics of unary_op(basictype)@mpvle1ceed4
  • internal/core/adtfix closedness bug@mpvl886eefd
  • internal/core/adtadd test to prepare for fix@mpvl145764d
  • internal/cibump Go and GoReleaser for v0.7.0-rc.1@mvdan8f88dcb
  • internal/slicesmove from internal/mod/mvs/internal/slices@rogpeppe0e51dbb
  • internal/mod/internal/parmove from internal/mod/mvs/internal/par@rogpeppefe0e04a
  • internal/registrytestdo not check that dependencies exist@rogpeppe99bdbad
  • internal/mod/modimportsnew package@rogpeppe79033c2
  • internal/core/exportfix a recent nil pointer regression@rudifa141925a
  • internal/core/adtuse state directly@mpvlbba2263
  • internal/core/adtexpand on permutations for test@mpvl596fdc9
  • internal/cuetxtarinclude diff between test and fallback test@mpvl6774d0d
  • internal/txtarfsfactor out from registrytest@rogpeppe265a7a0
  • internal/cueimportsexport API and fix for CUE syntax@rogpeppe47d6dce
  • internal/cueimportscopy code from cue/load@rogpeppe9e55783
  • internal/core/adtmake ListMarker Src an expression@mpvlf59894c
  • internal/core/adtchanges needed for new evaluator@mpvlfb88beb
  • internal/mod/mvsdiscard copied par tests@mvdan4e30101
  • internal/e2emake unique module names more robust@mvdana404c89
  • internal/tdtestdocument how the name field is used@rogpeppedeab307
  • internal/e2eadd a test for a private github repo@mvdan4d2ba88
  • internal/ciadd gcloud auth to the e2e tests@mvdan95a88a5
  • internal/e2eadd a "cue mod upload" end-to-end test with gcloud@mvdana060f85
  • internal/e2erename existing testscript and add a summary@mvdan4dba8dd
  • internal/e2etweak how we use secret env vars@mvdand3efde7
  • internal/mod/modfileadd copyright message@rogpeppef9c8d98
  • internal/cienforce vet and mod tidy on all modules@mvdan2ae1a9e
  • internal/e2erun go mod tidy@mvdan8b95971
  • internal/mod/modziprename from internal/mod/zip@rogpeppe5365838
  • internal/registrytestremove _registry remnants@rogpeppe273602f
  • internal/cionly run e2e tests in source repo@myitcvb15fcb0
  • internal/citest internal/e2e on protected branches@mvdand72997f
  • internal/e2efirst version of the end-to-end module tests@mvdan8c826bc
  • internal/mod/modmuxnew package@rogpeppe8e24597
  • internal/registrytestdo not assume subdirectory@rogpeppef892345
  • internal/mod/modregistryremove error return from New@rogpeppe1e26aa2
  • internal/mod/modresolvenew package@rogpeppe2a7d1d6
  • internal/mod/moduleadd CheckPathWithoutVersion@rogpeppec6da768
  • internal/registrytestsupport prefix@rogpeppe6c71b2c
  • internal/modkick off WIP doc to track FAQs, points to document@myitcvb664f0c
  • internal/core/adtavoid chatty tests@mvdan55c6db6
  • internal/mod/zipskip SizeLimit tests with -race@mvdan91d9766
  • internal/mod/zipsilence "err value not used" warnings@mvdan665d19a
  • internal/mod/zipuse testing.T.TempDir@mvdanfd8d5f9
  • internal/mod/zipmake all tests parallel@mvdanb004dd6
  • internal/mod/zipremove duplicate test case@mvdan6c51cf0
  • internal/registrytestrewrite in terms of io/fs@mvdan5f19042
  • internal/registrytestmove from cue/load/internal@mvdan633874c
  • internal/semvercopy from golang.org/x/mod@rogpeppea9a6965
  • internal/cueexperimentparse CUE_EXPERIMENT@rogpeppeb4583de
  • internal/mod/modregistrynew package@rogpeppe3c368d3
  • internal/ciset GORACE=atexit_sleep_ms=10 for go test -race@mvdancbdd996
  • internal/core/exportfix a few staticcheck warnings@mvdan6923617
  • internal/tdtestclean filenames before comparison@rogpeppe28f34a2
  • internal/cuetxtarreport full result for cuetxtar test failures@rogpeppebfa250d
  • internal/mod/modfilenew package@rogpeppe551fe68
  • internal/mod/moduleimprove error message@rogpeppe0e95843
  • internal/mod/zipadapt to CUE semantics@rogpeppe3142030
  • internal/mod/mvsadapt to CUE semantics@rogpeppe4eca0c7
  • internal/mod/mvs/internal/...remove ignore build tags@rogpeppea102419
  • internal/mod/moduleadapt to CUE semantics@rogpeppe38cf584
  • internal/mod/mvscopy from cue/load/internal/mvs@rogpeppe204665c
  • internal/mod/modulesplit module.go@rogpeppec6e91b1
  • internal/modcopy files from golang.org/x/mod@rogpeppe6f5b370
  • internal/core/adtchange slice type of notify@mpvl3165a5e
  • internal/core/adtrename node to vertex@mpvl0b96e3b
  • internal/cuetxtarallow using a fallback golden set@mpvl826f28c
  • internal/core/adthoist the test body of TestEval@mpvlca254d6
  • internal/core/adtadd new closedness implementation@mpvl5062118
  • internal/tdtestmake function detection more robust@mpvl49728f7
  • internal/tdtestmimic replacement of testing.Run in Select@mpvl1763cea
  • internal/core/adtfix nil pointer dereference@bozaro3286ead

pkg8

  • pkg/tool/execadd a Run.mustSucceed parameter@nickfiggins10c4796
  • pkg/internal/builtintestdon't print superfluous newlines@uhthomas8b32c49
  • pkg/pathuse a subtest helper to test for each OS value@mvdan1227a83
  • pkg/mathreuse Ln2 and Ln10 in Log2E and Log10E@mvdanfe2f216
  • pkgteach gen.go about go/types@mvdan2091170
  • pkgswap go/build for go/packages in gen.go@mvdane9a412d
  • pkg/mathfix Log2E and Log10E constant expressions@mvdana1038f7
  • pkg/mathadd tests which show the API constants@mvdan63a4256

Other8

  • encoding/protobufsupport field_behavior "required" option@howardjohn80b0eee
  • specfix two errors in the dynamic fields example@SteVwonder200a8ec
  • READMEadd a direct mention of the community calendar@mvdan8a98ac0
  • update ociregistry dependency@rogpeppea43792c
  • update testscript so that it propagates GORACE@mvdane3d42af
  • go.modupdate a few dependencies@mvdanc08344a
  • bump golang.org/x dependencies@mvdanbf3ac20
  • encoding/gocodedon't require output to be stable@mvdan3bf3dbd

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.7.0-rc.1_darwin_amd64.tar.gz71c4c07f055eda1cda4104aae1eb88b4e5b5462833c3068d6fc7ae7088e2e791
macOS, Apple siliconcue_v0.7.0-rc.1_darwin_arm64.tar.gzfb825f146ac912e40659c0485eb7cdaeb65ae29a06e06e35662578cdece8153d
Linux, x86-64cue_v0.7.0-rc.1_linux_amd64.tar.gzf8acceeb3e5479852b01c06bed632a756fc06eeec0c526a305c530a0d2b35e21
Linux, Arm64cue_v0.7.0-rc.1_linux_arm64.tar.gz56695aa849c3feee7a4547d92c80808b169d1784177c97376f5ca45eeadabdb6
Windows, x86-64cue_v0.7.0-rc.1_windows_amd64.zipb99122820c7e4deb435fa89a9712f2be69a4beffb75ee3d29e621dd9e5c54b83
Windows, Arm64cue_v0.7.0-rc.1_windows_arm64.zip927d7dcc12a596fa80987d62151fec0046574aaf4385c42065992d298150c42d

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

Install CUE