v0.9.0-alpha.2
This release includes the first experimental version of the new evaluator, as well as many other changes including the ongoing modules experiment. More details below.
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 performance. Adding your project to Unity not only guarantees that we will not break your tests unexpectedly, 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.
Evaluator
The new evaluator can now be enabled via CUE_EXPERIMENT=evalv3. It is not yet complete, and some known bugs remain, but over 95% of the existing tests are passing and the performance already looks promising. Disjunctions and initial structure sharing are now implemented as well.
Work on this new evaluator will continue during the v0.9 release cycle. We will only turn on the new evaluator by default once we are reasonably confident that there are no significant regressions, which may happen in a future release cycle like v0.10. In the meantime, testing via CUE_EXPERIMENT=evalv3 and bug reports are welcome.
We have also published a more detailed update on the performance umbrella issue, which you can subscribe to for updates. You can also take a look at the Evaluator Roadmap project to see the planned work remaining.
CL 1186144 fixes a number of Environment.up panics involving calls to Value.Expr, which affected users of the Go API as well as the openapi encoding.
CL 1185458 ensures we detect permanent errors for undefined fields earlier, necessary for the permanent errors fix in tools/flow below.
Modules
cmd/cue now supports OAuth2 refresh tokens when interacting with $CUE_REGISTRY, so that the user doesn’t have to re-run cue login once their access token expires.
CL 1191618 changes the modules client to treat “forbidden” errors as “not found” when finding which OCI repository contains a CUE module. This should resolve some unexpected “forbidden” failures when dealing with certain OCI registry services.
CL 1192905 adds initial support for the source field in cue.mod/module.cue files, which will soon be used as part of the proposal to determine what files go into a CUE module.
As a reminder, the ongoing and planned work can be seen in the Modules Roadmap, and we continue to hold regular Modules feedback sessions.
Encodings
The Encodings project was kicked off at the last CUE Community Update call. As part of this, we now have an #encodings channel on Slack, as well as an Encodings Roadmap project on GitHub where the ongoing and planned work can be seen.
In this release, the new YAML decoder is available in experimental form and enabled by default, given that all of our tests are already passing. You can disable it via CUE_EXPERIMENT=yamlv3decoder=0. The old YAML decoder will be removed in a future release once we’re reasonably confident that no significant regressions are present.
Go API
CL 1187452 teaches tools/flow to fail when a task encounters a permanent error, which were being ignored before.
CL 1191227 adds a cue/token.File.Lines getter method, much like go/token.File.Lines was added in Go 1.21.
CL 1191226 teaches cue/literal.ParseNum to support both positive and negative signs for consistency.
CL 1193030 ensures that cue/load.Instances always returns instances in a deterministic order, in particular when multiple instances share the same directory.
CL 1185361 deprecates cue/load.Config.StdRoot, which has not worked as advertised for some time.
cmd/cue
CL 1189314 adds a cue fmt --check flag to list badly formatted files rather than modifying them directly.
CL 1192180 speeds up cue fmt by ensuring that it only processes each CUE file once, rather than formatting files from parent directories as well.
All changes
95 changes since v0.9.0-alpha.1by area
all3
allreplace sort.Sort and sort.Slice with slices.SortFuncallremove a few uses of fmt.Sprintallremove manual work via //go:generate stringer
cmd14
cmd/cue/cmdexpose evalv3 experimentcmd/cueadd global cpuprofile and memprofile flagscmd/cueavoid calling os.Exit directlycmd/cuemake fmt process each file exactly oncecmd/cueprint paths relative to the current directory in fmt --checkcmd/cueprint relative paths in fmt --checkcmd/cuereplace MainTest entrypoint with testing.Testingcmd/cuetestcueandcue cmdvia testscriptcmd/cuedisable the wasm interpreter by default for nowcmd/cueget go: support time.Durationcmd/cueadd a fmt --check flag to list badly formatted filescmd/cuelock the logins.json during an updatecmd/cueadd refresh tokens supportcmd/cueuse fewer go/types.Type.String calls
cue14
cue/testdataadd variants of issue1684cue/testdataadd benchmark for billion laughscue/loadmake a note about importPkg redoing lots of workcue/loadensure load.Instances sorts instances deterministicallycue/tokenadd a File.Lines getter methodcue/literalallow a leading positive sign in ParseNumcue/testdatapolish test before implementing disjunctionscue/loadremove support for cue.mod filescueadjust Environment for comprehensionscue/loadfix doc comment typocue/loadtreat stdlib-like import on command line as errorcue/loadconsistent error message quotingcue/loaddeprecate Config.StdRootcue/loadchange stdlib import test case
internal54
internal/cueversionbump for v0.9.0-alpha.2internal/core/adtfail earlier on incompatible typesinternal/core/adtintroduce structure sharinginternal/core/adthacky alternative for cyclicReferencesinternal/core/adtpre-evaluate pattern constraintsinternal/core/adtfinalize let valueinternal/core/adtrecord stats for new evaluatorinternal/core/adtimplement pattern matching for new evaluatorinternal/cueexperimentenable CUE_EXPERIMENT=yamlv3decoder by defaultinternal/envflagadd support for key-values and defaultsinternal/encoding/yamladd the new Decoderinternal/encoding/yamladd even more test casesinternal/core/adtfix default handlinginternal/core/adtfix task completion across disjunction boundariesinternal/core/adtfix closedness issue with pattern constraintsinternal/core/adtfix path in error messagesinternal/core/adtpatch old status mechanisminternal/core/adtadd methods for accessing Conjunctsinternal/core/adtremove unnecessary codeinternal/core/adttask is not always definedinternal/core/adtinitialize nodeContext in two phasesinternal/encoding/yamladd more decoder testsinternal/encoding/yamlcopy decode_test.go from internal/third_party/yamlinternal/core/adtremove unnecessary codeinternal/core/adtadd task deprecationinternal/core/adtset list type as soon as knowninternal/core/adtalso check closedness for list in Equalinternal/core/adtmatch patterns only if type matchesinternal/core/adtguard visual debugger from opening too many tabsinternal/core/adtkeep arcTypes per closeContextinternal/core/adtforward cloned disjunctinternal/core/adtcompute kind differently for new evaluatorinternal/core/adtvalidate alignment of closeContextinternal/ciwe no longer need to set CUE_LONG=trueinternal/core/adtfixed closedness issue for embeddings in filesinternal/core/adtdo not use NOTIFY arcs for closedness checkinginternal/core/adtallow definitions in structsinternal/core/adtadd edge cases for disjunctionsinternal/core/adtcompare nodes based on underlyinginternal/cuetxtarautomatically clean up once diff is goneinternal/core/adtenable disjunction tests for alpha evaluatorinternal/core/adtfirst implementation of disjunctionsinternal/core/adtuse Vertex.Indirect in more placesinternalteach ToFile to not drop StructLit commentsinternal/registrytestensure that 401 errors have a Www-Authenticate headerinternal/core/adtadd benchmark for exponential behaviorinternal/cibump to macos-14 and Go 1.22.2internal/filetypesreplace encoding/gocode with go:embedinternal/mod/mvsavoid using reflect.DeepEqualinternal/sourceadd Open, moving from internal/encodinginternal/third_party/yamlremove last bits of reflectinternal/third_party/yamldeduplicate source.Readinternal/core/adtdetect permanent errors for undefined fields earlierinternal/core/adtadd a little more detail to Environment.up panics
mod3
mod/modfileadd support for "source" fieldmod/modregistrytreat "forbidden" as "not found"mod/modconfigswap os.ReadFile and os.Rename with robustio
Other7
tools/trimupdate for new evaluatorpkg/listmake Sort work for new evaluatorREADMEfix broken links to tour and k8s tutorialdocremove the kubernetes tutorialdocremove the tour- update github.com/google/uuid
tools/flowreturn permanent errors from tasks
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_0e9f6a19175e53e895b5d1dca730e0c601639460951e09d62f858ead01f7f743 |
| macOS, Apple silicon | cue_1591770abba1d2ef1f35a9c1365d2c92f671c5546598eb962276e75598ba80ec |
| Linux, x86-64 | cue_48e3596c3725a1cf216e2b0f6d6b033395a855ae1b1aa41eaba0065d696227b3 |
| Linux, Arm64 | cue_30d29e21c4df829b26937418a945324ee34227530dbc2eaf8ddeee50eda789a3 |
| Windows, x86-64 | cue_113a7da382aa39d25e7e9209377ab0ebba3eddc749ff2cd555dc52b39c0e40ce |
| Windows, Arm64 | cue_967b9d3ac9a3cecf63d34e64dd5e3d6cc0b4a0ac50fe5b80b47de8e74c7082f1 |
SHA-256 checksums for all of these: checksums.txt