v0.13.0-rc.1

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release adds further fixes to the new evaluator, and speeds up the CLI when there are many inputs.

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

Evaluator

The new evaluator is improved to fix more regressions which led to incorrect errors. Since the last alpha release, two newly added projects to Unity now succeed with evalv3, and we have resolved eight issues reported on GitHub.

We also fix a bug where anonymous CUE files, such as those without a package clause, did not properly report unused import errors.

cmd/cue

The cue help filetypes logic, written itself in CUE, no longer requires using the evaluator to parse CLI arguments or load CUE packages. This results in significant speed-ups when using the CLI with many inputs.

Fix a bug where some errors shown to the user did not use relative paths to CUE files or directories as expected.

Go API

⚠️ CUE_EXPERIMENT=decodeint64 can no longer be disabled as we consider the experiment finished, having been introduced in CUE v0.11.0.

Fix a recent regression where using os.Getwd alongside the ./cmd/cue/cmd API had stopped working as it did before.

Encodings

cue exp gengotypes now allows control over how to generate optional CUE fields via e.g. @(,optional=nullable), where the default now is not to use pointers.

⚠️ cue exp gengotypes tweaks how it parses @(,type=) options to support composite types such as slices and maps. Note that this means package paths with slashes must be quoted now.

All changes

106 changes since v0.13.0-alpha.4by area

cmd16

  • cmd/cueadd CUE_EXPERIMENT=cmdreferencepkg@mvdan5548932
  • cmd/cueadd testscript showing input unmarshal behavior with cue cmd@mvdaneebcefc
  • cmd/cuedocument that embedding is limited to files in the same module@mvdan3559578
  • cmd/cueupdate which experiments are on by default@mvdancfe1783
  • cmd/cuetest the "found packages $X and $Y in $DIR" error message@mvdan4f3a215
  • cmd/cuedon't use os.Getwd at init time@mvdane7d687f
  • cmd/cuemove CUE_DEBUG_PARSER_TRACE to CUE_DEBUG=parsertrace@mvdan8fb5fea
  • cmd/cueadd testscript for CUE_DEBUG_PARSER_TRACE@mvdana95cfa8
  • cmd/cueadd more gengotypes test cases for optional=nillable@mvdandefc384
  • cmd/cueadd a testscript for --inject-vars@mvdanaeb0747
  • cmd/cueadd testscript to ensure we report unused imports@mvdan21d4ba7
  • cmd/cuemention vet-c's three behaviours@jpluscplusm8f552be
  • cmd/cuefix up xml+koala testscript to actually test stdin@mvdana1db0ad
  • cmd/cuetest that gengotypes keeps top-level definition docs@mvdandaaba58
  • cmd/cueadd gengotypes test cases for the optional attribute option@mvdana164970
  • cmd/cueadd CUE_BENCH to benchmark CLI invocations with Go allocs@mvdan2e8d5a7

cue16

  • cue/testdataadd test cases for #3924@mvdan2740b68
  • cue/loadmake MultiplePackageError support relative dir paths@mvdana8f9383
  • cue/testdataadd regression test for issue 2310@mvdan8fa1079
  • cue/errorsuse slices.CompactFunc to deduplicate errors@mvdana1a53e5
  • cue/errorsprint relative positions when used as arguments too@mvdan80ff2bd
  • cue/testdataadd regression tests for issue 2337@mvdan4154968
  • cue/testdataadd a regression test for issue 2241@mvdan17e198c
  • cue/testdataadd a regression test for issue 2229@mvdan1048634
  • cue/testdataadd regression test for issue 1867@mvdanaacdc3b
  • cue/testdataremove resolve/002.txtar@mvdan89d1313
  • cue/testdataadd regression test for issue 2209@mvdan5db678d
  • cue/testdataadd a regression test for issue 1640@mvdan09dee80
  • cue/testdataadd a regression test for issue 2526@mvdan0be3c85
  • cuefix two godoc links@mvdan2aee339
  • cue/formatadd test case for formatting empty and near-empty files@mvdan17317ca
  • cue/ast/astutilrefactor walkVisitor away@mvdan66cf387

encoding14

  • encoding/jsonschemafix x-kubernetes-group-version-kind@rogpeppe9752c3a
  • encoding/jsonschemarecognize date-time too@rogpeppe398e8be
  • encoding/jsonschemaupdate format support@rogpeppe59e82a7
  • encoding/jsonschemaadd numeric format to CRD test@rogpeppe4e8dc78
  • encoding/jsonschemaavoid adding unnecessary ellipses@rogpeppe68dad74
  • encoding/jsonschemaimplement x-kubernetes-group-version-kind@rogpeppe2c01ee5
  • encoding/jsonschemaadd VersionKubernetesAPI@rogpeppea918c8b
  • encoding/jsonschemaCRD metadata field is not required@rogpepped0f10ea
  • encoding/jsonschemaCRDs always define resources@rogpeppedbe2611
  • encoding/jsonschemaadd metadata field to CRD test case@rogpeppef712e19
  • encoding/openapiadd regression test for issue 1643@mvdan8e4c818
  • encoding/xml/koalaupdate koala header comments@matts858a134a3
  • encoding/jsonschemafix the tests on Go tip@mvdan3ba376f
  • encoding/jsonschemaadd OpenOnlyWhenExplicit option@rogpepped1baad4

