v0.9.0-alpha.5

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

This release includes changes to the evaluator and modules experiments, as well as a number of other improvements and fixes.

Evaluator

Following the introduction of the new evaluator experiment in v0.8.0-alpha.2 via CUE_EXPERIMENT=evalv3, this release includes support enabling the new evaluator via the Go API, as well as a number of fixes to known bugs in the new evaluator. More details can be found in the latest performance update posted by Marcel this week.

Subscribe to the Performance umbrella issue for future updates, and see the Evaluator Roadmap project for the planned work ahead.

Modules

Following the Modules proposal v3 being accepted, the modules experiment is now enabled by default in this release; see CL 1194664. It should no longer be necessary to set CUE_EXPERIMENT=modules, and CUE_EXPERIMENT=modules=0 can be used to disable the experiment. We are not aware of any regressions, so please file a bug if you find one.

CL 1194780 adds a cue mod fix command to fix up old cue.mod/module.cue files; see cue help mod fix.

CL 1194669 restricts the parsing of cue.mod/module.cue files to data-only mode, forbidding any references or comprehensions which may break cue mod commands or cause other issues.

CL 1194494 tweaks cue mod publish so that uncommitted VCS changes outside of the module directory no longer cause a “VCS state is not clean” error.

CL 1194495 teaches our modules registry client to treat all HTTP 404 errors as “not found” to improve compatibility with some registries which seem to return invalid error codes.

As a reminder, the ongoing and planned work can be seen in the Modules Roadmap, and we continue to hold regular Modules feedback sessions.

Go API

CL 1194421 fixes a memory leak where using load.Instances to load CUE modules would increase the size of a global cue.Context until the process was terminated.

CL 1194410 fixes cue/load so that it errors on empty string arguments once again.

Builtins

CL 1194165 fixes invalid builtin calls so that they correctly result in a “bottom” error.

CL 1194515 fixes structs.MinFields and structs.MaxFields to ignore optional fields, matching the documented behavior.

cmd/cue

CL 1193962 adds a cue fmt --files flag to interpret the arguments as file paths to walk and recursively format rather than package patterns.

CL 1194247 tweaks cue help so that it correctly fails when given unknown help topics or commands.

All changes

115 changes since v0.9.0-alpha.4by area

all5

  • allvarious very small cleanups from gopls and staticcheck@mvdan96f16f0
  • allremove last usages of ast.Node.{Comments,AddComment}@NoamTD4ae7530
  • alladd language.version to module.cue files@rogpeppe690add3
  • alltidy up a number of leftover Go mentions@mvdan495feee
  • allapply cue fmt as of v0.9.0-alpha.4@mvdanb2dd75a

cmd16

  • cmd/cueadd a regression test for issue 2704@mvdan46feda5
  • cmd/cueensure that fmt works outside a module with files too@mvdan11cbcd3
  • cmd/cueadd mod fix command@rogpeppe4575558
  • cmd/cuemove Dockerfile to the main package directory@mvdane801994
  • cmd/cuerepurpose exitOnErr into printError@mvdane9bf33c
  • cmd/cueadd cue fmt --files mode@NoamTD336a991
  • cmd/cuereplace most fatal exitOnErr calls with error returns@mvdan6c5f6e7
  • cmd/cuean empty string is neither a valid package nor file@mvdana7bdc24
  • cmd/cueno need to buffer an error to print to stderr@mvdand5802f6
  • cmd/cueremove TestHelp in favor of testscript@mvdan3977e0c
  • cmd/cueimprove cue vet examples' argument order@jpluscplusmfbe004d
  • cmd/cueexpand cmd_filetypes.txtar with more edge cases@mvdan72319e4
  • cmd/cuerefer to 'workflow commands' instead of 'commands'@myitcv65ed76d
  • cmd/cuefail when requesting a missing help topic@mvdan1be0b0f
  • cmd/cueuse cue/parser and cue/format directly in fmt@mvdan6d50092
  • cmd/cueadd tests that cover fmt on various filetypes@mvdan7e0fbec

