v0.7.0
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
133 changes since v0.6.0by area
all7
allreplace html/template by text/templatealladopt .gitignore for new delve binary namingallfix two minor printf bugs spotted by staticcheckallfix issues spotted by nilnessallclean up some TODOs for old Go versionsalladd Go 1.21, drop Go 1.19allminor wins with strings.Cut and utf8.AppendRune
cmd16
cmd/cuefix panic when importing empty files as a listcmd/cuefix incorrect position in yaml importcmd/cuesupport optional comments in get gocmd/cueignore complex types in get gocmd/cuecue mod upload commandcmd/cuewire up OCI authorizationcmd/formatbe consistent with whitespace in listscmd/cuesupport type parameters in get gocmd/cuesupport unsafe pointer in get gocmd/cue/cmdwire up modmuxcmd/cue/cmdsupport CUE_REGISTRYcmd/cuedo not ignore Encoder.Close errors on exportcmd/cueadd more test case for exporting to a filenamecmd/cue/cmdremove a few unused parameterscmd/cueupdate the list of output formatscmd/cuefix up fmt_multi comparison
CONTRIBUTING3
CONTRIBUTINGmention the Slack channel and office hours callsCONTRIBUTINGfix repo reference renderingCONTRIBUTINGclarify two sections
cue18
cueexplicitly document values are not safe for concurrent usecue/loadremove unused functionalitycuedon't panic on Iterator.Selector.Index with listscueallow top level JSON marshalers in EncodeTypecuesupport decoding into cue.Value fieldscue/loaddo not format registry as a stringcueadd more godoc linkscue/formatindent list elements correctlycuemake use of some godoc linkscue/loadmake Config.Registry an ociregistry.Interfacecue/loadupdate for OCI modulescuesimplify the reflect checks in Value.Decodecue/ast/astutiluse generics to remove some reflectcue/loaduse tdtest for TestLoadcueminor drive-by cleanupscuemake use of Go 1.20+ APIscue/loadadd package import cycle errorcuedecode empty list as empty slice instead of slice-typed nil
internal73
internal/cibump to Go 1.21.5 for the upcoming releaseinternal/core/adtchange semantics of unary_op(basictype)internal/core/adtfix closedness buginternal/core/adtadd test to prepare for fixinternal/cibump Go and GoReleaser for v0.7.0-rc.1internal/slicesmove from internal/mod/mvs/internal/slicesinternal/mod/internal/parmove from internal/mod/mvs/internal/parinternal/registrytestdo not check that dependencies existinternal/mod/modimportsnew packageinternal/core/exportfix a recent nil pointer regressioninternal/core/adtuse state directlyinternal/core/adtexpand on permutations for testinternal/cuetxtarinclude diff between test and fallback testinternal/txtarfsfactor out from registrytestinternal/cueimportsexport API and fix for CUE syntaxinternal/cueimportscopy code from cue/loadinternal/core/adtmake ListMarker Src an expressioninternal/core/adtchanges needed for new evaluatorinternal/mod/mvsdiscard copied par testsinternal/e2emake unique module names more robustinternal/tdtestdocument how the name field is usedinternal/e2eadd a test for a private github repointernal/ciadd gcloud auth to the e2e testsinternal/e2eadd a "cue mod upload" end-to-end test with gcloudinternal/e2erename existing testscript and add a summaryinternal/e2etweak how we use secret env varsinternal/mod/modfileadd copyright messageinternal/cienforce vet and mod tidy on all modulesinternal/e2erun go mod tidyinternal/mod/modziprename from internal/mod/zipinternal/registrytestremove _registry remnantsinternal/cionly run e2e tests in source repointernal/citest internal/e2e on protected branchesinternal/e2efirst version of the end-to-end module testsinternal/mod/modmuxnew packageinternal/registrytestdo not assume subdirectoryinternal/mod/modregistryremove error return from Newinternal/mod/modresolvenew packageinternal/mod/moduleadd CheckPathWithoutVersioninternal/registrytestsupport prefixinternal/modkick off WIP doc to track FAQs, points to documentinternal/core/adtavoid chatty testsinternal/mod/zipskip SizeLimit tests with -raceinternal/mod/zipsilence "err value not used" warningsinternal/mod/zipuse testing.T.TempDirinternal/mod/zipmake all tests parallelinternal/mod/zipremove duplicate test caseinternal/registrytestrewrite in terms of io/fsinternal/registrytestmove from cue/load/internalinternal/semvercopy from golang.org/x/modinternal/cueexperimentparse CUE_EXPERIMENTinternal/mod/modregistrynew packageinternal/ciset GORACE=atexit_sleep_ms=10 forgo test -raceinternal/core/exportfix a few staticcheck warningsinternal/tdtestclean filenames before comparisoninternal/cuetxtarreport full result for cuetxtar test failuresinternal/mod/modfilenew packageinternal/mod/moduleimprove error messageinternal/mod/zipadapt to CUE semanticsinternal/mod/mvsadapt to CUE semanticsinternal/mod/mvs/internal/...remove ignore build tagsinternal/mod/moduleadapt to CUE semanticsinternal/mod/mvscopy from cue/load/internal/mvsinternal/mod/modulesplit module.gointernal/modcopy files from golang.org/x/modinternal/core/adtchange slice type of notifyinternal/core/adtrename node to vertexinternal/cuetxtarallow using a fallback golden setinternal/core/adthoist the test body of TestEvalinternal/core/adtadd new closedness implementationinternal/tdtestmake function detection more robustinternal/tdtestmimic replacement of testing.Run in Selectinternal/core/adtfix nil pointer dereference
pkg8
pkg/tool/execadd a Run.mustSucceed parameterpkg/internal/builtintestdon't print superfluous newlinespkg/pathuse a subtest helper to test for each OS valuepkg/mathreuse Ln2 and Ln10 in Log2E and Log10Epkgteach gen.go about go/typespkgswap go/build for go/packages in gen.gopkg/mathfix Log2E and Log10E constant expressionspkg/mathadd tests which show the API constants
Other8
encoding/protobufsupport field_behavior "required" optionspecfix two errors in the dynamic fields exampleREADMEadd a direct mention of the community calendar- update ociregistry dependency
- update testscript so that it propagates GORACE
go.modupdate a few dependencies- bump golang.org/x dependencies
encoding/gocodedon't require output to be stable
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
| Platform | File and SHA-256 |
|---|---|
| macOS, Intel | cue_b86efef83abe1b0c90a3cf47a490cd6de5c884d0865ad3463f539b0346a39c8b |
| macOS, Apple silicon | cue_0b10652945f13a3ccc732855ac24401cd868d64eb6f4f839141ddd93c63d255e |
| Linux, x86-64 | cue_6a4306155cbf3f6d89740464dc0921bbaac74b27236a05a92e30cbb5f248d33b |
| Linux, Arm64 | cue_8cf589790f806f7a077197d462e71040c8417d1814a1f469e473c468121e823a |
| Windows, x86-64 | cue_50be1c1a622c2544ae834b377293a587a0c08b3ea6c82441ae1d59435eeb5240 |
| Windows, Arm64 | cue_257ab9a0a2723b84cb24f8f6ae7a9f899ebde49b81371ef9ee1ec34facfa2ccd |
SHA-256 checksums for all of these: checksums.txt