internal53

  • internal/core/adtfix disjunction state management@mpvle145a14
  • internal/core/adtadd tests for Issue 3925 and 3905@mpvl38357b7
  • internal/core/adtavoid finalizing too early@mpvlf87800d
  • internal/core/adtadd tests for issue 3919@mpvl47c9e99
  • internal/filetypesremove version from TODO@rogpeppec456d08
  • internal/core/adtfix some embedding issues with closedness@mpvl2597621
  • internal/core/adtadd tests for 3921@mpvlb3caad3
  • internal/encoding/gotypeshandle cyclic types out of the box@mvdan61e0d7f
  • internal/core/adtcarry over enclosing scope@mpvl7de64e8
  • internal/core/adtadd tests for 3920@mpvl0f26957
  • internal/core/adtupdate environment for disjunctions@mpvle231c49
  • internal/core/adtadd tests for issue 3891@mpvlbb2204f
  • internal/golangorgxcuelsp: load cue@cuematthew8ca0f5b
  • internal/golangorgxcuelsp: remove Go-specific analysis@cuematthewb9acd04
  • internal/core/adthandle vertices properly for comprehensions spanning disjunctions@mpvl56a915b
  • internal/core/adtadd tests for issue 3899@mpvlb17be30
  • internal/cueexperimentphase out DecodeInt64@mvdan3be8e48
  • internal/encoding/gotypesimplement optional=nillable@mvdan9ef3b70
  • internal/encoding/gotypesparse type options as Go expressions@mvdanf2e0b7e
  • internal/filetypesremove dependency on CUE evaluator@rogpeppe050844f
  • internal/filetypesgenerate FromFile@rogpeppef37ff95
  • internal/filetypesgenerate toFile implementation@rogpeppe6454acb
  • internal/filetypes/internal/genfuncCUE to Go translation@rogpeppeb3e8da8
  • internal/filetypes/internal/genfuncCUE expression simplification@rogpeppe9c267d8
  • internal/filetypes/internal/genstructnew package@rogpeppec65ecb4
  • internal/filetypesremove special cases@rogpeppec7a63ad
  • internal/core/adtallow stack-based unrolling of blocking@mpvl5c22dc8
  • internal/core/adtadd tests for 3899@mpvle65a5e0
  • internal/ci/goreleaseradjust after evalv3 fix for #3908@mvdan6fd7ee4
  • internal/core/adtfix default handling@mpvldb98b5f
  • internal/core/runtimevalidate imports in package-less files too@mvdan45bcd34
  • internal/cuetxtarsupport matrix name skips like #skip-v2@mvdan6204a0a
  • internal/golangorgxstub out gcimporter@mvdan4b194d7
  • internal/golangorgxdrop testenv APIs we won't need@mvdan0e10ed9
  • internal/golangorgxremove the goroot package@mvdand3ae2ca
  • internal/golangorgxremove the aliases package@mvdan4598c91
  • internal/golangorgxremove refactor/inline@mvdan8e2dd0c
  • internal/golangorgxdrop util/slices in favor of slices@mvdan4a580ad
  • internal/encoding/gotypesdon't drop docs for top-level definitions@mvdan4c0c780
  • internal/filetypesstrict separation of tags vs subsidiary tags logic@rogpeppecb7a48c
  • internal/filetypesregularize Default@rogpeppeae4ac04
  • internal/filetypesclarify FromFile@rogpeppe7701a87
  • internal/filetypesrefactor parseType to parseScope@rogpeppe8240e3c
  • internal/filetypesadd evaluator mutex@rogpeppe737cd20
  • internal/filetypesconsolidation@rogpeppe667575a
  • internal/encoding/gotypesanalyze all CUE definitions first@mvdan1753350
  • internal/encoding/gotypescontrol optional types via attributes@mvdan8e82e47
  • internal/encoding/gotypeshandle quoted CUE fields correctly@mvdanefd4ad1
  • internal/core/adtfix expression comments in SimplifyBounds@mvdane77a582
  • internal/core/adtavoid apd.Decimal errors in SimplifyBounds@mvdan4a1805a
  • internal/core/adtreuse a slice to make copies of the required reqSets@mvdand3a3b16
  • internal/ciflip to using the official curated cue.dev schemas@myitcva7e97fe
  • internal/golangorgxcuelsp: view definitions for cue@cuematthew3478e43

pkg3

  • pkgmake $id in tasks a reference to a hidden field@mvdan1c27bdb
  • pkg/listadd a regression test for issue 3416@mvdanb0a5318
  • pkg/listadd regression test for issue 2594@mvdanf93b6b9

Other4

  • Revert "internal/core/adt: carry over enclosing scope"@mvdana6daeb9
  • allcue fmt@mvdan5c33e24
  • tools/flowmove CUE_DEBUG_TOOLS_FLOW=1 to CUE_DEBUG=toolsflow=1@mvdan38b8955
  • allclean up a number of txtar test skips@mvdanebf4e65

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.13.0-rc.1_darwin_amd64.tar.gzb2bcb9d44df559556d38e07a9ded13a10c58ada3bac80acd2fedbfe295f92287
macOS, Apple siliconcue_v0.13.0-rc.1_darwin_arm64.tar.gz6d6889605f2f566a0f576eae5dc6402bda273759154d017272f1c9093da0ec9c
Linux, x86-64cue_v0.13.0-rc.1_linux_amd64.tar.gz84a0546e04abb3b17424a56e7e99119b20db0cfee7dcf76d0150d66ed9d0ed94
Linux, Arm64cue_v0.13.0-rc.1_linux_arm64.tar.gz847c5e0f9f17827036f638dfe41d2769025cfa69e0fec2cab10c6362d00da052
Windows, x86-64cue_v0.13.0-rc.1_windows_amd64.zip23095053b52ca6193229188c927a81556dd2d0f2f709eafc0921be3be8c1f683
Windows, Arm64cue_v0.13.0-rc.1_windows_arm64.zipd113898125558c8ce13d87d95510e5b960eea952f24fbd8080cd08b8dd81d141

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

Install CUE