v0.12.0-alpha.1
This release fixes many bugs in the new evaluator, enables the embedding experiment by default, and further improves JSON Schema support.
Changes which may break some users are marked below with: ⚠️
Evaluator
CLs 1204365, 1205361, and 1205363 fix a number of closedness issues in the new evaluator, which were spotted thanks to user reports and Unity testing.
CLs 1204490, 1205368, and 1205368 resolve a number of significant performance issues spotted in the new evaluator.
CL 1205861 enables the Embedding proposal via CUE_EXPERIMENT=embed by default, now that the proposal has been moved to a “likely accept” state for v0.12.
CL 1204491 introduces CUE_DEBUG=openinline, enabled by default, which emulates the old evaluator’s incorrect closedness behavior in some edge cases. This should help the transition towards the new evaluator, and allow us to fix the behavior of these edge cases in future CUE releases.
CL 1204608 introduces CUE_DEBUG=sortfields which sorts all struct fields lexicographically. This replaces CUE_DEBUG_SORT_ARCS=1, which did not work with the new evaluator.
Go API
⚠️ CL 1205569 enables CUE_EXPERIMENT=decodeint64 by default, causing cue.Value.Decode to choose int64 rather than int as the default Go type for CUE integer values.
Builtins
CL 1204378 teaches list.UniqueItems to handle incomplete values correctly, fixing a bug in JSON Schema.
CL 1204425 fixes list.MatchN so that it matches final values, like the matchN evaluator built-in, fixing a bug in JSON Schema.
⚠️ CL 1204920 removes the long-deprecated cue.Value.IsClosed method.
⚠️ CL 1205530 removes the long-deprecated cue.Instance.Doc method.
⚠️ CL 1205529 removes the long-deprecated cue/load.Config.BuildTags field.
cmd/cue
CL 1204111 fixes some edge cases where CUE comments were lost or duplicated, particularly with cue def.
CL 1204874 re-enables command suggestions when a user makes a typo like cue exprot.
Encodings
JSON Schema spec compatibility is improved further by fixing a number of bugs and adding missing features. Notably, it now supports arbitrary references to internal structure in $ref. JSON Schema’s spec test suite has gone from a “pass” rate of 75% to 79% thanks to these efforts.
All changes
119 changes since v0.11.0by area
all4
allsunset CUE_EXPERIMENT=modulesallCUE_EXPERIMENT=modules no longer needs to be set in testsallfix "a the", "the a", and "the the" mistakesallfix testdata remnants of cue/format indenting first lines
cmd12
cmd/cueremove support for CUE_DEBUG_SORT_ARCScmd/cuefix spelling of CUE_EXPERIMENT for evalv2cmd/cueadd new CUE_EXPERIMENT and CUE_DEBUG flags tohelp environmentcmd/cueadd regression test for #3616cmd/cuededuplicate the use of CUE_EXPERIMENT=evalv3cmd/cueadd a testscript for CUE_DEBUG=sortfields working with the Go APIcmd/cueenable subcommand suggestions when a user makes a typocmd/cueadd a test case for a subcommand typocmd/cueadd tests for the loss of comments withcue defcmd/cueadd test for the loss of comments withcue defcmd/cuewire up CUE_DEBUG into the runtime for evalv2cmd/cueadd integration test for CUE_DEBUG=sortfields
cue22
cue/loadassume that Config.Registry is set when SkipImports is falsecue/ast/astutilensure imports always start a new sectioncue/ast/astutiladd test for file-level comments joining with importscue/astremove outdated docscueenable CUE_EXPERIMENT=decodeint64 by defaultcueadd more godoc linkscueremove Instance.Doccue/loadremove Config.BuildTagscueuse embedding for UnifyAccept in V3cue/parseralways allow predeclared identifiers on RHScue/errorssimplify printErrorcueuse Value.ctx helper method consistentlycuerewrite away all uses of Iterator.Labelcuereenable Allows(AnyDefinition) test case with a TODOcueremove the deprecated and hidden Value.IsClosed methodcueuse cue/literal to parse integers out of attributescueadd an attribute test with a non-Go integer literalcuemake the tests non-chatty by defaultcuefix loss or duplication of commentscuefix the loss of comments inValue.Syntax()cue/loadsupport loading a CUE package whose directory ends with .cuecuefix Value.Unify closedness issues for evalv3
encoding20
encoding/jsonschemarespect Config.PkgNameencoding/jsonschemaadd test for Config.PkgNameencoding/jsonschemaimplementConfig.DefineSchemaencoding/jsonschemaupdate external test errorsencoding/jsonschemarefactor reference handlingencoding/jsonschemaadd structBuilder typeencoding/openapifix updating golden files in testsencoding/jsonschemadefine isTop and isBottom functionsencoding/jsonschemado not use explicit phase for TODO constraintsencoding/jsonschemaremove isSchema fieldencoding/openapisimplify looping over CUE fieldsencoding/jsonschemasimplify ref logic without changing behaviourencoding/jsonschemado not return state from schemaStateencoding/jsonschemainclude doc comments for definitionsencoding/jsonschemaadd test for a doc comment on a definitionencoding/jsonschemafix oneOf with unconstrained elementsencoding/jsonschemaadd test case for issue 3586encoding/jsonschemaclose structs and mark fields as required in enum and constencoding/jsonschemaprevent invalid end position of id tagencoding/jsonschemaadd a test for panicking about invalid pos
internal46
internal/ciupdate Go and goreleaser versions for the next releaseinternal/cueexperimentenable embed experiment by defaultinternal/astinternaladd IncludePointersinternal/mod/modloadsort module versions when adding a new dependencyinternal/core/adtremove resolved TODOinternal/core/adtmore pruning in partial disjunction checkinternal/core/adtsupport simplifying string boundsinternal/core/adtorder bound error messagesinternal/core/adtfix bug in bound simplificationinternal/core/adtrevert recent changeinternal/core/adtpatch performance issue related to error reportinginternal/core/adtalternative algorithm for splitting treesinternal/core/adtfix closedness bug with patternsinternal/core/adtpass closeContext to openDebugGraphinternal/core/adtalways create new closeContext on referenceinternal/core/adtadd various closedness testsinternal/core/adtcleanup some todosinternal/core/adtalso handle __no_sharing for V2internal/ciuse pull_request_target for PR CI jobsinternal/core/adtfix dropping of fieldinternal/core/adtmake Conjuncts type ConjunctGroupinternal/core/adtsimplify codeinternal/core/adtadd test for dropped field issueinternal/core/adtallow selectively turning off sharinginternal/core/runtimeconsistently follow CUE_DEBUG env var flagsinternal/core/adtclose previously fixed issueinternal/core/adtadd tests for Issue 3535internal/ciuse the new tipdeploy workflow in cuelang.orginternal/astinternalmake it easier to debug referencesinternal/cistart enforcing staticcheck in CIinternal/core/adtinlining simplificationinternal/cuedebugrename filesinternal/cueexperimentremove yamlv3experimentinternal/core/adtadd compatibility mode for issue 3534internal/core/adtadd tests for issue 3534internal/core/adtadd compatibiltiy mode for closedness issueinternal/core/adtimprove structure sharing in cyclesinternal/core/adtadd test for perfromance issue 3587internal/core/adtdisable prep for associative listsinternal/core/adtfix error checkinginternal/core/adtadd tests for disjunction eliminationinternal/core/toposortsupport sorting fields lexicographicallyinternal/cidelete completed TODO about the old registry tokensinternal/ciupdate Linux to ubuntu-24.04internal/tdtestmake compatible with cuetdtestinternal/cueversionbump LanguageVersion for v0.12
pkg4
pkg/listMatchN matches in final modepkg/listadd tests for issue 3519pkg/listhandle incomplete values for UniqueItemspkg/listadd tests for UniqueItems
Other11
- update most dependencies ahead of v0.12.0-alpha.1
evaluatoradd regression test to lock in evalv3 wrt #3567READMEupdate version number in installation example- enable and fix "value never used" staticcheck rule
- enable and fix "non-generic receiver names" staticcheck rule
- add staticcheck config files to appease the linter
- Revert "cmd/cue: add test for the loss of comments with
cue def" - Revert "cue: fix the loss of comments in
Value.Syntax()" docdon't vendor a copy of DCO, as it is under another license- update txtpbfmt dependency
- update golang.org/x dependencies
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_87c0b79c25a0adae247c86adbec740d44641cd953e655a871217a7fc37e17ae5 |
| macOS, Apple silicon | cue_d24231495cae6efe672bb7fc757a297bf9543e2ea2896f94a03db525bdb50056 |
| Linux, x86-64 | cue_c1a3c45f5b0c29a6095d10514a80f5e940a1820a729640e747050f9f544c4a59 |
| Linux, Arm64 | cue_7bd0517dae8d994790b24818f59bc67abe8ff8ed9e308148b62f31b45a2fa20d |
| Windows, x86-64 | cue_43844d66b615037fb0e52bb5fedaa4716604b66637f6579ac6f7c5d9423a7d35 |
| Windows, Arm64 | cue_86edcb7bdcc3aa59e0158b2cf8c40b6feb34563e7d5ca9b4246dd70388bb85fa |
SHA-256 checksums for all of these: checksums.txt