github cue-lang/cue v0.10.0-alpha.3

latest releases: v0.11.0-alpha.5, v0.11.0-alpha.4, v0.10.1...
pre-release3 months ago

This release includes fixes to the evaluator and APIs as well as initial support for the TOML encoding.

Evaluator

CL 1198356 fixes a panic in the new evaluator relating to the new mechanism for tracking closedness information.

CL 1198566 fixes a performance regression introduced in CUE v0.6 where cue cmd and tools/flow became many times slower on some inputs.

CL 1198350 ensures that all interpreter errors, such as those from @embed attributes, include position information.

Encodings

Initial support for TOML is included in this release, including support in cmd/cue and an experimental Go package. See the issue tracker for remaining work in this space.

Builtins

CL 1198636 tweaks the existing path.Match and tool/file.Glob builtins to reject ** wildcard patterns as unsupported, to avoid confusion and allow future changes to their behavior. Note that this change may break uses of ** patterns, which behaved like *.

Go API

CL 1198555 adds a cue/load.Config.SkipImports option to avoid loading instances from import statements. This particularly helps cue fmt, where the loading caused unwanted slowness and unnecessary errors.

CL 1198686 fixes cue/load so that it no longer produces extra invalid packages when Config.Package was set to * and nested packages were loaded.

CL 1198351 fixes a bug in astutil.Sanitize where unused imports were not being fully removed from ast.File, causing errors in cue trim where all uses of an import were removed.

CL 1198494 speeds up the Path method on wrapped errors, which causes noticeable speed-ups in some edge cases.

Full list of changes since v0.10.0-alpha.2
  • cue/interpreter/embed: forbid ** via pkg/path.Match by @mvdan in 187fb1a
  • pkg: forbid ** in path.Match and tool/file.Glob by @mvdan in 987a85e
  • pkg: add test cases for ** in file patterns or globs by @mvdan in 25bb3d4
  • cue/load: do not create packages unnecessarily for files outside package directory by @rogpeppe in a4abb05
  • cue/load: add test case for issue 3306 by @rogpeppe in f472fd2
  • cue/load: implement SkipImports mode by @rogpeppe in 88306e2
  • all: make use of the new slices.Clone and cmp.Or Go 1.22 APIs by @mvdan in 55d1cb1
  • internal/core/adt: use a named vertexStatus constant rather than 0 by @mvdan in 862fcf1
  • cmd/cue: hook up encoding/toml for import and export by @mvdan in 9b91188
  • encoding/toml: add first implementation of an encoder by @mvdan in 54f2cce
  • internal/core/dep: use a new visitor.marked map when recursing by @mvdan in 34739e9
  • tools/flow: add test case for issue 2559 by @mvdan in 51bf6f2
  • tools/flow: add to task stats in the first initTasks call by @mvdan in bc41b25
  • internal/core/runtime: do not hide positions in interpreter errors by @rogpeppe in f7b7aaf
  • cmd/cue: add test case for embedded file error by @rogpeppe in bfcfff3
  • internal/cuetxtar: Correct nesting of tests by @cuematthew in dc199f5
  • internal/cuetxtar: Be noisier if DebugArchive is faulty by @cuematthew in b77c599
  • internal/core/walk: Clarify Visitor.Before documentation by @cuematthew in aa8e810
  • cmd/cue: do not initialize cmd.Command twice in cue cmd by @mvdan in 3f84ba6
  • cmd/cue: test that cue cmd --cpuprofile works by @mvdan in 17b3e52
  • cue/errors: make wrapped.Path faster by bypassing unnecessary reflection by @mxey in e68bd63
  • all: start using Go 1.22's loop var scoping and reflect.TypeFor by @mvdan in 055405a
  • internal/core/adt: do not require closeContext.group to be non-nil by @cuematthew in c8f3cad
  • cmd/cue: point "help get" text at CUE-specific cmd by @jpluscplusm in 5de5b42
  • cue/ast/astutil: update ast.File.Imports properly in Sanitize by @mvdan in 8145bdd

Don't miss a new cue release

NewReleases is sending notifications on new releases.