Skip to content

v0.11.0-alpha.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@cueckoo cueckoo released this 25 Oct 08:17
· 152 commits to master since this release

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.

Full list of changes since v0.11.0-alpha.3
  • cue/errors: add package example by @mvdan in 80f4f23
  • internal/core/adt: impove arcType update logic by @mpvl in d28f285
  • internal/core/adt: add tests for issue 3533 by @mpvl in 7e82983
  • internal/core/adt: allow errors in inline structs by @mpvl in 62b21c8
  • internal/core/adt: add test case for selection problem by @mpvl in 9f46e1a
  • internal/core/adt: reimplement close for v3 by @mpvl in 02d5751
  • internal/core/adt: rename Closed to RecursivelyClosed by @mpvl in a6d8d34
  • interpreter/embed: do not require CUE_EXPERIMENT=embed by @rogpeppe in ea70704
  • internal/core/adt: fix logic error leading to panic by @mpvl in e58994d
  • tools/fix: merge calls to list.Concat by @cuematthew in 6167d7d
  • internal/core/adt: remove p1 error by @mpvl in 12ac20b
  • internal/core/adt: remove further evaluatingArcs logic by @mpvl in 8f42ad0
  • internal/core/adt: allow pending arcs to be updated by @mpvl in 9b07aba
  • internal/core/adt: evaluate nodes that are otherwise not evaluated by @mpvl in 5bf9ef4
  • internal/core/adt: get rid of use of evaluatingArcs status by @mpvl in 769017e
  • internal/core/adt: fix some references under projections by @mpvl in 6418113
  • internal/core/dep: fix differences by @mpvl in cc04ebe
  • internal/core/adt: disable possible assertion by @mpvl in 2fc301a
  • internal/core/adt: fix disjunction finalization by @mpvl in 62865d3
  • internal/core/adt: fix bug in notification by @mpvl in 1a30763
  • internal/core/adt: add indirection for closeContext by @mpvl in 0fa94ff
  • internal/core/adt: support bulk adding of conjuncts by @mpvl in b990eb7
  • internal/core/adt: more abstractions over Conjuncts by @mpvl in d21405c
  • internal/core/adt: better error positions by @mpvl in 6e0525b
  • internal/core/adt: introduce HasConjunct by @mpvl in 2bce38d
  • pkg/path: fix path issue by @mpvl in e9c005d
  • cue: resolve a few staticcheck warnings by @mvdan in 537f744
  • cue/interpreter: move test helpers to the right file by @mvdan in d9fda8c
  • cue/load: simplify registry example by @mvdan in 457a112
  • cue/load: fix @if attributes in command line-specified files by @rogpeppe in 4642d77
  • cmd/cue: add test case for issue 3250 by @rogpeppe in 0b6d0da
  • cue/cuecontext: cuecontext.New observes evalv3 experiment by default by @mpvl in be8ed35
  • cmd/cue/cmd: undo panic when multiple commands are run in one process by @mvdan in 860906a
  • cmd/cue/cmd: add a Go test covering the exposed API by @mvdan in 1f8fb57
  • internal/core/adt: fix hang on cyclic pattern constraints by @mpvl in b010875
  • internal/filetypes: default jsonschema strictFeatures to false by @rogpeppe in 3c40786
  • encoding/jsonschema: use allowedTypes in if/then/else constraints by @rogpeppe in 16986b2
  • encoding/jsonschema: add if/then/else test by @rogpeppe in 72023e6
  • encoding/jsonschema: disallow $schema at non-root for earlier versions by @rogpeppe in 2c6ed18
  • encoding/jsonschema: correct treatment of $ref by @rogpeppe in 4543183
  • encoding/jsonschema: simplify matchN expressions with only one possibility by @rogpeppe in 1508ef8
  • encoding/jsonschema: use latest schema version by default by @rogpeppe in 1a4b0d0
  • encoding/jsonschema: remove unused state fields by @rogpeppe in ded6fc3
  • internal/core/adt: less special handling for non-rooted by @mpvl in f5f947e
  • internal/core/adt: fix structural cycle error in list.Sum by @mpvl in 48b5a22
  • internal/core/adt: add RawFunc by @mpvl in cf2f66e
  • internal/core/adt: always allow definition in closed struct by @mpvl in 4e8e027
  • internal/core/adt: add tests for issue 3491 by @mpvl in 9ba55dc
  • cue: remove the hidden Value.Split method by @mvdan in 0dd7f69
  • cue: remove the hidden Value.Subsumes method by @mvdan in 80ddde3
  • cue: advance deprecation of Iterator methods by @mvdan in d170b1c
  • internal/core/adt: fix error type of MinFields for v3 by @mpvl in 44cceca
  • encoding/jsonschema: use CUE_UPDATE=force by @rogpeppe in ad21c10
  • encoding/jsonschema: use uint not number for min/maxLength by @rogpeppe in cff7484
  • encoding/jsonschema: always write external_teststats.txt by @rogpeppe in 66344b2
  • internal/core/adt: pass CloseInfo to validators by @mpvl in 369bc9b
  • internal/core/dep: distinghish inline structs by @mpvl in a50fa63
  • internal/core/adt: adapt handling of inline structs by @mpvl in 99407a4
  • all: annotate priority of bugs marked by TODO_V3 by @mpvl in 90b5c9d
  • internal/core/adt: more usage of Status by @mpvl in d581f90
  • internal/core/dep: dereference node in dynamic mode by @mpvl in 8399737
  • cue: open lists are still concrete by @rogpeppe in 1eb6216
  • internal/core/adt: closedness fix related to comprehension by @mpvl in cd2107a
  • internal/core/adt: hoist allows from injectClosed by @mpvl in 6916b5b
  • internal/core/adt: fix closedness for failing if by @mpvl in 89acced
  • encoding/openapi: add test cases for non-empty lists by @rogpeppe in 655236e
  • internal/core/debug: dereference non-rooted by @mpvl in 4ae206d
  • internal/core/adt: use depth counters for ancestor tracking by @mpvl in c558da0
  • internal/core/adt: fix cycle in patterns by @mpvl in 16df890
  • internal/core/adt: add tests for ring-shaped cycles by @mpvl in 695d6d3
  • internal/core/adt: derive status from shared value by @mpvl in f8c5520
  • internal/core/adt: distinguish point of cyclicity by @mpvl in af68c6c
  • internal/core/adt: more shallow evaluation of lists by @mpvl in 2d4a895
  • internal/core/adt: fix simplifcation of validators by @mpvl in 86fdd97
  • internal/core/adt: optimize slice by @mpvl in b51914f
  • internal/core/adt: add some defensive code by @mpvl in 4eaa7b2
  • internal/core/adt: add tests for more structure sharing by @mpvl in 29b466e
  • internal/core/export: add some testing infrastructure by @mpvl in 6e0f579
  • internal/core/export: document bug in export by @mpvl in 2eedbd1
  • internal/cuetdtest: add DevOnlyMatrix by @mpvl in b44f5e0
  • internal/core/export: remove exclusions of fixed bugs by @mpvl in a37223b
  • cue: derefernce more values by @mpvl in 1700400
  • encoding/protobuf: update txtpbfmt dependency by @TvdW in 4330d60
  • all: resolve a few more staticcheck warnings by @mvdan in 50ed297
  • internal/diff: drop last uses of cue.Value.Struct by @mvdan in 84646f6
  • internal/diff: drop cue.Value.Struct in diffStruct by @mvdan in 74c79f6
  • encoding/jsonschema: implement regex format by @rogpeppe in 95fd2e9
  • encoding/jsonschema: implement date-time format by @rogpeppe in c54ac60
  • encoding/jsonschema: implement URL-related formats by @rogpeppe in 44cdfe7
  • encoding/jsonschema: factor format checkers into their own file by @rogpeppe in 527594a
  • pkg/net: add URL and AbsURL by @rogpeppe in be87d05
  • internal/core/adt: set more precise types for validators by @mpvl in 37937f6
  • internal/core/adt: add tests for Issue 3474 by @mpvl in 575f1ed
  • cue: avoid repeated work in Value.MarshalJSON with lists by @mvdan in 8a6ed2c
  • internal/diff: clean up code a bit ahead of dropping deprecated APIs by @mvdan in 8009b56