v0.16.0-rc.1
Changes which may break some users are marked below with: ⚠️
Language
As a reminder, we have two ongoing language experiments since v0.15; a replacement for struct embedding and a rework of aliases. Please give these a try and report any issues or feedback!
⚠️ else is now part of the try experiment
v0.16.0-alpha.2 introduced the else comprehension clause, available to any module targetting language version v0.16.0 or later without needing to use an experiment.
Thanks to user feedback and design discussions, we have come to realize that the existing design needed tweaking. for comprehensions now use a fallback token rather than else in order to clarify intent, and we have also restricted the use of else in chains of comprehension clauses, which could easily cause confusion.
Given how late in the release cycle we already are, and understanding that we probably will want to make further tweaks to this feature before it’s stable, we have decided to put this language feature behind a file experiment after all.
Rather than adding @experiment(else), we have chosen to bundle this with @experiment(try), given that try without else does not make much sense.
For more information on the up-to-date else and fallback clauses, follow our how-to guide, or read the updated spec change patch.
Evaluator
Fix a regression introduced by v0.16.0-alpha.2 where cue cmd could suddenly report undefined or missing fields from data in non-tool CUE files.
cmd/cue
cue exp writefs gains an encoding optional field for regular files, to specify an encoding rather than infer it from the filename extension.
All changes
14 changes since v0.16.0-alpha.2by area
cmd5
cmd/cuesupport explicit encodings inexp writefscmd/cuerewriteexp writefswith internal/filetypes and internal/encodingcmd/cueadd firstexp writefstestscriptcmd/cueadd regression test for issue 4275cmd/cuebe more helpful when publishing a module without source
cue5
cue/parsersimplify else/fallback clause rulescue/parserrestrict else to single clause onlycueadd fallback keyword for for comprehensionscue/testdatarename out/eval to out/evalalpha when appropriatecue/buildfix stale identifier resolution across instances
Other4
lsp/evaladd support for comprehension else/fallbackinternal/core/adtmissed missing missingencoding/yamlimprove ast.StructLit and ListLit positionsencoding/jsonschemaremove net/url.Parse workaround for Go 1.26
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_7598effa140440ee0f7dfdfa5d1ffea4dd996427dbecb877cd5e3d4f6a9f106d |
| macOS, Apple silicon | cue_dd8cf14f7f0807108ee09811e1dd3c6e5f3b97dafaf0850fdc8b67a941a43a2b |
| Linux, x86-64 | cue_c5ba5cbfaf530c18798db5e77e64fd2c6c27a7749a5dc0a9037c78a4a71ad854 |
| Linux, Arm64 | cue_ae177cef5d4a94c116bd8a3399e98fbbef9e4918baf9e937a9107d5ffc427883 |
| Windows, x86-64 | cue_353d261b8c4dbd34734d161ab73408364a42addf618d560181bce06bef93e98d |
| Windows, Arm64 | cue_795d7a3934a455bc80afcb4af67da1f5780b05f6c6282c98134060f841fa914f |