v0.11.0-alpha.1
This release includes a new matchN built-in validator, many fixes for the new evaluator, and a significant amount of work on JSON Schema.
Evaluator
A number of crashes, regressions, and other bugs have been fixed in the new evaluator, which can be enabled by CUE_EXPERIMENT=evalv3. For more details, see our latest performance update. Thanks to all who have tested the new evaluator and reported bugs!
CL 1198922 adds a new matchN built-in validator, necessary implement a host of validators such as the JSON Schema equivalents of not, oneOf, and anyOf. See the new how-to guide for it.
CL 1199898 relaxes the evaluator to allow referencing required fields via selectors, rather than failing like we do with optional fields. This should help with the transition of CUE schemas from regular to required fields, such as those decoded from JSON Schema.
CL 1200221 removes support for arithmetic operators on lists, and CL 1200221 teaches cue fix to rewrite most of them. We have added a doc page with more details and examples.
CL 1199684 teaches the evaluator to allow non-concrete values to be passed as parameters to certain builtin functions such as yaml.Validate.
CL 1199723 deduplicates errors when pairwise-combining them, as the duplication could result in large memory usage.
Modules
CL 1199541 wraps up the CUE modules experiment by dropping support for CUE_EXPERIMENT=modules=0, now that the new mode has been the default since CUE v0.9.0, and we are not aware of any remaining regressions.
Go API
CL 1200507 deprecates astutil.Cursor.Import, which is now superseded by astutil.Sanitize.
Encodings
A significant amount of work has gone into improving JSON Schema support, fixing many bugs and producing better CUE output, as well as leveraging the new matchN builtin. While this work is still in progress, we already expect an overall improvement compared to v0.10.0. This work will also form the basis for CUE modules for well-known services that will be published to the Central Registry.
CL 1199938 teaches the TOML decoder to produce CUE nodes with positions, allowing errors to include positions within TOML files.
CL 1199541 wraps up the new YAML decoder experiment by dropping support for CUE_EXPERIMENT=yamlv3decoder=0, allowing the 8400 lines of code in internal/third_party/yaml to be removed.
Builtins
CL 1194425 tweaks the yaml.Validate and json.Validate functions to allow non-concrete CUE values as schema parameters.
CL 1199602 adds a list.MatchN function, surfacing the matchN built-in validator for use in the JSON Schema decoder.
CL 1199881 tweaks uuid.Valid so that it is consistent with uuid.Parse in terms of what UUID formats are accepted.
cmd/cue
CL 1199634 drops support for the deprecated short form of cue cmd; users of cue foo should now call cue cmd foo.
CL 1200351 fixes a bug in cue fix where it would not operate on directories with multiple packages.
CL 1200498 fixes a bug in cue fix where added imports would end up with mangled names.
CL 1200554 teaches cue fix to work on standard input and output, like other sub-commands.
All changes
106 changes since v0.10.0by area
all9
allremove support for list arithmeticallrely on umask when creating files and directoriesallremove mentions of cue-sh(/tools)alluse a few more godoc linksallremove obsolete TODOs assigned to meallresolve a few more staticcheck warningsallremove last unnecessary uses of cue.Runtimeallmake use of stringer in more placesallremove two deprecated APIs
cmd11
cmd/cueremove mention of CUE_EXPERIMENT=modules from helpcmd/cuesupportcue fix -to fix CUE via stdin and stdoutcmd/fixallow fix to load all packages in a directorycmd/cueremove obsolete TODO about empty module pathscmd/cueadd mod registry example to help textcmd/cueadd testscript to cover exporting CUE commentscmd/cuedrop support for the deprecated short form ofcue cmdcmd/cuerefactor help texts and topicscmd/cueskip the mod_registry testscript as it's flakeycmd/cue-ast-printallow reading stdincmd/cueprepareget gofor GODEBUG=gotypesalias=1
cue5
cueremove support for legacy protobuf attributescueadd a regression test for a default elimination bug fixed in evalv3cueadd regression test for a cycle error position bug fixed in evalv3cue/literaluse strings.Repeat directlycue/benchmarksmove benchmark code out of testdata
encoding23
encoding/jsonschemaadd OpenAPI 3.0 version supportencoding/jsonschemaadd keyword TODOsencoding/jsonschemaimplement "not"encoding/jsonschemacommit external test statsencoding/jsonschemaencode oneOf etc using matchNencoding/jsonschemaverify result is concrete in external testsencoding/jsonschemarun external tests in matrixencoding/jsonschemaprepare for matrix test runsencoding/jsonschemaadd location information to test outputencoding/jsonschemaavoid test regressionsencoding/jsonschemaadd external test suiteencoding/jsonschemaexport Versionencoding/jsonschemamove txtar tests into subdirectoryencoding/tomldecode syntax tree nodes with positionsencoding/tomladd debugprint txtar tests for the decoderencoding/jsonschemasupportminContainsandmaxContainskeywordsencoding/jsonschemaadd docs about test file conventionsencoding/jsonschemadecodecontainsaslist.MatchNencoding/jsonschemasupport instance testsencoding/jsonschemamore consistent test dataencoding/jsonschemaavoid unnecessary alias to rootencoding/jsonschemasupport boolean-valued schemasencoding/jsonschemabetter version support
internal44
internal/core/adtadd tests for validator deduppinginternal/core/validatefix validation of disjunctions for evalv3internal/ciswitch to '.yaml' workflow file extensioninternal/core/adtensure pattern is evaluatedinternal/core/adtdo not copy frozen flagsinternal/core/adtdisable non-critical panicinternal/ciset GOTOOLCHAIN=local as part of installGointernal/astinternalmore compact representation of relative positionsinternal/astinternalsimpler internal APIinternal/cueexperimentprevent disabling modules experimentinternal/envflagsupport deprecated flagsinternal/core/compilevarious fixes to matchNinternal/core/adtadd tests for matchNinternal/core/adtfix validators in embeddingsinternal/core/adtadd tests to prepare for bug fixinternal/cuetdtestmove testing.T out of Minternal/astinternalprint relative positions as wellinternal/astinternalrevise API with more optionsinternal/core/adtallow referencing required fieldsinternal/core/adtadd tests for referencing required fieldsinternal/astinternaldon't panic on nil pointers in DebugPrintinternal/astinternaladd DebugPrint cuetxtar testsinternal/astinternaladd DebugPrint from cue-ast-printinternal/core/adtfix bug that ignores field typeinternal/core/adtrequire nodes for indexinginternal/core/adtexpose v3 optional field buginternal/core/adtswitch on DebugDeps for TestEvalAlphainternaladapt to testing.TB.Context in Go 1.24internal/encodinguse encoding/yaml rather than pkg/encoding/yamlinternal/pkgmake Schema an alias for cue.Valueinternal/core/adtallow any CUE value in json/yaml.Validateinternal/cuetxtarsimplify orderinginternal/cuetxtarfix ordering buginternal/core/adtfix COMP counter issueinternal/core/adtdecrement counter for defunct tasksinternal/core/adtdo not finalize letinternal/cuetxtarensure ordering of files in txtar is consistentinternal/core/adtallow non-concrete values in builtinsinternal/core/compileadd matchN builtin validatorinternal/core/adtfix disjunctions in data modeinternal/ciupdate goreleaser versioninternal/third_party/yamldelete the old YAML decoderinternal/cueversionbump for v0.11internal/core/exportupdate via CUE_UPDATE=1 go test
pkg8
pkg/tool/fileuse 0o777 as the default Mkdir permissionspkg/tool/execRun does not exececute shell commandspkg/listre-test with CUE_UPDATE=1pkg/uuiduse google/uuid.Validate in Validpkg/uuidadd more valid and invalid test casespkg/listaddMatchNvalidator functionpkg/encoding/yamladd more validation testspkgadd some tests that pick defaults in builtins
tools3
tools/fixavoid name-mangled importstools/fixcorrect the ast walker so sub-expressions get fixedtools/fixrewrite list addition and multiplication
Other3
ast/astutildeprecate Cursor.Importcore/adtidentify duplicate errors when pairwise-combiningevaluatorregression test for order independent eval fixed in evalv3
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_a90adf5b62f52e3cc510a74fbfe5f5fffc55145050114b8abe8660c3e273237b |
| macOS, Apple silicon | cue_71b9ce693a2100be1c3594b19dffea9f94649fec987b2c50fbae3d739e7b3ee2 |
| Linux, x86-64 | cue_e5ce36c0572b6da22d84653c0a0574eecb6b7611ddfa0fa3a24cdeaf9eb24b8d |
| Linux, Arm64 | cue_5510ec6b5716840c65c067bd7eca30893855f620e76d47d7c028b2af06d10f1c |
| Windows, x86-64 | cue_666bd0c87c4dfb80072549597a98a63daa926084fe2c2b6dcb68f0cc9dd1fc7f |
| Windows, Arm64 | cue_f0c89f3a5aa035a18e9de201c72f8d0171200b715307f04e2e7b920d4cd7cb5a |
SHA-256 checksums for all of these: checksums.txt