v0.3.0-beta.4
This release has some important bug fixes related to performance, disjunctions, and performance of disjunctions.
Backwards compatibility
As a result of the disjunction rework, we introduced another internal workaround for dealing with the fact that there is no good way to represent proto oneOf fields in CUE. Right now this is done as
*{} | { a: int } | { b: int }or
*{} | { a?: int } | { b?: int }The need for the default is because one cannot say that a field must exist. So the default is used to disambiguate. This works well for one set of oneOfs, but not in the presence of multiple oneOfs.
A previous hack would unmark a disjunction as having a default if all but one of the defaults remains. After the critical performance improvements, this still worked, but only because these changes introduced a bug. Now this is fixed we can no longer rely on it. To keep protobuf working, there is now another hack that recognizes this pattern and adjusts defaults in a similar manner.
This is an unacceptable solution, of course. The idea is to allow specifying required fields instead, somewhat like this
{} | { a!: int } | { b!: int }and transition to this model.
The required field specification has many benefits and solves several modeling limitations of CUE we’ve encountered since its inception. It can also almost, if not entirely, eliminate the need for ?, provides a solution for some limitations of the proposed query syntax, and generally provides better alternatives for cases where one finds the need to abuse defaults.
We plan to officially introduce this construct in a proposal soon.
All changes
48 changesby area
ci10
ciadd first version of copybara workflowcidrop go1.13 from build matrix; add go1.16rc1cifix broken buildcifix job dependency in test workflowcifix start message of CI jobs for CL buildscifix workflow definitionscionly go test -race on latest Go+linux, and mastercirefactor CI setupcirename repository dispatch workflowciupdate version of Go for go generate to 1.14.14
cmd6
cmd/cue/cmdallow fmt to pass with errorscmd/cueadd goproxytest instance for script testscmd/cueallow CUE_UPDATE to update cmd/cue/cmd testscript testscmd/cueembed packages required for get go checkingcmd/cuefix typo in cmd documentation headlinecmd/cueuse gotooltest within testscript tests
cue3
cue/scannerfix JSON conformancecueallow LookupDef on embedded scalarscuedeprecate Merge
doc3
doc/../43_schema.txtremove unnecessary worddocfix typo in types tutorial (closed -> close)docremove duplicate command from Kubernetes tutorial
internal19
internal/core/adt"fix" disjunction resolutioninternal/core/adtcache evaluation results for dynamic fieldsinternal/core/adtdon't check cycles for inlined arcsinternal/core/adtfix benign memory leakinternal/core/adtfix bottom cycle errorinternal/core/adtfix bug that left errors of incompleted expressions unreportedinternal/core/adtfix memory leakinternal/core/adtfix nil panicinternal/core/adtfix regressions in disjunct eliminationinternal/core/adtfix special cycle conditioninternal/core/adtmore fixes to cycle handlinginternal/core/adtmore merging of adt and former evalinternal/core/adtrefactor node lookupinternal/core/adtrestrict notificationinternal/core/exportdon't embed proper conjunctsinternal/core/exportfix optional output buginternal/core/exportretain top in embedded scalarsinternal/core/exportsupport package and struct attributesinternal/filetypesfix test breakage
Other7
alladd tests for the GitHub workflow processencoding/gocodeuse FieldByName in generated codegeneralmove from godoc.org to pkg.go.dev for documentationgeneralremove junk filespkgconsistently use 0666 as perm when creating regular filestools/fixeliminate x & _ and unnecessary parenstools/flowreplace package doc example with real example
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_cdbc2d9b0ae42f9f458ef72cfdceee1791420fa780a46d14b53f36f6554d1ff3 |
| Linux, Arm64 | cue_d40b12e70b05ded701c2edd6fc6d24fa01555801e96d9acf788c86221bcea63b |
| Linux, x86-64 | cue_b788f219a20f6bbb3f54923d164ce44052bbf4b903398def677114ae014efb61 |
| Windows, x86-64 | cue_f685bbcab9f93a712b2f1feb7acd0b77bd02ea2a5efc2505d8f84975d974e5f6 |
SHA-256 checksums for all of these: checksums.txt