v0.11.0-alpha.4

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release fixes dozens of bugs in the old and new evaluators and includes more JSON Shema improvements.

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

Evaluator

Over a dozen closedness and cycle detection bugs have been fixed in CUE_EXPERIMENT=evalv3, including a few which caused panics or endless evaluation.

CL 1202685 tweaks cuecontext.New to follow CUE_EVALUATOR=evalv3 when the cuecontext.EvaluatorVersion option is not used.

CL 1202903 fixes embed.New so that it works without needing to set CUE_EXPERIMENT=embed as well.

CLs 1202120 and 1202211 fix a number of issues where validators like matchN or struct.MinFields would give incorrect results.

Go API

⚠️ CL 1202244 tweaks the cue.Value API to consider open lists as concrete, aligning with the spec.

⚠️ CLs 1202285 and 1202286 remove the cue.Value.Subsumes and cue.Value.Split methods, which have been deprecated and hidden for years.

Encodings

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

Builtins

CL 1202104 adds the net.URL and net.AbsURL validators, needed by JSON Schema.

All changes

95 changes since v0.11.0-alpha.3by area

cmd3

  • cmd/cueadd test case for issue 3250@rogpeppe0b6d0da
  • cmd/cue/cmdundo panic when multiple commands are run in one process@mvdan860906a
  • cmd/cue/cmdadd a Go test covering the exposed API@mvdan1f8fb57

cue12

  • cue/errorsadd package example@mvdan80f4f23
  • cueresolve a few staticcheck warnings@mvdan537f744
  • cue/interpretermove test helpers to the right file@mvdand9fda8c
  • cue/loadsimplify registry example@mvdan457a112
  • cue/loadfix @if attributes in command line-specified files@rogpeppe4642d77
  • cue/cuecontextcuecontext.New observes evalv3 experiment by default@mpvlbe8ed35
  • cueremove the hidden Value.Split method@mvdan0dd7f69
  • cueremove the hidden Value.Subsumes method@mvdan80ddde3
  • cueadvance deprecation of Iterator methods@mvdand170b1c
  • cueopen lists are still concrete@rogpeppe1eb6216
  • cuederefernce more values@mpvl1700400
  • cueavoid repeated work in Value.MarshalJSON with lists@mvdan8a6ed2c

encoding16

  • encoding/jsonschemause allowedTypes in if/then/else constraints@rogpeppe16986b2
  • encoding/jsonschemaadd if/then/else test@rogpeppe72023e6
  • encoding/jsonschemadisallow $schema at non-root for earlier versions@rogpeppe2c6ed18
  • encoding/jsonschemacorrect treatment of $ref@rogpeppe4543183
  • encoding/jsonschemasimplify matchN expressions with only one possibility@rogpeppe1508ef8
  • encoding/jsonschemause latest schema version by default@rogpeppe1a4b0d0
  • encoding/jsonschemaremove unused state fields@rogpeppeded6fc3
  • encoding/jsonschemause CUE_UPDATE=force@rogpeppead21c10
  • encoding/jsonschemause uint not number for min/maxLength@rogpeppecff7484
  • encoding/jsonschemaalways write external_teststats.txt@rogpeppe66344b2
  • encoding/openapiadd test cases for non-empty lists@rogpeppe655236e
  • encoding/protobufupdate txtpbfmt dependency@TvdW4330d60
  • encoding/jsonschemaimplement regex format@rogpeppe95fd2e9
  • encoding/jsonschemaimplement date-time format@rogpeppec54ac60
  • encoding/jsonschemaimplement URL-related formats@rogpeppe44cdfe7
  • encoding/jsonschemafactor format checkers into their own file@rogpeppe527594a

