v0.12.0-alpha.1

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release fixes many bugs in the new evaluator, enables the embedding experiment by default, and further improves JSON Schema support.

Changes which may break some users are marked below with: ⚠️

Evaluator

CLs 1204365, 1205361, and 1205363 fix a number of closedness issues in the new evaluator, which were spotted thanks to user reports and Unity testing.

CLs 1204490, 1205368, and 1205368 resolve a number of significant performance issues spotted in the new evaluator.

CL 1205861 enables the Embedding proposal via CUE_EXPERIMENT=embed by default, now that the proposal has been moved to a “likely accept” state for v0.12.

CL 1204491 introduces CUE_DEBUG=openinline, enabled by default, which emulates the old evaluator’s incorrect closedness behavior in some edge cases. This should help the transition towards the new evaluator, and allow us to fix the behavior of these edge cases in future CUE releases.

CL 1204608 introduces CUE_DEBUG=sortfields which sorts all struct fields lexicographically. This replaces CUE_DEBUG_SORT_ARCS=1, which did not work with the new evaluator.

Go API

⚠️ CL 1205569 enables CUE_EXPERIMENT=decodeint64 by default, causing cue.Value.Decode to choose int64 rather than int as the default Go type for CUE integer values.

Builtins

CL 1204378 teaches list.UniqueItems to handle incomplete values correctly, fixing a bug in JSON Schema.

CL 1204425 fixes list.MatchN so that it matches final values, like the matchN evaluator built-in, fixing a bug in JSON Schema.

⚠️ CL 1204920 removes the long-deprecated cue.Value.IsClosed method.

⚠️ CL 1205530 removes the long-deprecated cue.Instance.Doc method.

⚠️ CL 1205529 removes the long-deprecated cue/load.Config.BuildTags field.

cmd/cue

CL 1204111 fixes some edge cases where CUE comments were lost or duplicated, particularly with cue def.

CL 1204874 re-enables command suggestions when a user makes a typo like cue exprot.

Encodings

JSON Schema spec compatibility is improved further by fixing a number of bugs and adding missing features. Notably, it now supports arbitrary references to internal structure in $ref. JSON Schema’s spec test suite has gone from a “pass” rate of 75% to 79% thanks to these efforts.

All changes

119 changes since v0.11.0by area

all4

  • allsunset CUE_EXPERIMENT=modules@mvdanc8033e9
  • allCUE_EXPERIMENT=modules no longer needs to be set in tests@mvdaneaea301
  • allfix "a the", "the a", and "the the" mistakes@mvdanb18a322
  • allfix testdata remnants of cue/format indenting first lines@mvdan29e0b46

cmd12

  • cmd/cueremove support for CUE_DEBUG_SORT_ARCS@mvdanf2775f8
  • cmd/cuefix spelling of CUE_EXPERIMENT for evalv2@myitcv54c734c
  • cmd/cueadd new CUE_EXPERIMENT and CUE_DEBUG flags to help environment@mvdan4e92634
  • cmd/cueadd regression test for #3616@myitcvf99441a
  • cmd/cuededuplicate the use of CUE_EXPERIMENT=evalv3@mvdan46c1cb2
  • cmd/cueadd a testscript for CUE_DEBUG=sortfields working with the Go API@mvdan4258e9a
  • cmd/cueenable subcommand suggestions when a user makes a typo@mvdane11cbfb
  • cmd/cueadd a test case for a subcommand typo@mvdan70e5273
  • cmd/cueadd tests for the loss of comments with cue def@haoqixub1f4f09
  • cmd/cueadd test for the loss of comments with cue def@haoqixu43a16ed
  • cmd/cuewire up CUE_DEBUG into the runtime for evalv2@mvdan4c1eb5c
  • cmd/cueadd integration test for CUE_DEBUG=sortfields@mvdane514fb7

