This release contains a host of bug fixes and improved conformance to the spec.
The most notable change, however, is the relaxing of the closed struct constructs.
Relaxed closed structs
With the previous release, each struct literal in a definition was treated strictly as closed.
This turned out to be both tedious and counter-intuitive.
This led to a spec change and corresponding different implementation where
a definition is only closed once it is referenced.
This means that merging literal structs defined within a definition works exactly
like unification of regular structs up to the point they are referenced.
Features
There are several builtins added, including in the list
and regexp
packages.
The latter added builtins to extract fields from strings into a struct using named groups.
Changelog
30a6c2b README.md: add Github build badge
75b9c7f all: remove large dependency
9e294ac cmd/cue/cmd: add MainTest
22e054b cmd/cue/cmd: always print newline at end of eval
0b043c9 cmd/cue/cmd: auto-detect test mode
e606e0d cmd/cue/cmd: don't use os.Exit and fix error output
91c1684 cmd/cue/cmd: fix import paths for go get
48b8f9a cmd/cue/cmd: fix race
374d395 cmd/cue/cmd: fix trim help
78043ab cmd/cue/cmd: fix: disable elimination of slices
bd64ebc cmd/cue/cmd: import: use astutil
a31e1ac cmd/cue/cmd: only allow dot files when specified explicitly
18dab4b cmd/cue/cmd: report instance-level errors
0489caa cmd/cue/cmd: use testscript for top level command testing
22a42d4 cmd/cue: fix tests under different platforms
c7dc930 cue/ast/astutil: allow recursive application
1a33709 cue/ast: reorganization of node types
929e71f cue/format: indent single line instead of 2 after embedding
de86f0f cue/load: be more permissive with file loading
ca66319 cue/load: report when "tool" pkg is used in non-tool file
a38f5bc cue/parser: add support for failing on legacy grammar
6eefcd0 cue/scanner: fix JSON compliance
e1656a1 cue: add Definitions option and deprecate Hidden
7d1cb13 cue: add Kind.String method
ffff7fa cue: add test for Issue #94
8776f21 cue: allow valid reference cycles in export
75d2c37 cue: bind reference as lookup in parent node
8927b63 cue: bug fix: retain references with interleaved embedding
f2654de cue: close struct only after referencing
081251e cue: document that zero value of Runtime is OK to use.
8d81be4 cue: enable recursive opening when embedding
d282553 cue: exclude definitions from value lookup
fbb38bc cue: fix comparing against bottom
d499c46 cue: improve dependency analysis for References
405a191 cue: improved error message
6deb0df cue: make users aware of the --list flag when encountering a list
4524da6 cue: move up processing of comprehension
c85bebe cue: pass on compile-time errors
fa7e3ce cue: relax rules for closed structs
827ebfb cue: remove IsValid
7068dea cue: workaround for empty "or" lists
21f6c44 doc/ref/spec.md: bring scoping in line with reality
b2703c6 doc/ref/spec: reflect reality w.r.t. octal numbers
ded0e1d doc/ref: fix typo in spec
9d53106 doc/tutorial/basic: number chapter directories
27b4ea5 doc/tutorial/basic: use definitions with "emit" examples
a9f25f8 doc/tutorial/basics/intro: disable test
00eb9d2 doc/tutorial/basics: add pieces on structs and definitions
934fec9 doc/tutorial/basics: correct name of section
f3cd848 doc/tutorial/basics: generate testscript cases
d4c1734 doc/tutorial/basics: order files
b0d1a07 doc/tutorial/basics: remove old docs
df08087 doc/tutorial/basics: reorganize and simplify intro
aeaf006 doc/tutorial/basics: update some sections
1ce0c51 doc/tutorial/kubernetes: tutorial fixes
d437bd5 doc/tutorial/kubernetes: update definitions
b0bba12 doc/tutorial/kubernetes: update definitions
78783f2 encoding/json: add JSON exporter
dd75ef6 encoding/json: belated fixes of review
9b70cf3 encoding/openapi: add paths:{}
7e4dc22 encoding/openapi: support Definitions
7213fa9 encoding/protobuf: don't encode default values for enums
e7abb20 encoding/protobuf: don't use disallowed "__" prefix
074cf5d pkg/list: adding flatten function as a builtin
a83af29 pkg/list: adding flattenN function as a builtin
5ac1fbf pkg/list: adding range function as a builtin
e783813 pkg/list: fix MinItems
20b0a0a pkg/list: remove Flatten and simpilfy FlattenN
68a054b pkg/regexp: add more regexp builtins
8dd325b pkg/tool/exec: fix null bug for stderr and stdout
67169f4 pkg: exclude some builtins from generation
c40e450 pkg: update documentation and run gofmt
8529d77 spec: fix some backtic-quotes for markdown rendering
a76cbed start using GitHub Actions as CI