internal58

  • internal/core/adtimpove arcType update logic@mpvld28f285
  • internal/core/adtadd tests for issue 3533@mpvl7e82983
  • internal/core/adtallow errors in inline structs@mpvl62b21c8
  • internal/core/adtadd test case for selection problem@mpvl9f46e1a
  • internal/core/adtreimplement close for v3@mpvl02d5751
  • internal/core/adtrename Closed to RecursivelyClosed@mpvla6d8d34
  • internal/core/adtfix logic error leading to panic@mpvle58994d
  • internal/core/adtremove p1 error@mpvl12ac20b
  • internal/core/adtremove further evaluatingArcs logic@mpvl8f42ad0
  • internal/core/adtallow pending arcs to be updated@mpvl9b07aba
  • internal/core/adtevaluate nodes that are otherwise not evaluated@mpvl5bf9ef4
  • internal/core/adtget rid of use of evaluatingArcs status@mpvl769017e
  • internal/core/adtfix some references under projections@mpvl6418113
  • internal/core/depfix differences@mpvlcc04ebe
  • internal/core/adtdisable possible assertion@mpvl2fc301a
  • internal/core/adtfix disjunction finalization@mpvl62865d3
  • internal/core/adtfix bug in notification@mpvl1a30763
  • internal/core/adtadd indirection for closeContext@mpvl0fa94ff
  • internal/core/adtsupport bulk adding of conjuncts@mpvlb990eb7
  • internal/core/adtmore abstractions over Conjuncts@mpvld21405c
  • internal/core/adtbetter error positions@mpvl6e0525b
  • internal/core/adtintroduce HasConjunct@mpvl2bce38d
  • internal/core/adtfix hang on cyclic pattern constraints@mpvlb010875
  • internal/filetypesdefault jsonschema strictFeatures to false@rogpeppe3c40786
  • internal/core/adtless special handling for non-rooted@mpvlf5f947e
  • internal/core/adtfix structural cycle error in list.Sum@mpvl48b5a22
  • internal/core/adtadd RawFunc@mpvlcf2f66e
  • internal/core/adtalways allow definition in closed struct@mpvl4e8e027
  • internal/core/adtadd tests for issue 3491@mpvl9ba55dc
  • internal/core/adtfix error type of MinFields for v3@mpvl44cceca
  • internal/core/adtpass CloseInfo to validators@mpvl369bc9b
  • internal/core/depdistinghish inline structs@mpvla50fa63
  • internal/core/adtadapt handling of inline structs@mpvl99407a4
  • internal/core/adtmore usage of Status@mpvld581f90
  • internal/core/depdereference node in dynamic mode@mpvl8399737
  • internal/core/adtclosedness fix related to comprehension@mpvlcd2107a
  • internal/core/adthoist allows from injectClosed@mpvl6916b5b
  • internal/core/adtfix closedness for failing if@mpvl89acced
  • internal/core/debugdereference non-rooted@mpvl4ae206d
  • internal/core/adtuse depth counters for ancestor tracking@mpvlc558da0
  • internal/core/adtfix cycle in patterns@mpvl16df890
  • internal/core/adtadd tests for ring-shaped cycles@mpvl695d6d3
  • internal/core/adtderive status from shared value@mpvlf8c5520
  • internal/core/adtdistinguish point of cyclicity@mpvlaf68c6c
  • internal/core/adtmore shallow evaluation of lists@mpvl2d4a895
  • internal/core/adtfix simplifcation of validators@mpvl86fdd97
  • internal/core/adtoptimize slice@mpvlb51914f
  • internal/core/adtadd some defensive code@mpvl4eaa7b2
  • internal/core/adtadd tests for more structure sharing@mpvl29b466e
  • internal/core/exportadd some testing infrastructure@mpvl6e0f579
  • internal/core/exportdocument bug in export@mpvl2eedbd1
  • internal/cuetdtestadd DevOnlyMatrix@mpvlb44f5e0
  • internal/core/exportremove exclusions of fixed bugs@mpvla37223b
  • internal/diffdrop last uses of cue.Value.Struct@mvdan84646f6
  • internal/diffdrop cue.Value.Struct in diffStruct@mvdan74c79f6
  • internal/core/adtset more precise types for validators@mpvl37937f6
  • internal/core/adtadd tests for Issue 3474@mpvl575f1ed
  • internal/diffclean up code a bit ahead of dropping deprecated APIs@mvdan8009b56

Other6

  • interpreter/embeddo not require CUE_EXPERIMENT=embed@rogpeppeea70704
  • tools/fixmerge calls to list.Concat@cuematthew6167d7d
  • pkg/pathfix path issue@mpvle9c005d
  • allannotate priority of bugs marked by TODO_V3@mpvl90b5c9d
  • allresolve a few more staticcheck warnings@mvdan50ed297
  • pkg/netadd URL and AbsURL@rogpeppebe87d05

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.4_darwin_amd64.tar.gza8c3f2c5cf8185b1fdc2b3ac27e30f0b4105cc2a24376301e9459c47dcc5db60
macOS, Apple siliconcue_v0.11.0-alpha.4_darwin_arm64.tar.gz754fa4c8fb50104eb16ca06924e3a324696d30554af2ec12a1a9283e40540378
Linux, x86-64cue_v0.11.0-alpha.4_linux_amd64.tar.gz72ddb5900a4ffd37616629db0c966f730f325a4253e128968c095a126022dfac
Linux, Arm64cue_v0.11.0-alpha.4_linux_arm64.tar.gzb622e64e67a43230c95b4e421ddb33c906d316fe175ff24100936958e9e55666
Windows, x86-64cue_v0.11.0-alpha.4_windows_amd64.zipa2d193e7f6e691473fb963408272094918c32c2cf59dd95cd87763024e16f05d
Windows, Arm64cue_v0.11.0-alpha.4_windows_arm64.zipa45c39b045749918beb83e835150db60bb14dfae418c65cb71b0cf077ab54205

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

Install CUE