v0.8.0-alpha.1
This release includes experimental support for CUE Modules (more details below), as well as a number of improvements and fixes.
More CLs and refactors have also landed for the core evaluator’s performance work; they aren’t enabled yet as the work isn’t complete.
As a reminder: users can register their projects with Unity, our regression and performance testing setup. Unity is used to ensure that a project’s CUE evaluations do not unexpectedly stop working, or regress in terms of performance. It continues to catch multiple issues with each release. Adding your project to Unity not only guarantees that we will not break your tests (if we do, we will work with you to fix your CUE code), but it also helps to improve the quality of each CUE release. Follow this link to learn more about Unity, install it, or get in touch with any questions.
Thank you to @4ad, @cedricgc, @jpluscplusm, @martingreber, @mpvl, @mvdan, @myitcv, @nickfiggins, @nnnkkk7, @rogpeppe, and @vikstrous for contributing to this release!
Modules
This release includes experimental support for CUE modules in cmd/cue, as outlined in the Modules and package management proposal. We are also working on v3 of the modules proposal docs to coincide with the release of v0.8.0.
Alongside this release, we have published a tutorial on the new website which shows how to publish and fetch modules with a custom module registry.
We have also published the first version of the Modules reference documentation, the canonical documentation page describing how CUE modules work in detail.
Note that support for CUE modules is still experimental and subject to change, and needs to be explicitly enabled via CUE_EXPERIMENT=modules. See cue help environment for more information on the environment variables used below.
The cue mod tidy command is introduced, which rewrites cue.mod/module.cue in its canonical format, adds any missing module dependency requirements, and removes unused ones.
The cue mod publish command is also added. This publishes a version of the current module to a module registry.
When running commands like cue export with CUE_EXPERIMENT=modules, dependencies are automatically fetched from module registries following $CUE_REGISTRY and cached on disk.
Note that support for fetching modules from OCI registries via cue/load isn’t ready yet; support for Go library users will be announced at a later time.
Go API
Note that this version of CUE requires Go 1.21 or later, following our policy to support the latest two stable Go releases just like upstream.
CL 1173271 drops support for legacy pkg directories, which have been deprecated since the transition to a cue.mod directory in 2019.
CL 1174069 replaces a few more uses of the deprecated cue.Instance type with cue.InstanceOrValue.
CL 1175779 deprecates the FileOffset and File.Base APIs in cue/token, which were inherited from go/token but never had any effect.
Language
There are no changes to the language in this version.
Spec
CL 1173197 makes the use of the term “builtin function” consistent across the document.
Core Evaluator
CL 1173262 fixed a regression introduced by v0.7.0’s upgrade to github.com/cockroachdb/apd/v3 where some arithmetic operations would result in an extra 0 digit.
Encoders
CL 1173689 fixed the YAML encoder so that strings looking like hexadecimal numbers are properly quoted.
Builtins
CL 1173735 replaces the uses of Go’s net package with net/netip when dealing with IP addresses, which makes them immutable, comparable, and take less memory.
CL 1173926 adds an IPv6 API to net to check that a value is a valid IPv6 address, mirroring IPv4 and taking advantage of the switch to the Go net/netip package.
CL 1174339 fixes tool/exec so that it correctly applies env defaults in CUE values.
CL 1174623 fixes tool/exec so that it accepts env list values as documented.
cmd/cue
CL 1173892 adds a cue help environment section to document the environment variables used by the CLI, such as CUE_EXPERIMENT and CUE_REGISTRY.
CL 1176665 fixes cue cmd so that legacy commands always get the corresponding CUE schema unified.
CL 1176194 starts adding a language.version field to cue.mod/module.cue, to start tracking what CUE language version a module’s config files were written for. This will become necessary to make future language changes as smooth as possible for CUE users. For example, running cue mod init or cue mod tidy with the future CUE v0.8.0 release should add language: version: "v0.8.0" when the field isn’t present.
All changes
143 changes since v0.7.1by area
cmd22
cmd/cue,pkg/tool/execrely on cue schema for exec.Run defaultscmd/cueunhide mod tidy and mod publishcmd/cueadd testscript for registry auth via logins.jsoncmd/cuefix registry client racecmd/cueadd mod registry server commandcmd/cuesimplify exec trimming in TestXcmd/cueadd test for self import in modules modecmd/cuemake the config directory configurablecmd/cueadd version to module.cue filecmd/cue/cmdsupport major versions in module pathcmd/cue/cmdadd (failing) submodule testcmd/cueuse tokens from "cue login" before docker's config.jsoncmd/cuestore tokens once "cue login" succeedscmd/cmdadd environment helpcmd/cueadd hidden login commandcmd/cue/cmdamend the default for CUE_REGISTRYcmd/cuerename mod upload to mod publishcmd/cueallow cue mod tidy in non-module rootcmd/cueuse cached registry for cue mod tidycmd/cueremove a stale TODO on marshaler typescmd/cueprevent failures if /tmp/cue.mod existscmd/cuecue mod tidy command
cue18
cue/interpreter/wasmrework the way we test Wasmcue/interpreter/wasmremove Wazero global statecue/interpreter/wasmadd support for Wasm functions that take and return structscue/interpreter/wasmadd support for arbitrary types in extern attributescue/loadallow conversion of module-local paths to OS pathscue/loadmake the tests less noisycue/loaduse fewer absolute paths in testscue/parsermake the example self-containedcue/loadfix crash when there is no module filecue/tokendeprecate base offsetcue/loaduse modpkgload to resolve dependenciescue/loadimplement io/fs.FS for overlay filesystemcue/loadremove unused codecue/loaduse module.ParseImportPathcue/errorsremove unused fieldcuereplace Instance.value with Instance.Valuecue/loaduse cached registrycue/loaddrop support for legacy pkg directories
internal82
internal/core/runtimeexpand runtime.Compile signature to accomodate non-builtinsinternal/cirun the end-to-end tests with -raceinternal/ciupgrade Go matrix include go1.22.0internal/ciuse node.js 20-compatible action versionsinternal/e2eswitch all tests tocue mod publishinternal/mod/modloadfix panic on error in tidyinternal/modfix tidy in the presence of local codeinternal/e2estart usingcue mod tidyinternal/e2estart usingcue mod init modpath@versioninternal/mod/modloadsupport adding language versioninternal/mod/modpkgloadsupport gen directoriesinternal/e2etweak expected error string after the cue/load changesinternal/modtrack dependencies at package levelinternal/mod/moduleadd ParseImportPathinternal/mod/modpkgloadadd test for package-level dependenciesinternal/core/adtuse ConjunctGroup in fieldsinternal/mod/modresolveallow other forms of IPv6 localhostinternal/modremove TODOs that have been doneinternal/core/adtremove disallowedFieldinternal/core/adtuse OpContext instead of nodeContext for decDependantinternal/e2ewrite the rest of an inline commentinternal/ciadd a TODO about "goreleaser test"internal/cisupport co-authors in the signed-off-by checkinternal/core/adtimplement checks for closedness countersinternal/core/adtreorganize for field checksinternal/core/adtmove rootCloseContext to Vertexinternal/core/adtcopy node method for comprehensionsinternal/core/adtonly show stats for old evaluatorinternal/core/adtpass flags needed for new evaluatorinternal/core/adtfix typo in insertion.txtarinternal/core/adtadd positions of ConjunctGroupinternal/core/adthandle comprehension cycle errorsinternal/core/adtadd tests to pass for new evaluatorinternal/code/adthoist position to different lineinternal/core/adtbail out early from resolve upon errorinternal/core/adthoist hasConjunctsinternal/core/adtdon't match patters for non-regular fieldsinternal/core/runtimemove EvaluatorVersion to Runtimeinternal/core/adtmove OpContext out of nodeContextinternal/core/adtadd scheduler implementationinternal/cliimprove error message on parse issueinternal/core/adthoist getNonCyclicCountinternal/cuetxtaruse go-internal diffinternal/core/adtinclude ConjunctGroup in addPositionsinternal/core/adtmodify some testsinternal/core/adtprep for new evaluatorinternal/core/adtintroduce ConjunctGroupinternal/core/adtunroll Evaluate in OpContext.concreteinternal/core/adtadd String implementation for ArcTypeinternal/coreremove unused argumentinternal/e2euse cue mod publishinternal/registrytestupload deterministicallyinternal/mod/modfileavoid unnecessary bracesinternal/mod/modregistryadd Module.Version methodinternal/registrytestadd Upload functioninternal/mod/modregistryadd GetModuleWithManifest methodinternal/cmdadd cue-ast-print to visualize syntax treesinternal/encoding/yamlquote hexadecimal-looking stringsinternal/e2eset CUE_MODCACHE in TestScript's Setupinternal/mod/modfileguard against cue.Value raceinternal/mod/modcacheuse robustiointernal/mod/modcachenew packageinternal/mod/modregistryavoid round tripinternal/mod/moduleadd support for escapinginternal/mod/modregistryadd ManifestDigestinternal/mod/modloadsupport major version defaultsinternal/mapsnew packageinternal/mod/modpkgloadsupport packages without major versionsinternal/mod/modrequirementssupport major version defaultsinternal/mod/modregistrysupport cross-major-version queriesinternal/mod/modloadnew packageinternal/mod/modpkgloadnew packageinternal/coreuse precise apd.Decimalinternal/mod/modrequirementsadd GraphIsLoaded and RootModulesinternal/mod/moduleadd Version.IsValidinternal/mod/modregistryreturn no tags for non-existent repointernal/mod/modfileadd Formatinternal/mod/modimportsdiscard package qualifier in import pathsinternal/slicesadd Equalinternal/mod/modimportssupport scanning single directoryinternal/mod/modrequirementsnew packageinternal/cilimit goreleaser to doing release drafts
pkg6
pkg/pathfix package commentpkg/tool/execupdate env spec to support listspkgfix CUE source escaping TODOpkg/tool/execsupport defaults in env valuespkg/netadd IPv6 checkpkg/netreplace net with net/netip
README5
READMEbriefly document that we support two Go versionsREADMEsimplify "install from source" instructionsREADMEadd Docker badge and instructionsREADMEremove obsolete mention of GoogleREADMEdrop golangci badge
Other10
- clarify that we require Go 1.21 or later now
- bump cuelabs.dev/go/oci/ociregistry dependency
tools/flowuse atomic.Boolencoding/gocodereplace cue.Instance with InstanceOrValueallupdate Wazero to 1.6.0depsupgrade to latest cuelabs.dev/go/oci/ociregistrygo.modbump non-user-facing dependenciesdoc/refuse builtin instead of built-inmodfilesupport major version defaults- update ociregistry dependency
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_5c174a0895a6c9378cffbffd40195b998a0ac399060fc24327d608ff1a2666a6 |
| macOS, Apple silicon | cue_622b92fec866e9da4bb644a4b3f40b6cbfa6566ae8462bf6bdfe95dc919974e4 |
| Linux, x86-64 | cue_f0d22e11f078077f69a4286f0f73c46a71e2073611cb162548cb78ef78b90266 |
| Linux, Arm64 | cue_1a57cd38da718167b363e58c7f8dc1ec1535de09ea0eb93305a7a388294f7d99 |
| Windows, x86-64 | cue_93d9ee5ab3104b256dc14f652b851e4f253706aaefb544fcbf41d922e7654088 |
| Windows, Arm64 | cue_a57739cc340736b27125c19a677dfc78fd4ad33a7f80426654da5ac36ba373c2 |
SHA-256 checksums for all of these: checksums.txt