cue22

  • cue/loadassume that Config.Registry is set when SkipImports is false@mvdan33945a2
  • cue/ast/astutilensure imports always start a new section@rogpeppe226aac1
  • cue/ast/astutiladd test for file-level comments joining with imports@rogpeppedef8bcf
  • cue/astremove outdated docs@rogpeppe1ea52f1
  • cueenable CUE_EXPERIMENT=decodeint64 by default@mvdan0005c22
  • cueadd more godoc links@mvdan0e99c20
  • cueremove Instance.Doc@mvdan54dc544
  • cue/loadremove Config.BuildTags@mvdan49a53d2
  • cueuse embedding for UnifyAccept in V3@mpvld471ca1
  • cue/parseralways allow predeclared identifiers on RHS@mpvlec9117a
  • cue/errorssimplify printError@mvdan4ce128d
  • cueuse Value.ctx helper method consistently@mvdan5d8f2cd
  • cuerewrite away all uses of Iterator.Label@mvdan671ce60
  • cuereenable Allows(AnyDefinition) test case with a TODO@mvdanc360ba8
  • cueremove the deprecated and hidden Value.IsClosed method@mvdane53cb65
  • cueuse cue/literal to parse integers out of attributes@mvdan5dee391
  • cueadd an attribute test with a non-Go integer literal@mvdan3487155
  • cuemake the tests non-chatty by default@mvdan3c11890
  • cuefix loss or duplication of comments@haoqixu53bbca5
  • cuefix the loss of comments in Value.Syntax()@haoqixuc9d519e
  • cue/loadsupport loading a CUE package whose directory ends with .cue@mvdanb54e767
  • cuefix Value.Unify closedness issues for evalv3@mpvl45e3256

encoding20

  • encoding/jsonschemarespect Config.PkgName@rogpeppe4f8b741
  • encoding/jsonschemaadd test for Config.PkgName@rogpepped5de8d4
  • encoding/jsonschemaimplement Config.DefineSchema@rogpeppe0112a33
  • encoding/jsonschemaupdate external test errors@rogpeppec4ef079
  • encoding/jsonschemarefactor reference handling@rogpeppe028c6f3
  • encoding/jsonschemaadd structBuilder type@rogpeppeccaee22
  • encoding/openapifix updating golden files in tests@rogpeppe6e34b9e
  • encoding/jsonschemadefine isTop and isBottom functions@rogpeppe5fdf0c2
  • encoding/jsonschemado not use explicit phase for TODO constraints@rogpeppe9639ed8
  • encoding/jsonschemaremove isSchema field@rogpeppe781f140
  • encoding/openapisimplify looping over CUE fields@mvdanafafedb
  • encoding/jsonschemasimplify ref logic without changing behaviour@rogpeppec53f32a
  • encoding/jsonschemado not return state from schemaState@rogpeppe6985d38
  • encoding/jsonschemainclude doc comments for definitions@rogpeppe1f00e31
  • encoding/jsonschemaadd test for a doc comment on a definition@rogpeppe65b1005
  • encoding/jsonschemafix oneOf with unconstrained elements@rogpeppe956a558
  • encoding/jsonschemaadd test case for issue 3586@rogpeppe15f57d8
  • encoding/jsonschemaclose structs and mark fields as required in enum and const@haoqixu0ad2119
  • encoding/jsonschemaprevent invalid end position of id tag@haoqixu407cccd
  • encoding/jsonschemaadd a test for panicking about invalid pos@haoqixu7d64696

