v0.11.0-alpha.1

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

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 arithmetic@cuematthew46fb300
  • allrely on umask when creating files and directories@mvdan2da59f2
  • allremove mentions of cue-sh(/tools)@myitcv67443fb
  • alluse a few more godoc links@mvdana4ebf4d
  • allremove obsolete TODOs assigned to me@mvdaneeec3f5
  • allresolve a few more staticcheck warnings@mvdan2f19b1a
  • allremove last unnecessary uses of cue.Runtime@mvdan68f856f
  • allmake use of stringer in more places@mvdana20e523
  • allremove two deprecated APIs@mvdanea43f81

cmd11

  • cmd/cueremove mention of CUE_EXPERIMENT=modules from help@rogpeppeecbcf34
  • cmd/cuesupport cue fix - to fix CUE via stdin and stdout@mvdanc0fdf75
  • cmd/fixallow fix to load all packages in a directory@cuematthew5936450
  • cmd/cueremove obsolete TODO about empty module paths@mvdane48fb9d
  • cmd/cueadd mod registry example to help text@mvdan9f620c2
  • cmd/cueadd testscript to cover exporting CUE comments@mvdand2ce0e3
  • cmd/cuedrop support for the deprecated short form of cue cmd@mvdan4eb3d53
  • cmd/cuerefactor help texts and topics@mvdan7e589e3
  • cmd/cueskip the mod_registry testscript as it's flakey@mvdan54ef570
  • cmd/cue-ast-printallow reading stdin@rogpeppeb52cd92
  • cmd/cueprepare get go for GODEBUG=gotypesalias=1@mvdana9ce855

cue5

  • cueremove support for legacy protobuf attributes@mvdan985855f
  • cueadd a regression test for a default elimination bug fixed in evalv3@mvdandcfc2d4
  • cueadd regression test for a cycle error position bug fixed in evalv3@mvdan8908d06
  • cue/literaluse strings.Repeat directly@mvdan0389e8a
  • cue/benchmarksmove benchmark code out of testdata@cuematthewd52859e

encoding23

  • encoding/jsonschemaadd OpenAPI 3.0 version support@rogpepped7852d7
  • encoding/jsonschemaadd keyword TODOs@rogpeppe33fe828
  • encoding/jsonschemaimplement "not"@rogpeppee7175ba
  • encoding/jsonschemacommit external test stats@rogpepped20e479
  • encoding/jsonschemaencode oneOf etc using matchN@rogpeppebfce150
  • encoding/jsonschemaverify result is concrete in external tests@rogpeppe2e19c1f
  • encoding/jsonschemarun external tests in matrix@rogpeppee2685dd
  • encoding/jsonschemaprepare for matrix test runs@rogpeppe9959a3e
  • encoding/jsonschemaadd location information to test output@rogpeppe1a2e26e
  • encoding/jsonschemaavoid test regressions@rogpeppe9956f16
  • encoding/jsonschemaadd external test suite@rogpeppe484dd8e
  • encoding/jsonschemaexport Version@rogpeppede41586
  • encoding/jsonschemamove txtar tests into subdirectory@rogpeppedf2c869
  • encoding/tomldecode syntax tree nodes with positions@mvdanb123f2b
  • encoding/tomladd debugprint txtar tests for the decoder@mvdanedc117e
  • encoding/jsonschemasupport minContains and maxContains keywords@haoqixu4093ccf
  • encoding/jsonschemaadd docs about test file conventions@rogpeppe5409884
  • encoding/jsonschemadecode contains as list.MatchN@haoqixu3138301
  • encoding/jsonschemasupport instance tests@rogpeppebbe2f81
  • encoding/jsonschemamore consistent test data@rogpeppecb1dc6b
  • encoding/jsonschemaavoid unnecessary alias to root@rogpeppeae3987d
  • encoding/jsonschemasupport boolean-valued schemas@rogpeppe616f91a
  • encoding/jsonschemabetter version support@rogpeppe67f508f

