v0.16.0-rc.1

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

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 in exp writefs@mvdand0eca3f
  • cmd/cuerewrite exp writefs with internal/filetypes and internal/encoding@mvdan766668d
  • cmd/cueadd first exp writefs testscript@mvdan00eddbf
  • cmd/cueadd regression test for issue 4275@mvdan791e697
  • cmd/cuebe more helpful when publishing a module without source@mvdan3dfa50a

cue5

  • cue/parsersimplify else/fallback clause rules@mpvl0cbc9a1
  • cue/parserrestrict else to single clause only@mpvl28f0246
  • cueadd fallback keyword for for comprehensions@mpvlfe9f503
  • cue/testdatarename out/eval to out/evalalpha when appropriate@rogpeppec76dc5a
  • cue/buildfix stale identifier resolution across instances@mvdandd7361a

Other4

  • lsp/evaladd support for comprehension else/fallback@cuematthewe2d8f7b
  • internal/core/adtmissed missing missing@mpvl8732213
  • encoding/yamlimprove ast.StructLit and ListLit positions@cuematthewcde471e
  • encoding/jsonschemaremove net/url.Parse workaround for Go 1.26@mvdan6cce9bc

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

PlatformFile and SHA-256
macOS, Intelcue_v0.16.0-rc.1_darwin_amd64.tar.gz7598effa140440ee0f7dfdfa5d1ffea4dd996427dbecb877cd5e3d4f6a9f106d
macOS, Apple siliconcue_v0.16.0-rc.1_darwin_arm64.tar.gzdd8cf14f7f0807108ee09811e1dd3c6e5f3b97dafaf0850fdc8b67a941a43a2b
Linux, x86-64cue_v0.16.0-rc.1_linux_amd64.tar.gzc5ba5cbfaf530c18798db5e77e64fd2c6c27a7749a5dc0a9037c78a4a71ad854
Linux, Arm64cue_v0.16.0-rc.1_linux_arm64.tar.gzae177cef5d4a94c116bd8a3399e98fbbef9e4918baf9e937a9107d5ffc427883
Windows, x86-64cue_v0.16.0-rc.1_windows_amd64.zip353d261b8c4dbd34734d161ab73408364a42addf618d560181bce06bef93e98d
Windows, Arm64cue_v0.16.0-rc.1_windows_arm64.zip795d7a3934a455bc80afcb4af67da1f5780b05f6c6282c98134060f841fa914f
Install CUE