v0.11.0-alpha.5

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release introduces a new toposort evaluator experiment, fixes multiple bugs with the embed experiment, and includes more JSON Schema improvements.

Changes which may break some users are marked below with: ⚠️

Evaluator

A new experiment is introduced via CUE_EXPERIMENT=toposort which enables a more principled ordering of CUE fields as produced by cue export and cue eval. The intention is to ensure the old and new evaluators order fields of structs in the same way, in order to build confidence and ease the transition to the new evaluator. There are still a few wrinkles to work out, and the question of iteration order in comprehensions over structs remains to be tackled. An issue for gathering feedback is available.

CL 1202746 teaches CUE_STATS_FILE to start reporting the evaluator version being used, which is useful information when looking at performance stats.

CL 1203264 fixes a bug where CUE_EXPERIMENT=embed would work when outside of a CUE module, which should not work as it can lead to security risks.

CL 1203267 fixes a bug where CUE_EXPERIMENT=embed would not work with attributes attached to quoted field names.

CL 1203528 fixes a bug where CUE_EXPERIMENT=embed would not work with the cue cmd subcommand at all.

Go API

⚠️ CL 1203193 adds a new experiment via CUE_EXPERIMENT=decodeint64 which causes cue.Value.Decode to default to int64 rather than int when decoding CUE integer values. This ensures consistent behavior with 32-bit architectures.

⚠️ CL 1203192 tweaks the signature of cue.Index so that it accepts int64 as well as int for consistency with 32-bit architectures.

CL 1202744 tweaks cuecontext.EvalVersion so that the zero value is not a valid evaluator version, as that could lead to unintentional behavior.

cmd/cue

⚠️ CL 1203289 moves cuepls to cue lsp, enabling users to install one binary rather than two, and avoiding potential version discrepancies.

Encodings

JSON Schema spec compatibility is improved further by fixing a number of bugs and adding missing features.

All changes

34 changes since v0.11.0-alpha.4by area

cmd3

  • cmd/cueplsremove@myitcvdd85ce4
  • cmd/cueadd hidden lsp command@myitcv9faab39
  • cmd/cue,READMErevamp introductory text@mvdanc20ee10

cue10

  • cueKeep Vertex if returned from conversion of Go to CUE@cuematthewdbef7c5
  • cuepolish Go docs further@mvdanb3eed8b
  • cueteach old cue.Instance APIs to support @embed@mvdandeed7d5
  • cueimprove docs around AnyIndex and AnyString@mvdan73d4e25
  • cue/testdataadd regression test for a cycle bug fixed in evalv3@mvdanb96d6c1
  • cueadd experiment to default to int64 in Value.Decode for integers@mvdan00bd25b
  • cue/interpreter/embederror when embed is not in a module@rogpeppeedef548
  • cueadd test for embedded file not in a module@rogpeppe06d0c73
  • cuesupport Index calls with int64@mvdan8b2affe
  • cue/statsstart reporting which CUE evaluator version was used@mvdan956d746

encoding5

  • encoding/jsonschemacheck regexp syntax up front@rogpeppe1476fc7
  • encoding/jsonschemaadd test for field with regexp metacharacters@rogpeppe1300a2d
  • encoding/jsonschemaadd test case for empty field@rogpeppe8850ea7
  • encoding/jsonschemacheck regressions on a per-version basis@rogpeppe47c1559
  • encoding/jsonschemabetter treatment of arrays@rogpeppefc9a5a5

internal12

  • internal/core/adtshorter validator error message@rogpeppeaf459f1
  • internal/coreexpose topological sorting API@cuematthew8ff9db9
  • internal/coreadd explicit txtar test@cuematthewb780c0a
  • internal/coreadd support for toposort to evalv2@cuematthewc374e6c
  • internal/coreextract sorted features from Vertex@cuematthew65a15e2
  • internal/coresort graph topologically@cuematthewc6feea9
  • internal/corecalculate elementary cycles@cuematthew9ddb0ec
  • internal/corebuild graphs of Features@cuematthew5855903
  • internal/core/runtimeexternal attributes can use any concrete field name@rogpeppe0f6c51b
  • internal/cirun most tests on 32 bits too@mvdan0516cc6
  • internal/core/adtcatch if OpContext.Version is unset@mvdan52c4418
  • internalseparate the zero EvaluatorVersion value from EvalV2@mvdanf17356d

Other4

  • update to use latest published githubactions schema@rogpeppe93c1d7e
  • encoding/jsonschema: better constraints for additionalProperties and patternProperties@rogpeppe85f5ca8
  • allenable new sorting algorithm@cuematthewedad6fc
  • update golang.org/x deps for v0.11.0-alpha.5@mvdane83de3e

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.5_darwin_amd64.tar.gzf5d1c76aad668a6587cf32cfb0c8695f673dad7cb273fdc257e1bc1787b782ea
macOS, Apple siliconcue_v0.11.0-alpha.5_darwin_arm64.tar.gzf5905faec61c4bcac6072e0b4245204a4ba47f4cbaee0e16e858e17302b0d04f
Linux, x86-64cue_v0.11.0-alpha.5_linux_amd64.tar.gzbeb4b1135fec4ed8141342b6592bbe83d2248729a0b2b687adb5951040b98455
Linux, Arm64cue_v0.11.0-alpha.5_linux_arm64.tar.gz67d194d889580bd9e82e703bda0c6d988bb03a23e7937a3bd8920820d2532355
Windows, x86-64cue_v0.11.0-alpha.5_windows_amd64.zip514e5c98a1af74f8c7751f2d1dd06228bf2cf9e87cc14cb61375afcd8a91e9b8
Windows, Arm64cue_v0.11.0-alpha.5_windows_arm64.zip28e42ec74df7987ce2824a0f808da1125771aa43fa8fe979df47ad17a00622a8

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

Install CUE