v0.10.0
This release includes experimental support for the embed proposal, many fixes for the new evaluator and modules, as well as many other fixes and enhancements.
Evaluator
CLs 1195897, 1196094, 1198356, 1198736, and 1198860 fix crashes with CUE_EXPERIMENT=evalv3 as reported by users.
CLs 1199272, 1199273, and 1199340 fix spurious “field not allowed” error regressions in the new evaluator.
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.
Embed proposal
With CUE_EXPERIMENT=embed, CUE now supports the embedding of non-CUE files within a CUE package. See the embed proposal and its design document for details, as well as the new how-to guide for the feature.
Modules
The cue help documentation for modules and inputs has been expanded, and a number of error messages when using or publishing modules are now more helpful.
A new concept guide on CUE language versions documents the language.version field in cue.mod/module.cue files.
CL 1198249 adds support for an @ignore file attribute to unconditionally ignore a file when loading packages or calculating dependencies.
CL 1198003 teaches the CUE loader to support symbolic links when loading from local directories, matching the behavior before CUE_EXPERIMENT=modules was introduced.
CL 1198143 tweaks cue mod init without an argument to create a module with the module path cue.example rather than an empty path that made the module file invalid.
CL 1197530 fixes the behavior of build tags, and also adds support for parentheses in build tag expressions.
CL 1197531 implements better caching when evaluating dependencies, which should speed up evaluation of modules that use multi-directory packages.
Go API
CL 1196721 disallows importing or loading packages with an underscore qualifier like foo.com/bar:_, as it was never intended behavior. Users should use the new embed proposal instead.
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 1196820 adds a cue.LanguageVersion function to obtain the current version of the language spec that the Go module implements.
CL 1197160 implements considered support for build tags in modules. Build tags are considered false when outside the main module.
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.
CL 1198157 fixes cue/parser to accept keywords as valid selectors, aligning with the language specification.
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.
CLs 1199309, 1199139, 1199306, 1199214, 1199398, 1199308, and 1199309 resolve a number of issues when decoding JSON Schema files.
CLs 1196332, 1199094, and 1199103 fix the JSON decoder to provide correct position information when decoding JSONL files or encountering a syntax error.
CL 1198874 fixes the loading of JSON files to reject multiple newline-delimited values, as those ar only allowed in NDJSON or JSONL files.
CL 1198876 teaches the YAML decoder to decode empty documents as null, aligning with the YAML spec and fixing panics when loading empty YAML files.
CL 1196291 tweaks the YAML decoder so that comments following a field are attached to the entire field.
CL 1196436 tweaks the textproto decoder to correctly handle required and optional fields.
CLs 1195628 and 1199054 ensure that cue/format prints the correct white space before and after comments.
CL 1195884 teaches cue/format to preserve comments associated with ... ellipsis expressions.
CL 538624 fixes a bug where cue/format would start a CUE file with white space if it began with a clause.
CL 1196134 fixes a bug in cue/format where a comment at the start of a CUE file would sometimes be indented.
CL 1196135 fixes a bug in cue/format where index or selector expressions could cause extra tab indentation.
Builtins
CL 1196212 adds a list.Reverse function to reverse the elements of a list.
CL 1197452 tweaks tool/exec.Run so that its errors are unambiguous when any command arguments contain white space.
CL 1198636 tweaks path.Match and tool/file.Glob 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 *.
cmd/cue
CL 1196822 adds a --language-version flag for cue mod init and cue mod edit to set the language.version value.
CL 1197185 teaches cue mod resolve to work on the current module when no arguments are given.
CL 1196370 teaches cue mod registry to gracefully shut down when interrupted.
All changes
202 changes since v0.9.0by area
all7
allminor code cleanupsalldelay compiling global regexes and templatesalluse simpler for loop iterationsallmake use of the new slices.Clone and cmp.Or Go 1.22 APIsallstart using Go 1.22's loop var scoping and reflect.TypeForallmake use of some more Go 1.22 std APIsallreplace internal/txtarfs with txtar.FS
cmd46
cmd/cuedo not panic on empty jsonl inputscmd/cueprefer ndjson over ldjsoncmd/cueexpand the embed help sectioncmd/cueadd test for bad path lookupcmd/cueadd test case for bad jsonl syntax error positionscmd/cuesuggestcue mod fixon all commands to add language.versioncmd/cueadd test cases for embedding files inside symlink dirscmd/cueadd a test for embedding symbolic linkscmd/cueimplementcue import --dry-runcmd/cueadd testscript for the jsonl file typecmd/cuespeed up get_go_json_compat.txtarcmd/cueuse fewer go/packages Need bits inget gocmd/cueadd TOML to a couple of help topics I forgot aboutcmd/cueadd testscript to interpret empty files as various filetypescmd/cuefix all "flag used without being added" bugscmd/cuehook up encoding/toml for import and exportcmd/cueadd test case for embedded file errorcmd/cuedo not initialize cmd.Command twice incue cmdcmd/cuetest thatcue cmd --cpuprofileworkscmd/cuepoint "help get" text at CUE-specific cmdcmd/cueadd tests for symbolic linkscmd/cue,internal/buildattradd tests for@ignoretagscmd/cueuse default module name for cue mod initcmd/cueadd tests for module path errorscmd/cueadd a reference to the Central Registry fromcue help modulescmd/cueadd information about import paths tocue help inputscmd/cuefix panic on bad syntaxcmd/cuebetter error message for mismatched publish versioncmd/cueimprove error message for malformed module pathcmd/cueadd test case for issue 3262cmd/cuefix link in embed help textcmd/cuehandle signals and perform a graceful shutdown for mod registrycmd/cuetest tool/exec.Run with arguments involving spacescmd/cueadd a forwards compatibility test case for bugfix releasescmd/cuedo not allow embedding of CUE file types (for now)cmd/cueadd test case for embedding of CUE file type filescmd/cueprovide initial text for 'help embed'cmd/cuedocument CUE_EXPERIMENT=embedcmd/cuemake mod resolve work with no argscmd/cueimplement --language-version flag for cue mod edit and initcmd/cue,cue/loadadd tests for underscore packagescmd/cueremove unnecessary fields and do not use filepath.WalkDircmd/cuecorrectly import comments after a field keycmd/cueforbidcue help helpin favor ofcue helpcmd/cueparse module.cue file in non-strict modecmd/cueadd test for mod edit strictness
cue47
cue/errorsavoid simple duplication when gathering errorscue/formatkeep blank betweenast.EmbedDecland commentcue/interpreter/embedforbid**via pkg/path.Matchcue/loaddo not create packages unnecessarily for files outside package directorycue/loadadd test case for issue 3306cue/loadimplement SkipImports modecue/errorsmake wrapped.Path faster by bypassing unnecessary reflectioncue/ast/astutilupdate ast.File.Imports properly in Sanitizecueadd a regression test for a default elimination bug fixed in evalv3cue/cmdensure flags are added if they are usedcue/parseraccept keywords as selectorcue/literaluse strconv.IsGraphiccue/loadavoid one stat call when loading a valid modulecue/loadadd test coverage for loading a legacy cue.mod filecueuse Value.Err in examples using Compile APIscue/loadimplement shared syntax cachecue/loadmove syntax cache into fileSystemcue/loaduse constructor for fileSystemcue/loadCUE files only contain a single*ast.Filecue/loadmove towards unified syntax cachecue/loadremove import comment parsingcue/loadclean up allTagscue/loadcache file names onlycue/interpreter/embeddon't allow hidden files in globcue/interpreter/embedrespect module boundariescue/interpreter/embedrequire type if glob extension not specifiedcue/interpreter/embedfix handling of dir matching globcue/loadbetter treatment for build tags with respect to modulescueadd LanguageVersioncue/interpreter/embedadd support for embeddingcue/ast,specdocument thatpackage _is equivalent to missing packagecue/loaddo not consider anonymous packages when checking package qualifiercue/loadclarify the docs for Config.ModuleRootcue/formatprevent vertical tabs from causing extra indentationcue/formatavoid indenting a lone leading commentcue/...remove remnants of /*block*/ comment supportcue/formatadd test cases for issue 2496cue/encoding/jsonschemafix staticcheck errorscue/loadfix loading when Config.Package does not match default packagecue/loadadd tests for issue 3213cue/loadadd Config.AcceptLegacyModulescue/formatomit whitespace before the first clausecue/formatadd a regression test for issue 1544cue/formatrewrite TestFiles with testscriptcue/formatpreserve comments associated with ellipsiscue/formatadd tests for ellipsis comments in fmt -scue/formatensure a newline after every comment
encoding26
encoding/jsonschemafix panic on impossible enumencoding/jsonschemafix issue 3176encoding/jsonschemaadd test case for issue 3176encoding/jsonschemaadd test cases for nested valuesencoding/jsonschemabetter "type excluded" logicencoding/jsonschemafix type exclusion testencoding/jsonschemaadd test cases for excluded typesencoding/encoding/jsonschemaallow type number with int enumencoding/jsonschemaonly one error per URLencoding/jsonschemasupport legacy id fieldencoding/jsonschemaschema version supportencoding/jsonschemaadd test for numeric enum with typeencoding/jsonschemaimplement MapURLencoding/jsonfix positions when Decoder.Extract finds bad syntaxencoding/jsonschemafix decoding of$idencoding/jsonfix location for JSON syntax errorencoding/tomlsupport error positionsencoding/tomlmimic indented CUE multi-line strings in test stringsencoding/jsonschemadecode required properties as required fieldsencoding/tomlsupport decoding keys named "_"encoding/jsonschemaadd test case for issue 3351encoding/jsonschemaport txtar tests to cuetxtarencoding/tomladd first implementation of an encoderencoding/protobuf/textprotocorrectly decode required/optional fieldsencoding/jsonfix position for jsonlencoding/tomlimplement support for table arrays
internal46
internal/citest and release with Go 1.23.0internal/core/adtfix validator closedness issueinternal/core/adtadd test for issue 3332internal/core/adtstill process pattern for closeContextinternal/core/adtsplit conjunct trees based on prefixinternal/core/adtadd tests for closednessinternal/core/debugsimplify logic of debug visualizationinternal/core/adtshow # only on original defintion nodeinternal/encoding/yamldecode empty inputs as "null"internal/core/adtfix panic triggered by using wrong conditioninternal/encodingdecode json files as a single JSON valueinternal/ci/checkbump yuin/goldmarkinternal/core/adtdon't signal cleared schedulersinternal/cuetdtestmake M.Flags (internal) publicinternal/core/adtuse a named vertexStatus constant rather than 0internal/core/depuse a new visitor.marked map when recursinginternal/core/runtimedo not hide positions in interpreter errorsinternal/cuetxtarCorrect nesting of testsinternal/cuetxtarBe noisier if DebugArchive is faultyinternal/core/walkClarify Visitor.Before documentationinternal/core/adtdo not require closeContext.group to be non-nilinternal/buildattrimplement@ignoreattributesinternal/ciensure internal/_e2e isn't broken in CIinternal/ciensure commit messages do not @-mention usersinternal/cicopy how internal/vcs sets a clean env for git testsinternal/_e2eremove unused importinternal/ci/checksrewrite from bash to Gointernal/cimove commit check script to a separate file with testsinternal/vcsshow stderr when git exits with an errorinternal/mod/modimportsremove duplicate test txtar file entryinternal/mod/modpkgloadsymbolic links can be valid CUE files toointernal/mod/modpkgloadpropagate CUE syntax errorinternalremove some deprecated type/method usagesinternal/buildattrstop at package clause and support parenthesesinternal/buildattradd testsinternal/filetypesspeed up common caseinternal/cibump Go and goreleaser versions for the upcoming alphainternal/buildattrfactor out from cue/loadinternal/ciremove debug logging of commit messageinternal/core/runtimenew attribute name for externinternal/filetypessplit ParseFileinternal/cueversionbump LanguageVersion for v0.10internal/cialways check that git is clean when we finishinternal/core/adtfix pointer comparison issue in equalTerminalinternal/core/adtfix lifetime tracking of shared closeContextinternal/core/adtupdate TestX to include language version
mod7
mod/modregistryreturn empty list for Versions with invalid namemod/moduleimprove error messages for bad module pathmod/moduleallow versionless module path in CheckPathmod/modloadignore _test.cue files in dependenciesmod/modfileuse fixed language version for Fixmod/modfiledeprecate LatestKnownSchemaVersionmod/modfilealways allow missing major version in module field
pkg6
pkgforbid**in path.Match and tool/file.Globpkgadd test cases for ** in file patterns or globspkg/tool/execdocument how Run.cmd works with string versus listpkg/tool/execshow command arguments in errors as a Go slicepkg/listadd Reverse functionpkg/pathadd missing param declaration
README3
READMEpoint to cuelang.org for install docsREADMElink to Slack and Discord via cuelang.orgREADMEsimplify a bit, add new website links, add Discord invite
tools3
tools/flowadd test case for issue 2559tools/flowadd to task stats in the first initTasks calltools/trimconvert inline tests to txtar
Other11
- update golang.org/x/... and ociregistry for rc.1
- drop go1.21, start testing on go1.23rc2
interpreter/wasm,internal/filetypesfix wasm awkwardness- bump go-internal to get the latest testscript fixes
- update Go dependencies for the upcoming alpha
core/adtsimplify duplicate NumKind and NumberKind constscore/adtrename CompositKind to CompositeKinddoc/ref/implfix order of arguments in δ partial feature function- disallow explicit underscore import path qualifiers
- remove navbar.md and its supporting logo
- update github.com/emicklei/proto
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_cdd6acbd87528ae8f8f62497770a600ea23503d6f8b46f5919c7008f20b5238f |
| macOS, Apple silicon | cue_f72e5dae8b682f43a1e80fb3066a42e82c77725ac2a175927212d0be9d12671a |
| Linux, x86-64 | cue_8f449c76f69c94fd17fff869e96ec34de7f059d6d63bf05617477ed0e6133fd2 |
| Linux, Arm64 | cue_49369a3566af3117712a7a91dc2ec924cb5c4128385ab2edd877d9997e761312 |
| Windows, x86-64 | cue_ae09f026261331530593966ab2d61b330a6565fd7339c13a3eed3eaa5bd4c066 |
| Windows, Arm64 | cue_e82bececf6aafcee74b9be4273b0163299939d0cea95fd32e8349854667775bc |
SHA-256 checksums for all of these: checksums.txt