internal44

  • internal/core/adtadd tests for validator dedupping@mpvl2662ebe
  • internal/core/validatefix validation of disjunctions for evalv3@mpvl2fb6f45
  • internal/ciswitch to '.yaml' workflow file extension@myitcv2d329b5
  • internal/core/adtensure pattern is evaluated@mpvle97c624
  • internal/core/adtdo not copy frozen flags@mpvlaeb3bf3
  • internal/core/adtdisable non-critical panic@mpvl8ebddc1
  • internal/ciset GOTOOLCHAIN=local as part of installGo@myitcvbb24c7c
  • internal/astinternalmore compact representation of relative positions@rogpeppe6f4983e
  • internal/astinternalsimpler internal API@rogpeppe32865bc
  • internal/cueexperimentprevent disabling modules experiment@rogpeppea51a98f
  • internal/envflagsupport deprecated flags@rogpeppe05b9b02
  • internal/core/compilevarious fixes to matchN@mpvle505402
  • internal/core/adtadd tests for matchN@mpvl30a8854
  • internal/core/adtfix validators in embeddings@mpvl3deadce
  • internal/core/adtadd tests to prepare for bug fix@mpvl0ffb5d2
  • internal/cuetdtestmove testing.T out of M@rogpeppe3ae664e
  • internal/astinternalprint relative positions as well@mvdan6e5ec5a
  • internal/astinternalrevise API with more options@mvdanae3ad16
  • internal/core/adtallow referencing required fields@mpvl710b438
  • internal/core/adtadd tests for referencing required fields@mpvla525801
  • internal/astinternaldon't panic on nil pointers in DebugPrint@mvdan221cfaf
  • internal/astinternaladd DebugPrint cuetxtar tests@mvdan094b9e9
  • internal/astinternaladd DebugPrint from cue-ast-print@mvdan937093c
  • internal/core/adtfix bug that ignores field type@mpvla3f1a0f
  • internal/core/adtrequire nodes for indexing@mpvl196dc98
  • internal/core/adtexpose v3 optional field bug@mpvl4967eb4
  • internal/core/adtswitch on DebugDeps for TestEvalAlpha@mpvl9aabfcb
  • internaladapt to testing.TB.Context in Go 1.24@mvdanb5ac87c
  • internal/encodinguse encoding/yaml rather than pkg/encoding/yaml@mvdan186b6e2
  • internal/pkgmake Schema an alias for cue.Value@mvdanc8f5a21
  • internal/core/adtallow any CUE value in json/yaml.Validate@NoamTD1b01c83
  • internal/cuetxtarsimplify ordering@mpvl2a84338
  • internal/cuetxtarfix ordering bug@mpvleb3b539
  • internal/core/adtfix COMP counter issue@mpvl43d722b
  • internal/core/adtdecrement counter for defunct tasks@mpvl6335c46
  • internal/core/adtdo not finalize let@mpvl3965579
  • internal/cuetxtarensure ordering of files in txtar is consistent@mpvl358b945
  • internal/core/adtallow non-concrete values in builtins@mpvl8326e67
  • internal/core/compileadd matchN builtin validator@mpvl1c2b105
  • internal/core/adtfix disjunctions in data mode@mpvl769f37a
  • internal/ciupdate goreleaser version@mvdan98a17d4
  • internal/third_party/yamldelete the old YAML decoder@mvdan4dbaf28
  • internal/cueversionbump for v0.11@mvdan0b27120
  • internal/core/exportupdate via CUE_UPDATE=1 go test@mvdan938c8de

pkg8

  • pkg/tool/fileuse 0o777 as the default Mkdir permissions@mvdana7ccc0a
  • pkg/tool/execRun does not exececute shell commands@mvdan1e65cee
  • pkg/listre-test with CUE_UPDATE=1@mvdan7e29e3d
  • pkg/uuiduse google/uuid.Validate in Valid@mvdane525f29
  • pkg/uuidadd more valid and invalid test cases@mvdana19cab1
  • pkg/listadd MatchN validator function@haoqixu48431d8
  • pkg/encoding/yamladd more validation tests@mpvlf889101
  • pkgadd some tests that pick defaults in builtins@mpvl0a41a20

tools3

  • tools/fixavoid name-mangled imports@cuematthew1440b9e
  • tools/fixcorrect the ast walker so sub-expressions get fixed@cuematthewd0617b5
  • tools/fixrewrite list addition and multiplication@cuematthew3d36560

Other3

  • ast/astutildeprecate Cursor.Import@cuematthew691ee74
  • core/adtidentify duplicate errors when pairwise-combining@cuematthew5a77ce1
  • evaluatorregression test for order independent eval fixed in evalv3@myitcv81d6f8b

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.11.0-alpha.1_darwin_amd64.tar.gza90adf5b62f52e3cc510a74fbfe5f5fffc55145050114b8abe8660c3e273237b
macOS, Apple siliconcue_v0.11.0-alpha.1_darwin_arm64.tar.gz71b9ce693a2100be1c3594b19dffea9f94649fec987b2c50fbae3d739e7b3ee2
Linux, x86-64cue_v0.11.0-alpha.1_linux_amd64.tar.gze5ce36c0572b6da22d84653c0a0574eecb6b7611ddfa0fa3a24cdeaf9eb24b8d
Linux, Arm64cue_v0.11.0-alpha.1_linux_arm64.tar.gz5510ec6b5716840c65c067bd7eca30893855f620e76d47d7c028b2af06d10f1c
Windows, x86-64cue_v0.11.0-alpha.1_windows_amd64.zip666bd0c87c4dfb80072549597a98a63daa926084fe2c2b6dcb68f0cc9dd1fc7f
Windows, Arm64cue_v0.11.0-alpha.1_windows_arm64.zipf0c89f3a5aa035a18e9de201c72f8d0171200b715307f04e2e7b920d4cd7cb5a

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

Install CUE