v0.0.12
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.
All changes
74 changesby area
cmd13
cmd/cue/cmdadd MainTestcmd/cue/cmdalways print newline at end of evalcmd/cue/cmdauto-detect test modecmd/cue/cmddon't use os.Exit and fix error outputcmd/cue/cmdfix import paths for go getcmd/cue/cmdfix racecmd/cue/cmdfix trim helpcmd/cue/cmdfix: disable elimination of slicescmd/cue/cmdimport: use astutilcmd/cue/cmdonly allow dot files when specified explicitlycmd/cue/cmdreport instance-level errorscmd/cue/cmduse testscript for top level command testingcmd/cuefix tests under different platforms
cue26
cue/ast/astutilallow recursive applicationcue/astreorganization of node typescue/formatindent single line instead of 2 after embeddingcue/loadbe more permissive with file loadingcue/loadreport when "tool" pkg is used in non-tool filecue/parseradd support for failing on legacy grammarcue/scannerfix JSON compliancecueadd Definitions option and deprecate Hiddencueadd Kind.String methodcueadd test for Issue #94cueallow valid reference cycles in exportcuebind reference as lookup in parent nodecuebug fix: retain references with interleaved embeddingcueclose struct only after referencingcuedocument that zero value of Runtime is OK to use.cueenable recursive opening when embeddingcueexclude definitions from value lookupcuefix comparing against bottomcueimprove dependency analysis for Referencescueimproved error messagecuemake users aware of the --list flag when encountering a listcuemove up processing of comprehensioncuepass on compile-time errorscuerelax rules for closed structscueremove IsValidcueworkaround for empty "or" lists
doc16
doc/ref/spec.mdbring scoping in line with realitydoc/ref/specreflect reality w.r.t. octal numbersdoc/reffix typo in specdoc/tutorial/basicnumber chapter directoriesdoc/tutorial/basicuse definitions with "emit" examplesdoc/tutorial/basics/introdisable testdoc/tutorial/basicsadd pieces on structs and definitionsdoc/tutorial/basicscorrect name of sectiondoc/tutorial/basicsgenerate testscript casesdoc/tutorial/basicsorder filesdoc/tutorial/basicsremove old docsdoc/tutorial/basicsreorganize and simplify introdoc/tutorial/basicsupdate some sectionsdoc/tutorial/kubernetestutorial fixesdoc/tutorial/kubernetesupdate definitionsdoc/tutorial/kubernetesupdate definitions
encoding6
encoding/jsonadd JSON exporterencoding/jsonbelated fixes of reviewencoding/openapiadd paths:{}encoding/openapisupport Definitionsencoding/protobufdon't encode default values for enumsencoding/protobufdon't use disallowed "__" prefix
pkg9
pkg/listadding flatten function as a builtinpkg/listadding flattenN function as a builtinpkg/listadding range function as a builtinpkg/listfix MinItemspkg/listremove Flatten and simpilfy FlattenNpkg/regexpadd more regexp builtinspkg/tool/execfix null bug for stderr and stdoutpkgexclude some builtins from generationpkgupdate documentation and run gofmt
Other4
README.mdadd Github build badgeallremove large dependencyspecfix some backtic-quotes for markdown rendering- start using GitHub Actions as CI
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
| Platform | File and SHA-256 |
|---|---|
| macOS, Intel | cue_fa62711cccdd64af88ae041c2d1716b77415aeebedc0efff421b3504e2a6ba34 |
| Linux, Arm64 | cue_90cf8c9fee6fd5f5e26aa47e73193c3ee39bec824e0789fa43ed1e771b4f60eb |
| Linux, x86-64 | cue_7b8eccfdf6ce447ecfc4604af4e9e565e5cd177d9678d6923c06d8144db77666 |
| Windows, x86-64 | cue_c3f5344d5cefb97a6f96c3398be1e40c2df8b8a2adb033203e0231363896562d |
SHA-256 checksums for all of these: checksums.txt