github cue-lang/cue v0.9.0-alpha.4

latest releases: v0.11.0-rc.1, v0.11.0-alpha.5, v0.11.0-alpha.4...
pre-release6 months ago

This release includes changes to the evaluator and modules experiments, as well as a number of other improvements and fixes.

Evaluator

Following the introduction of the new evaluator experiment in v0.8.0-alpha.2 via CUE_EXPERIMENT=evalv3, this release includes a number of fixes to known bugs in the new evaluator, as well as significant work towards supporting the new evaluator experiment via the Go API and not just cmd/cue.

Subscribe to the Performance umbrella issue for updates, and see the Evaluator Roadmap project for the planned work ahead.

Modules

CL 1194090 adds the --dry-run, --json, and --out flags to cue mod publish to inspect what would be published as part of a module version.

CL 1194106 adds the cue mod resolve command to show how a module path resolves to a registry in the form of an OCI reference.

As a reminder, the ongoing and planned work can be seen in the Modules Roadmap, and we continue to hold regular Modules feedback sessions.

Go API

CL 1193759 teaches cue/format to collapse empty lists and structs to a single line for consistent formatting.

Builtins

CL 1193690 fixes math.MultipleOf as it had an incorrect implementation which could easily return bad results.

cmd/cue

CL 1193778 adds a cue fmt --diff flag which displays diffs instead of updating files.

CL 1193934 improves cue fmt so that it does not write to files on disk which are already well formatted.

Full list of changes since v0.9.0-alpha.3
  • cue: add regression test for issue 3042 by @mvdan in 612f1ae
  • cue: remove TODO for TestExpr by @mpvl in 21b0039
  • internal/core/adt: delay dereferencing in lookup by @mpvl in 7dd29f1
  • internal/core/export: handle ConjunctGroups by @mpvl in 8935df9
  • cue: exempt test for DisallowCycle by @mpvl in 1259cf9
  • cue: fix some matrix tests by @mpvl in d3ed229
  • internal/core/adt: disable dereference for new evaluator by @mpvl in aa42655
  • internal/core/adt: move and rename Indirect by @mpvl in 759f26e
  • cmd/cue: fail cue fmt if arg import path doesn't exist by @NoamTD in d9c5ae0
  • cmd/cue: document -ldflags for local release builds by @mvdan in f9c2de9
  • all: remove some unused code and other minor cleanups by @mvdan in 6132343
  • cmd/cue: new "mod resolve" command by @rogpeppe in 59a0d3c
  • internal/core/adt: fix missing dereference for equal by @mpvl in bc3e24c
  • cue: fix Allows for new evaluator by @mpvl in 6e48c0d
  • cmd/cue: add dry run flag to cue mod publish by @rogpeppe in 82bcda5
  • internal/core/adt: fix missing field error message by @mpvl in b6a2637
  • cue: ignore some tests for TestPos by @mpvl in 71220e6
  • cue: set DynamicLabel by @mpvl in fa3bf5f
  • cue/ast: move WalkVisitor and Visitor to astutil and unexport them by @mvdan in 05640c2
  • cue/ast: don't walk comments twice by @mvdan in fd64550
  • cue/ast: implement Visitor walking in terms of func walking by @mvdan in 30f7d28
  • internal/cueversion: construct pseudoversion when possible by @rogpeppe in caa1e98
  • internal/cueversion: split language and module versions by @rogpeppe in 2f90f54
  • ast/astutil: use more generics to reduce duplication by @mvdan in d696e44
  • cue/ast: add WalkVisitor to share with cue/ast/astutil by @mvdan in bf733fb
  • internal/core/adt: fix matchPattern by @mpvl in 72ba528
  • cue: fix IsClosed for new evaluator by @mpvl in 9cf30f1
  • cue: fix default handling for new evaluator by @mpvl in 4a8a873
  • cue/ast/astutil: remove quoted identifiers remnant by @mvdan in b3f170a
  • internal/core/adt: do not dereference for newChildValue by @mpvl in adea575
  • internal/core/adt: dereference default by @mpvl in 14e1ef2
  • internal/core/debug: omit ConjunctGroups in compact mode by @mpvl in c6701b4
  • internal/core/adt: enable matrix testing by @mpvl in 8b6705c
  • cue: allow a tests to run with a variety of options by @mpvl in 548dd7c
  • mod/modfile: better error message when disallowed field is used by @rogpeppe in fdf75f5
  • cue/cmd: always write stdin to stdout in cue fmt by @NoamTD in 70cc402
  • cue: change getInstance to getValue by @mpvl in ebcf2f5
  • internal/core/adt: avoid loops in debug printing by @mpvl in bae8bbf
  • internal/core/adt: clean up indirects and mark disjuncts by @mpvl in 831374c
  • internal/core/adt: avoid hang with let processing by @mpvl in 382e4be
  • internal/core/adt: introduce new cycle detection mechanism by @mpvl in fb37710
  • cue/token: relative positions apply before, not after, a token by @mvdan in 1dda583
  • cue/cmd: avoid overwriting formatted files in cue fmt by @NoamTD in fb9961a
  • cmd/cue: add cue fmt --diff flag by @NoamTD in fcae10b
  • cmd/cue: use fmt --check in the fmt_multi testscript by @mvdan in 68cd040
  • cmd/cue: improve stdin input handling in cue fmt --check by @NoamTD in f254cc3
  • cmd/cue: make cue fmt --check print files immediately by @NoamTD in 9e121cb
  • cue/load: clean up some var names and code organization by @NoamTD in 41063b7
  • encoding/protobuf: include annotations heading by @jpluscplusm in 35af5a1
  • cue/testdata: update todos on various tests by @mpvl in de5d0cf
  • internal/core/adt: do not share "inlined" structs by @mpvl in 1711c14
  • internal/core/adt: prevent cyclic printing by @mpvl in 1860e39
  • internal/core/adt: disable panic with TODO by @mpvl in 52c4c32
  • mod/modregistry: allow RegistryResolver to return ErrRegistryNotFound by @rogpeppe in 89ae7d7
  • pkg/math: fix MultipleOf algorithm by @NoamTD in c8cc462
  • cue/math: add tests for MultipleOf by @NoamTD in 1f4927c
  • all: don't use XXX strings unnecessarily by @mvdan in 506a0e8
  • cue/format: collapse empty structs/lists to single line by @NoamTD in 53d5ab3
  • all: prevent duplicate filenames in testscripts by @jpluscplusm in a835fb5

Don't miss a new cue release

NewReleases is sending notifications on new releases.