v0.18.0-rc.3

Pre-release Released

A release of CUE, published on cue.dev.

Changes which may break some users are marked below with a warning.

Language

The spec now states that close returns a value which is not a struct or list unchanged, where it failed on a scalar. A disjunction passed to it keeps its scalar disjuncts, with each struct disjunct closed as before.

Evaluator

Fix several regressions introduced in earlier v0.18 pre-releases, involving defaults, comprehensions, and let declarations (#4526, #4530, #4532, #4533).

Fix several regressions introduced in v0.17.0: a vertex not initialized panic when flattening a pattern-constrained map selected from an inline struct (#4521), a disjunction’s default not applied when a comprehension guard reads it before the disjunction is declared (#4520), and, at language versions before v0.18.0, spurious field not allowed errors on the elements of a list whose validator is embedded through a definition (#4522) and on the fields of definitions embedded at a package root through a regular field (#4523).

Two fixes align closedness with the spec: a field opened with the spread operator, as in s: #B..., is now closed again when it is also unified with #B itself, in either order (#4525), and a field which a spread adds within a definition is now closed when selected through a regular field holding the definition, which the spec now states explicitly (#4528).

As the spec requires, a comprehension at the top level of a struct passed to close now sees the fields unified into that struct from outside, where it failed as incomplete, which could break configurations after cue mod upgrade (#4535).

Warning

As the spec requires, an ellipsis in an embedding, as in s: {{#B, ...}, h: {i: 1}}, now opens only the struct it is part of, and no longer the structs declared beside the embedding, so that a field added to one of them, such as s: h: extra: 1, is rejected as field not allowed, as it already was when the embedder was reached through a reference. Give such a struct its own ellipsis, as in h: {i: 1, ...}, or declare the field in it.

Configurations with many nested disjunctions, such as schemas imported from JSON Schema, evaluate up to 9% faster and allocate up to 16% less memory.

cmd/cue

cue fix and cue mod upgrade now leave fewer structs wrapped in __closeAll or __reclose (#4534), and no longer produce invalid syntax when converting an alias named by a keyword such as in. New names picked by the exporter are numbered sequentially, as in x_1.

A failed tool/exec.Run task which must succeed now includes the captured standard error in its error message.

Fix panics in cue trim when a comprehension clause after a for or let clause refers to an outer field (#4537), and in cue def -e when the selected value refers to a field whose label is not a valid identifier, such as "foo-bar".

Downloads

Every file this release published, with its SHA-256. Most people install CUE as Installing CUE describes, which also shows how to check a download.

Installers

PlatformFile and SHA-256
macOS, Apple silicon and Intelcue_v0.18.0-rc.3_darwin_all.pkg77aced939c73398dba411df53aa3ac222f4d74dd30024bed71df3b4601c293eb
Windows, x86-64cue_v0.18.0-rc.3_windows_amd64.msi6f5b4fb4f1229f4da380db251f05e72f3c286ac5d0700ec565db95a0f96d499b
Windows, Arm64cue_v0.18.0-rc.3_windows_arm64.msi9e5dd9e437df23e3b10049e0e24907a0cc7dd92c2738d5212a33ffc07d3a685a

Archives

PlatformFile and SHA-256
macOS, Intelcue_v0.18.0-rc.3_darwin_amd64.tar.gzcf247244f0d47652446a7c5d9b4ac4aae7c2f0f780da9377a3156272d94b7864
macOS, Apple siliconcue_v0.18.0-rc.3_darwin_arm64.tar.gz2bb8bcb6a8bb86bc9c0f5baae0f2f0ed963118fa90207d33fbe4baa69254eb2a
Linux, x86-64cue_v0.18.0-rc.3_linux_amd64.tar.gz7907d9744104c64bb4601871bea72bc83ea675e4a490dae5400cd740d5a35b6f
Linux, Arm64cue_v0.18.0-rc.3_linux_arm64.tar.gzf903f75ad903f0d93e1e944ef825bf5d696a7f4fde2443040d2ce8749c522018
Windows, x86-64cue_v0.18.0-rc.3_windows_amd64.zip475be7edf1b2ba073f0e2229921253f8aa177ecc5f2ec24ab8103af4898e34ff
Windows, Arm64cue_v0.18.0-rc.3_windows_arm64.zipf19c2a11f228bb000efe636bb4dbf4b8d179a23f4e6182390f785b67bcc88bcb

SHA-256 checksums for all of these: cue_v0.18.0-rc.3_checksums.txt

Install CUE