internal46

  • internal/ciupdate Go and goreleaser versions for the next release@mvdan962fafa
  • internal/cueexperimentenable embed experiment by default@mvdan1b2d11c
  • internal/astinternaladd IncludePointers@rogpeppe950f7fb
  • internal/mod/modloadsort module versions when adding a new dependency@mvdan2be40ea
  • internal/core/adtremove resolved TODO@mvdan5bf869e
  • internal/core/adtmore pruning in partial disjunction check@mpvla03ed2e
  • internal/core/adtsupport simplifying string bounds@mpvl6d15591
  • internal/core/adtorder bound error messages@mpvld298a53
  • internal/core/adtfix bug in bound simplification@mpvlf9e5b6a
  • internal/core/adtrevert recent change@mpvl00fa80a
  • internal/core/adtpatch performance issue related to error reporting@mpvlf1ea2ff
  • internal/core/adtalternative algorithm for splitting trees@mpvl6c86b41
  • internal/core/adtfix closedness bug with patterns@mpvl4ae75f8
  • internal/core/adtpass closeContext to openDebugGraph@mpvl8aa5769
  • internal/core/adtalways create new closeContext on reference@mpvl9b61fc0
  • internal/core/adtadd various closedness tests@mpvlcce50f4
  • internal/core/adtcleanup some todos@mpvl5195004
  • internal/core/adtalso handle __no_sharing for V2@mpvl06cf5f4
  • internal/ciuse pull_request_target for PR CI jobs@mvdan5149ebd
  • internal/core/adtfix dropping of field@mpvl432c114
  • internal/core/adtmake Conjuncts type ConjunctGroup@mpvl787d04c
  • internal/core/adtsimplify code@mpvlf7d3973
  • internal/core/adtadd test for dropped field issue@mpvl4c7ee01
  • internal/core/adtallow selectively turning off sharing@mpvldc1ef63
  • internal/core/runtimeconsistently follow CUE_DEBUG env var flags@mvdand5527cf
  • internal/core/adtclose previously fixed issue@mpvl5ac1b8a
  • internal/core/adtadd tests for Issue 3535@mpvl698da05
  • internal/ciuse the new tipdeploy workflow in cuelang.org@myitcv9f217e1
  • internal/astinternalmake it easier to debug references@rogpeppe0b06bd5
  • internal/cistart enforcing staticcheck in CI@mvdan6f1b0a2
  • internal/core/adtinlining simplification@mpvl500ed27
  • internal/cuedebugrename files@mpvl9773dae
  • internal/cueexperimentremove yamlv3experiment@mvdan5e20434
  • internal/core/adtadd compatibility mode for issue 3534@mpvl2b55328
  • internal/core/adtadd tests for issue 3534@mpvl9b8a10c
  • internal/core/adtadd compatibiltiy mode for closedness issue@mpvl0639975
  • internal/core/adtimprove structure sharing in cycles@mpvlc29fd02
  • internal/core/adtadd test for perfromance issue 3587@mpvlf054292
  • internal/core/adtdisable prep for associative lists@mpvl00ca1c9
  • internal/core/adtfix error checking@mpvl5c9b07f
  • internal/core/adtadd tests for disjunction elimination@mpvl64de763
  • internal/core/toposortsupport sorting fields lexicographically@cuematthewd95fd51
  • internal/cidelete completed TODO about the old registry tokens@mvdan5ed8701
  • internal/ciupdate Linux to ubuntu-24.04@mvdan25b7f46
  • internal/tdtestmake compatible with cuetdtest@mpvl672755c
  • internal/cueversionbump LanguageVersion for v0.12@mvdan44696c3

pkg4

  • pkg/listMatchN matches in final mode@mpvla2d428d
  • pkg/listadd tests for issue 3519@mpvl38c6949
  • pkg/listhandle incomplete values for UniqueItems@mpvl466b83b
  • pkg/listadd tests for UniqueItems@mpvl290f09f

Other11

  • update most dependencies ahead of v0.12.0-alpha.1@mvdan18669a7
  • evaluatoradd regression test to lock in evalv3 wrt #3567@myitcv92b8f6f
  • READMEupdate version number in installation example@elzapp1f15584
  • enable and fix "value never used" staticcheck rule@mvdan6ef4f68
  • enable and fix "non-generic receiver names" staticcheck rule@mvdan55166dd
  • add staticcheck config files to appease the linter@mvdan9d10fe1
  • Revert "cmd/cue: add test for the loss of comments with cue def"@mvdanede6de0
  • Revert "cue: fix the loss of comments in Value.Syntax()"@mvdan974b5d5
  • docdon't vendor a copy of DCO, as it is under another license@jas471107973ae
  • update txtpbfmt dependency@mvdan8282ca5
  • update golang.org/x dependencies@mvdan18567fa

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.12.0-alpha.1_darwin_amd64.tar.gz87c0b79c25a0adae247c86adbec740d44641cd953e655a871217a7fc37e17ae5
macOS, Apple siliconcue_v0.12.0-alpha.1_darwin_arm64.tar.gzd24231495cae6efe672bb7fc757a297bf9543e2ea2896f94a03db525bdb50056
Linux, x86-64cue_v0.12.0-alpha.1_linux_amd64.tar.gzc1a3c45f5b0c29a6095d10514a80f5e940a1820a729640e747050f9f544c4a59
Linux, Arm64cue_v0.12.0-alpha.1_linux_arm64.tar.gz7bd0517dae8d994790b24818f59bc67abe8ff8ed9e308148b62f31b45a2fa20d
Windows, x86-64cue_v0.12.0-alpha.1_windows_amd64.zip43844d66b615037fb0e52bb5fedaa4716604b66637f6579ac6f7c5d9423a7d35
Windows, Arm64cue_v0.12.0-alpha.1_windows_arm64.zip86edcb7bdcc3aa59e0158b2cf8c40b6feb34563e7d5ca9b4246dd70388bb85fa

SHA-256 checksums for all of these: checksums.txt

Install CUE