cue24

  • cueadd another test for a disjunction bug fixed in evalv3@mvdan3588e1a
  • cue/loadtreat all absDirFromImportPath errors as PackageErrors@rogpeppefa64c62
  • cue/loadset the absolute file name when setting source@rogpeppe4a27795
  • cue/loaddo not scan imports of non-CUE files@rogpeppeac35a40
  • cue/loadadd major version suffix to module path in testdata@rogpeppef513a17
  • cue/loadmore correct treatment of module paths with major versions@rogpeppe0b70e5b
  • cue/loadbetter treatment of files specified on the command line@rogpeppe1591fd8
  • cue/loadfactor out syntax cache@rogpeppeef3c0c5
  • cue/loadremove directory argument from addFiles@rogpeppe6804717
  • cue/loadavoid "user:" and "instance:" error prefixes@rogpeppe612837a
  • cue/loadprepare for files package refactor@rogpeppee888508
  • cue/scannerremove go-fuzz testing code and data@mvdan5472c4b
  • cue/literaluse Label for labels consistently@mvdan97695d0
  • cue/parserswitch from go-fuzz to native fuzzing@mvdan43da0b0
  • cueadd regression test for a disjunction fix in evalv3@mvdanb3006ad
  • cue/ast/astutilremove deprecated API usage@NoamTD64bbf1b
  • cue/errorsuse fmt.Fprintf in writeErr directly@mvdan22d5530
  • cue/loadempty or absolute paths are not std import paths@mvdanfdebcd9
  • cuefix godoc links@mvdan4ed59e7
  • cue/loaddon't load from $PWD in the integration tests@mvdanbd9e49f
  • cueremove matrix_test.go@mpvlcd43871
  • cue/loadrestore the error result on an empty string argument@mvdan5e9aa4e
  • cue/loadsimplify logic around build.LoadFunc@mvdan3ebadf1
  • cue/loadremove the now-unused moduleschema.cue file@mvdan7614463

encoding8

  • encoding/gocode/gocodecremove cue.Runtime usages@NoamTD078020b
  • encoding/tomladd support for inline tables@mvdan27a0190
  • encoding/protobufcope with major version suffixes in module paths@rogpeppeb57a20a
  • encoding/openapilink to correct upstream doc@jpluscplusma861376
  • encoding/tomlcheck parser errors and reject duplicate keys@mvdaneacde77
  • encoding/gocoderemove unused test.cue file@mvdanabd5778
  • encoding/tomlvalidate the resulting value against toml.Unmarshal@mvdanadf84fd
  • encoding/tomlfirst decoder implementation@mvdana35caed

internal43

  • internal/registrytestsatisfy staticcheck and gopls@mvdan05453ff
  • internal/filetypesremove unused test.cue file@mvdanc3dc2f2
  • internal/cueexperimentflip modules experiment flag default@rogpeppe1ad8c52
  • internal/cmd/cue-ast-printdo not panic on invalid values@mvdanc789d3e
  • internal/cibump goreleaser and Go ahead of the next release@mvdan7248da6
  • internal/core/exportallow exporting snippets@mpvle775398
  • internal/pkgmake Len ignore optional fields@NoamTDafe322d
  • internalremove some deprecated type/method usages@NoamTD84fe1b9
  • internal/core/adtfix attribute processing@mpvl185426f
  • internal/core/exportfix dereferencing bug@mpvlefd38e6
  • internal/cuetxtarallow inline archives@mpvl645d586
  • internal/core/exportupdate error todos@mpvl22b8c74
  • internal/core/exportfix test@mpvl07d485c
  • internalreplace and remove PackageInfo@NoamTDa49ee92
  • internal/filetypesremove deprecated API usage@NoamTD9a0cae9
  • internal/ciupgrade GH actions JSON Schema@myitcva246bdd
  • internal/vcsonly consider actual sub-directory for status checks@rogpeppecf3cf2f
  • internal/core/adteliminate non-rooted indirections@mpvla651ed4
  • internal/core/depdereference non-rooted values@mpvl68efe82
  • internal/core/adtunwrap ConjunctGroup in EnvExpr@mpvla8ec4b7
  • internal/core/adtunwrap ConjunctGroups in ToExpr@mpvld281a75
  • internal/core/adtremove direct access to BaseValue@mpvl91223e3
  • internal/core/adtpropagate structural cycle up@mpvl9efad90
  • internal/core/adtfix let bug@mpvl576a3ed
  • internal/diffadd matrix test@mpvl4c60191
  • internal/core/exportfix dropping of optional field@mpvla080c35
  • internal/core/subsumepass tests for new evaluator@mpvlc023c4a
  • internal/core/adtmake invalid builtin call resolve to bottom@NoamTD76f656a
  • internal/core/debugappend to []byte rather than using io.Writer@mvdan0bf573f
  • internal/core/adtdon't allocate when asserting in Environment.up@mvdan9ecd7a0
  • internal/core/debugsimplify label code following a TODO@mvdanc445c7d
  • internal/core/debugallow io.WriteString to be efficient@mvdan51209a5
  • internal/core/adtavoid creating closures for adt.Config.Format@mvdane284eef
  • internal/core/adtfix some typos@NoamTDaf36efd
  • internal/core/validateuse matrix in test@mpvl4706840
  • internal/core/subsumeuse matrix for tests@mpvlb5321de
  • internal/core/exportuse matrix for TestValue@mpvlf418fc3
  • internal/core/exportuse matrix for SelfContained@mpvl3f52195
  • internal/core/exportassign a name to TestSelfContained@mpvl78e9e12
  • internal/core/exportuse matrix for TestExtract@mpvl9d3d545
  • internal/core/exportuse matrix for TestGenerated@mpvle5f8e0e
  • internal/core/depadd in tests for new evaluator@mpvlcb2410c
  • internal/cuetdtestintroduce test matrix@mpvl1e843cb

