v0.9.0-alpha.5
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 support enabling the new evaluator via the Go API, as well as a number of fixes to known bugs in the new evaluator. More details can be found in the latest performance update posted by Marcel this week.
Subscribe to the Performance umbrella issue for future updates, and see the Evaluator Roadmap project for the planned work ahead.
Modules
Following the Modules proposal v3 being accepted, the modules experiment is now enabled by default in this release; see CL 1194664. It should no longer be necessary to set CUE_EXPERIMENT=modules, and CUE_EXPERIMENT=modules=0 can be used to disable the experiment. We are not aware of any regressions, so please file a bug if you find one.
CL 1194780 adds a cue mod fix command to fix up old cue.mod/module.cue files; see cue help mod fix.
CL 1194669 restricts the parsing of cue.mod/module.cue files to data-only mode, forbidding any references or comprehensions which may break cue mod commands or cause other issues.
CL 1194494 tweaks cue mod publish so that uncommitted VCS changes outside of the module directory no longer cause a “VCS state is not clean” error.
CL 1194495 teaches our modules registry client to treat all HTTP 404 errors as “not found” to improve compatibility with some registries which seem to return invalid error codes.
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 1194421 fixes a memory leak where using load.Instances to load CUE modules would increase the size of a global cue.Context until the process was terminated.
CL 1194410 fixes cue/load so that it errors on empty string arguments once again.
Builtins
CL 1194165 fixes invalid builtin calls so that they correctly result in a “bottom” error.
CL 1194515 fixes structs.MinFields and structs.MaxFields to ignore optional fields, matching the documented behavior.
cmd/cue
CL 1193962 adds a cue fmt --files flag to interpret the arguments as file paths to walk and recursively format rather than package patterns.
CL 1194247 tweaks cue help so that it correctly fails when given unknown help topics or commands.
All changes
115 changes since v0.9.0-alpha.4by area
all5
allvarious very small cleanups from gopls and staticcheckallremove last usages of ast.Node.{Comments,AddComment}alladd language.version to module.cue filesalltidy up a number of leftover Go mentionsallapply cue fmt as of v0.9.0-alpha.4
cmd16
cmd/cueadd a regression test for issue 2704cmd/cueensure that fmt works outside a module with files toocmd/cueadd mod fix commandcmd/cuemove Dockerfile to the main package directorycmd/cuerepurpose exitOnErr into printErrorcmd/cueadd cue fmt --files modecmd/cuereplace most fatal exitOnErr calls with error returnscmd/cuean empty string is neither a valid package nor filecmd/cueno need to buffer an error to print to stderrcmd/cueremove TestHelp in favor of testscriptcmd/cueimprove cue vet examples' argument ordercmd/cueexpand cmd_filetypes.txtar with more edge casescmd/cuerefer to 'workflow commands' instead of 'commands'cmd/cuefail when requesting a missing help topiccmd/cueuse cue/parser and cue/format directly in fmtcmd/cueadd tests that cover fmt on various filetypes
cue24
cueadd another test for a disjunction bug fixed in evalv3cue/loadtreat all absDirFromImportPath errors as PackageErrorscue/loadset the absolute file name when setting sourcecue/loaddo not scan imports of non-CUE filescue/loadadd major version suffix to module path in testdatacue/loadmore correct treatment of module paths with major versionscue/loadbetter treatment of files specified on the command linecue/loadfactor out syntax cachecue/loadremove directory argument from addFilescue/loadavoid "user:" and "instance:" error prefixescue/loadprepare for files package refactorcue/scannerremove go-fuzz testing code and datacue/literaluse Label for labels consistentlycue/parserswitch from go-fuzz to native fuzzingcueadd regression test for a disjunction fix in evalv3cue/ast/astutilremove deprecated API usagecue/errorsuse fmt.Fprintf in writeErr directlycue/loadempty or absolute paths are not std import pathscuefix godoc linkscue/loaddon't load from $PWD in the integration testscueremove matrix_test.gocue/loadrestore the error result on an empty string argumentcue/loadsimplify logic around build.LoadFunccue/loadremove the now-unused moduleschema.cue file
encoding8
encoding/gocode/gocodecremove cue.Runtime usagesencoding/tomladd support for inline tablesencoding/protobufcope with major version suffixes in module pathsencoding/openapilink to correct upstream docencoding/tomlcheck parser errors and reject duplicate keysencoding/gocoderemove unused test.cue fileencoding/tomlvalidate the resulting value against toml.Unmarshalencoding/tomlfirst decoder implementation
internal43
internal/registrytestsatisfy staticcheck and goplsinternal/filetypesremove unused test.cue fileinternal/cueexperimentflip modules experiment flag defaultinternal/cmd/cue-ast-printdo not panic on invalid valuesinternal/cibump goreleaser and Go ahead of the next releaseinternal/core/exportallow exporting snippetsinternal/pkgmake Len ignore optional fieldsinternalremove some deprecated type/method usagesinternal/core/adtfix attribute processinginternal/core/exportfix dereferencing buginternal/cuetxtarallow inline archivesinternal/core/exportupdate error todosinternal/core/exportfix testinternalreplace and remove PackageInfointernal/filetypesremove deprecated API usageinternal/ciupgrade GH actions JSON Schemainternal/vcsonly consider actual sub-directory for status checksinternal/core/adteliminate non-rooted indirectionsinternal/core/depdereference non-rooted valuesinternal/core/adtunwrap ConjunctGroup in EnvExprinternal/core/adtunwrap ConjunctGroups in ToExprinternal/core/adtremove direct access to BaseValueinternal/core/adtpropagate structural cycle upinternal/core/adtfix let buginternal/diffadd matrix testinternal/core/exportfix dropping of optional fieldinternal/core/subsumepass tests for new evaluatorinternal/core/adtmake invalid builtin call resolve to bottominternal/core/debugappend to []byte rather than using io.Writerinternal/core/adtdon't allocate when asserting in Environment.upinternal/core/debugsimplify label code following a TODOinternal/core/debugallow io.WriteString to be efficientinternal/core/adtavoid creating closures for adt.Config.Formatinternal/core/adtfix some typosinternal/core/validateuse matrix in testinternal/core/subsumeuse matrix for testsinternal/core/exportuse matrix for TestValueinternal/core/exportuse matrix for SelfContainedinternal/core/exportassign a name to TestSelfContainedinternal/core/exportuse matrix for TestExtractinternal/core/exportuse matrix for TestGeneratedinternal/core/depadd in tests for new evaluatorinternal/cuetdtestintroduce test matrix
mod8
mod/modfileadd FixLegacy functionmod/modfileaccept language versions after v0.8.0-alpha.0mod/modfileadd custom data fieldmod/modfileparse module.cue in data-only modemod/moduleadd qualifier in ImportPath when necessarymod/modregistrytreat all 404 errors as not-foundmod/modfiledo not reuse a global cue.Context in Parse and ParseLegacymod/modzipuse filepath.WalkDir
pkg3
pkg/encodingadd test cases for {json,yaml}.Validatepkg/structadd tests for MinLength and MaxLengthpkgupdate tests to use matrix
tools4
tools/flowenable matrix teststools/flowdisable (part of) flaky testtools/flowuse matrix for teststools/trimprepare for using test matrix
Other4
cuegoremove deprecated cue.Instance usagedoc/refthe subsumption relation for fields was backwardscuecontextadd options to set version and debug flags- update golang.org/x/... dependencies for v0.9.0
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_09f41d6a4e86cf04ae77dedb3dd937a89784238cb1ecd07ec4aee8808026a855 |
| macOS, Apple silicon | cue_ed95babb4ed5a71f0557d9b587233a3368cc07317935ae0dc1ef21bc98962ef4 |
| Linux, x86-64 | cue_c77b36bc93c6866e7b1c0e55ab0450e2c4037fd63a5a1685d7e6d138c9921369 |
| Linux, Arm64 | cue_1b83ebca566cf3dc745e57f846403a0d55237641035b53be2e33addcc00e4877 |
| Windows, x86-64 | cue_e14f814962645626bc8fce625ef18aa9bd42df6d68ad19f139782d29b56de3c3 |
| Windows, Arm64 | cue_27e6c154634b5ce1ca588b34fc09659d72b6e4f645abb46cbf1f7879c40ee6ad |
SHA-256 checksums for all of these: checksums.txt