v0.17.0-alpha.2
Changes which may break some users are marked below with: ⚠️
Language
The parser now allows a newline or a comma before the closing bracket of an index expression, matching how lists and func arguments allow omitting trailing commas:
foo[
"bar"
]Evaluator
The comprehension algorithm now waits to run a comprehension’s body until the fields it reads have a concrete value, rather than trying to produce its fields up front. This resolves a number of long-standing bugs, most notably the last known regressions from evalv2, where a comprehension that should have resolved instead failed as an incomplete value or a cycle.
This design also greatly simplifies upcoming evaluator work, such as introducing new builtins to replace comparing values to bottom, as well as the design of evalv4.
The evaluator no longer deduplicates errors just by position, which was causing some useful errors from disjunctions or standard library calls to be dropped incorrectly.
A number of bugs, panics, and hangs have been resolved as well.
cmd/cue
cue vet -d/--schema now supports hidden fields, and correctly reports an error when the command inputs are CUE only.
cue fix and cue trim no longer change file modification times when no changes are necessary.
Encodings
⚠️ The experimental JSON Schema encoder now emits most definitions without the leading # character, shortening names and ensuring compatibility with the wider JSON Schema ecosystem. This required deprecating encoding/jsonschema.GenerateConfig.NameFunc in favor of NamesFunc.
Several closedness bugs in the JSON Schema encoder have been fixed, ensuring that the generated JSON Schema behaves the same way as the original CUE definition.
The ProtoBuf decoder now resolves relative references following the usual scoping rules, instead of always resolving them against the top-level scope.
Go API
Add Path.Compare and Selector.Compare, providing allocation-free total ordering suitable for slices.SortFunc.
All changes
117 changes since v0.17.0-alpha.1by area
all3
alladopt the cueckoo @-import guidance mechanismallfix reversed argument order in cmp.Diff callsallmake use of strings.CutPrefix
cmd11
cmd/cuefix vet -d resolving a hidden constraintcmd/cueadd test for vet -d with a hidden constraintcmd/cueadd a regression test for issue 3187cmd/cueadd test for mixing Docker and Podman auth filescmd/cuepreserve mtimes in cue fix and cue trim no-op rewritescmd/cuedocument mtime drift in fix and trimcmd/cuefix json error tests on Go tipcmd/cue/cmdadd test for exec.Run JSON marshalingcmd/cuesurface [inputs] and [flags] in command helpcmd/cueerror when -d/--schema is used without non-CUE inputcmd/cuetest current -d behavior with only CUE input
cue28
cue/testdataadd test for list-length error with comprehensionscuefix Value.ReferencePath after Eval when sharing is disabledcueclarify Value.ReferencePath path semanticscue/errorsdeduplicate without rendering errors unnecessarilycue/errorsreport all distinct errors at the same positioncue/errorsadd a test recording how often removeMultiples renders errorscue/errorsadd tests for distinct errors dropped at the same positioncueavoid panic in Value.Path for dereferenced let bindingscue/testdata/cycleadd regression test for issue 4357cue/testdataadd #4149 regression test fororstructural cyclecue/testdataadd #4367 regression testscue/testdata/cycleadd regression test for issue 3364cue/parserallow a newline before the closing bracket of an index expressioncue/testdataadd regression test for self-referential builtin cyclescue/testdataadd test for issue #4312cue/testdataadd comprehension pushdown regression for inline conjunction iteratorcue/testdataadd test for issue #4174cue/testdataadd test for issue #4094cue/testdataadd test for issue #4091cue/parserremove pre-v0.2 alias special errorcue/parseradd test cases for pre-v0.2 alias handlingcue/parserremove dead error test codecueadd Unify regression test for comp-produced sub-vertexcue/testdataadd regression test cases to comprehensions/pushdowncuehandle ArcPending and ArcNotPresent in fromArcTypecuedrop stale same-runtime/build requirement from Value docscue/testdatarelax test assertions for refactoring stabilitycueadd Compare methods to Path and Selector
encoding11
encoding/jsonschemamark generation as experimentalencoding/protobuftranslate google.protobuf.Struct to an open structencoding/protobufrespect lexical scoping rulesencoding/inimake dotted section-name nesting configurableencoding/jsonschemafix closedness handling in Generateencoding/jsonschemapass closedness mode through OrOp in Generateencoding/jsonschemaadd test caseencoding/jsonschemaadd tests for closedness bugs in Generateencoding/jsonschemapropagate recursive closedness in Generateencoding/jsonschematest recursive closedness of generated schemasencoding/jsonschemabetter definition names in Generate
internal52
internal/cibump Go and goreleaser for the upcoming alphainternal/core/adtreport true element count for list length mismatchinternal/core/debugonly print integer-labeled arcs of a list valueinternal/filetypesclarify error for combined file type and file nameinternal/core/adtrecompute cached let results that resolved to a cycleinternal/cuetxtarkeep nested inline positions relativeinternal/core/adtdetect structural cycle through inline conjunctioninternal/core/compileupdate compile file commentsinternal/core/adtloosen structure-sharing skip in cycle detectioninternal/core/adtbound self-recursion in cycle detection skipinternal/core/adtdo not treat structure sharing as a cycleinternal/core/adtscope task context error before deferred tasksinternal/core/adtskip typo check on cross-context Finalizeinternal/mod/modregistrybump ociregistry to merge auth sourcesinternal/core/adtskip in-flight nodes when reclaiming buffersinternal/core/compileinclude label-aliased fields in cross-file scopeinternal/core/exportfix label references in pattern constraintsinternal/core/compilestrip @test attributes from mirrored inputsinternal/core/adtflush label-only cyclic CallExpr defermentsinternal/core/adtremove unused nodeContextState.hasOpenValidatorinternal/core/adtremove unused Bottom.Permanent fieldinternal/core/adtremove unused Bottom.ForCycle fieldinternal/core/adtremove unused StructLit.isComprehension fieldinternal/core/adtremove unused StructLit.IsOpen fieldinternal/ciset GORACE in the base configinternal/core/adtfix data race in concurrent FillPathinternal/core/compileisolate txtar goldensinternal/core/adtskip Disjunctions on ancestor-cycle arcsinternal/core/adtfix stale BaseValue cycle on cross-package importsinternal/core/adtre-deref v in Vertex.lookup after state.processinternal/core/adtdefer fieldSetKnown while a parent task is still activeinternal/core/adtdependency-tracking comprehension pushdowninternal/core/toposortinterleave sibling Repeats in field orderinginternal/core/exportadd another test for the toposort buginternal/core/exportadd topocomp regression testinternal/core/exportdedup conjuncts sharing the same body ASTinternal/core/adtadd reproducer for unity failureinternal/ciallow specifying a custom ref in checkoutCodeinternal/core/adtpropagate cycle errors via state in reportFieldErrorinternal/core/adttighten up statesinternal/core/adtadd some edge case testsinternal/golangorgxremove unused dead filesinternal/core/adtidentified faulty testsinternal/core/adtlocalize cycle in disjunct sharing pathinternal/core/adtyield on incomplete reference to in-flight nodeinternal/cuetxtarhonor any= in cmpErr (nested @test(err, any, ...))internal/cuetxtarreplay source @test directives for permuteinternal/cuetxtarrender struct-level errors as bare _|_ with err annotationinternal/cuetxtarauto-promote @test(eq:todo) under CUE_UPDATEinternal/cuetxtartighten cmpStruct/cmpConjunction against silent passesinternal/core/adtforce update cleanupinternal/anyhashnew package
pkg5
pkg/listreport a missing less field as a fatal errorpkg/encodingreport every Validate conflictpkg/encodingadd tests for Validate reporting a single conflictpkg/listadd a regression test for list error printing hidden arcspkg/tool/execdefault env to an empty struct
Other7
.claudeadd a skill to draft release notes from a commit logmod/modconfigdelete the dummy $DOCKER_CONFIG dir when the tests are donemodconfigupdate ociregistry to pick up ociauth fix- update dependencies ahead of the next alpha release
mod/modcacheretry .partial file writes on Windows- add a SECURITY.md for easier GitHub discovery
tools/fixremove the unused processor type
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_8c8331200b9dd161758d665443447913198241b104186fc7986f43367f63901d |
| macOS, Apple silicon | cue_da725b063893748db3b8256a72efae81ad5a461217262072455189285e3eacd6 |
| Linux, x86-64 | cue_04bc21f137b948d6e086b1cecaf5fb32ca2344057cad04cc99137e2e0a7aefa1 |
| Linux, Arm64 | cue_586f5b3cbb8e8df79c6bb1a646291c31ebbc5f4a9da6ff9802cee6df0a290eab |
| Windows, x86-64 | cue_def9ecc56bc8a2d3eb23d5502a8a5a83703e1ede54f8daec0890abb760d0f139 |
| Windows, Arm64 | cue_ab8fe35958572f468b2ea794e665686bd75fb8d5bfe2995b5b53974376a59a2d |