mod8

  • mod/modfileadd FixLegacy function@rogpeppe1dee146
  • mod/modfileaccept language versions after v0.8.0-alpha.0@rogpeppe443106f
  • mod/modfileadd custom data field@rogpeppea8693a0
  • mod/modfileparse module.cue in data-only mode@rogpeppe21a5c8b
  • mod/moduleadd qualifier in ImportPath when necessary@rogpeppe64baa18
  • mod/modregistrytreat all 404 errors as not-found@rogpeppebf75699
  • mod/modfiledo not reuse a global cue.Context in Parse and ParseLegacy@mvdan91eec1b
  • mod/modzipuse filepath.WalkDir@mvdan9518dae

pkg3

  • pkg/encodingadd test cases for {json,yaml}.Validate@NoamTD00a747c
  • pkg/structadd tests for MinLength and MaxLength@NoamTDa169ae2
  • pkgupdate tests to use matrix@mpvla983b19

tools4

  • tools/flowenable matrix tests@mpvl5f8930a
  • tools/flowdisable (part of) flaky test@mpvldff77a6
  • tools/flowuse matrix for tests@mpvlfc7d3f3
  • tools/trimprepare for using test matrix@mpvl926f060

Other4

  • cuegoremove deprecated cue.Instance usage@NoamTD1dcd350
  • doc/refthe subsumption relation for fields was backwards@mvdanb83ae37
  • cuecontextadd options to set version and debug flags@mpvlf0cd02b
  • update golang.org/x/... dependencies for v0.9.0@mvdanb3a7fea

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.9.0-alpha.5_darwin_amd64.tar.gz09f41d6a4e86cf04ae77dedb3dd937a89784238cb1ecd07ec4aee8808026a855
macOS, Apple siliconcue_v0.9.0-alpha.5_darwin_arm64.tar.gzed95babb4ed5a71f0557d9b587233a3368cc07317935ae0dc1ef21bc98962ef4
Linux, x86-64cue_v0.9.0-alpha.5_linux_amd64.tar.gzc77b36bc93c6866e7b1c0e55ab0450e2c4037fd63a5a1685d7e6d138c9921369
Linux, Arm64cue_v0.9.0-alpha.5_linux_arm64.tar.gz1b83ebca566cf3dc745e57f846403a0d55237641035b53be2e33addcc00e4877
Windows, x86-64cue_v0.9.0-alpha.5_windows_amd64.zipe14f814962645626bc8fce625ef18aa9bd42df6d68ad19f139782d29b56de3c3
Windows, Arm64cue_v0.9.0-alpha.5_windows_arm64.zip27e6c154634b5ce1ca588b34fc09659d72b6e4f645abb46cbf1f7879c40ee6ad

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

Install CUE