v0.3.0-beta.4

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

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 workflowf0d1fa4
  • cidrop go1.13 from build matrix; add go1.16rc110a48e9
  • cifix broken builde097927
  • cifix job dependency in test workflow34333ce
  • cifix start message of CI jobs for CL builds726d93e
  • cifix workflow definitions9b7fc4b
  • cionly go test -race on latest Go+linux, and master3088513
  • cirefactor CI setup5b3d551
  • cirename repository dispatch workflow2338b59
  • ciupdate version of Go for go generate to 1.14.14ef59f61

cmd6

  • cmd/cue/cmdallow fmt to pass with errors257486c
  • cmd/cueadd goproxytest instance for script testsdfce25c
  • cmd/cueallow CUE_UPDATE to update cmd/cue/cmd testscript testsb8d9972
  • cmd/cueembed packages required for get go checkinga616925
  • cmd/cuefix typo in cmd documentation headline22aafc2
  • cmd/cueuse gotooltest within testscript tests37c16cc

cue3

  • cue/scannerfix JSON conformanced9d0487
  • cueallow LookupDef on embedded scalarsba8eb37
  • cuedeprecate Mergec6f1287

doc3

  • doc/../43_schema.txtremove unnecessary wordf73e78f
  • docfix typo in types tutorial (closed -> close)6c3be7f
  • docremove duplicate command from Kubernetes tutorial2df92cb

internal19

  • internal/core/adt"fix" disjunction resolution63104c8
  • internal/core/adtcache evaluation results for dynamic fields2ca6c5e
  • internal/core/adtdon't check cycles for inlined arcsc866a51
  • internal/core/adtfix benign memory leak6b96001
  • internal/core/adtfix bottom cycle errorb8b4892
  • internal/core/adtfix bug that left errors of incompleted expressions unreportedc091274
  • internal/core/adtfix memory leak9c5489f
  • internal/core/adtfix nil panicee78ec3
  • internal/core/adtfix regressions in disjunct elimination8d537aa
  • internal/core/adtfix special cycle conditione6a2fb0
  • internal/core/adtmore fixes to cycle handlingbedb047
  • internal/core/adtmore merging of adt and former eval8334a9e
  • internal/core/adtrefactor node lookupd0124e2
  • internal/core/adtrestrict notification0ad02fd
  • internal/core/exportdon't embed proper conjunctsd2aa995
  • internal/core/exportfix optional output bug76a72c4
  • internal/core/exportretain top in embedded scalarsfdccfbc
  • internal/core/exportsupport package and struct attributes34587b9
  • internal/filetypesfix test breakagedfaea59

Other7

  • alladd tests for the GitHub workflow process09cd07b
  • encoding/gocodeuse FieldByName in generated codeb360fe4
  • generalmove from godoc.org to pkg.go.dev for documentation7110020
  • generalremove junk filesd5d5fd1
  • pkgconsistently use 0666 as perm when creating regular files10180b6
  • tools/fixeliminate x & _ and unnecessary parensf55f17e
  • tools/flowreplace package doc example with real example611d622

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_0.3.0-beta.4_Darwin_x86_64.tar.gzcdbc2d9b0ae42f9f458ef72cfdceee1791420fa780a46d14b53f36f6554d1ff3
Linux, Arm64cue_0.3.0-beta.4_Linux_arm64.tar.gzd40b12e70b05ded701c2edd6fc6d24fa01555801e96d9acf788c86221bcea63b
Linux, x86-64cue_0.3.0-beta.4_Linux_x86_64.tar.gzb788f219a20f6bbb3f54923d164ce44052bbf4b903398def677114ae014efb61
Windows, x86-64cue_0.3.0-beta.4_Windows_x86_64.zipf685bbcab9f93a712b2f1feb7acd0b77bd02ea2a5efc2505d8f84975d974e5f6

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

Install CUE