Skip to content

v0.9.0-alpha.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@cueckoo cueckoo released this 17 May 09:29
· 753 commits to master since this release

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.

Full list of changes since v0.9.0-alpha.4
  • internal/registrytest: satisfy staticcheck and gopls by @mvdan in 05453ff
  • cmd/cue: add a regression test for issue 2704 by @mvdan in 46feda5
  • internal/filetypes: remove unused test.cue file by @mvdan in c3dc2f2
  • cmd/cue: ensure that fmt works outside a module with files too by @mvdan in 11cbcd3
  • encoding/gocode/gocodec: remove cue.Runtime usages by @NoamTD in 078020b
  • encoding/toml: add support for inline tables by @mvdan in 27a0190
  • cue: add another test for a disjunction bug fixed in evalv3 by @mvdan in 3588e1a
  • all: various very small cleanups from gopls and staticcheck by @mvdan in 96f16f0
  • cue/load: treat all absDirFromImportPath errors as PackageErrors by @rogpeppe in fa64c62
  • internal/cueexperiment: flip modules experiment flag default by @rogpeppe in 1ad8c52
  • cue/load: set the absolute file name when setting source by @rogpeppe in 4a27795
  • encoding/protobuf: cope with major version suffixes in module paths by @rogpeppe in b57a20a
  • cue/load: do not scan imports of non-CUE files by @rogpeppe in ac35a40
  • cue/load: add major version suffix to module path in testdata by @rogpeppe in f513a17
  • cue/load: more correct treatment of module paths with major versions by @rogpeppe in 0b70e5b
  • cmd/cue: add mod fix command by @rogpeppe in 4575558
  • mod/modfile: add FixLegacy function by @rogpeppe in 1dee146
  • cue/load: better treatment of files specified on the command line by @rogpeppe in 1591fd8
  • cue/load: factor out syntax cache by @rogpeppe in ef3c0c5
  • cue/load: remove directory argument from addFiles by @rogpeppe in 6804717
  • cue/load: avoid "user:" and "instance:" error prefixes by @rogpeppe in 612837a
  • cue/load: prepare for files package refactor by @rogpeppe in e888508
  • mod/modfile: accept language versions after v0.8.0-alpha.0 by @rogpeppe in 443106f
  • mod/modfile: add custom data field by @rogpeppe in a8693a0
  • mod/modfile: parse module.cue in data-only mode by @rogpeppe in 21a5c8b
  • encoding/openapi: link to correct upstream doc by @jpluscplusm in a861376
  • encoding/toml: check parser errors and reject duplicate keys by @mvdan in eacde77
  • encoding/gocode: remove unused test.cue file by @mvdan in abd5778
  • encoding/toml: validate the resulting value against toml.Unmarshal by @mvdan in adf84fd
  • cue/scanner: remove go-fuzz testing code and data by @mvdan in 5472c4b
  • internal/cmd/cue-ast-print: do not panic on invalid values by @mvdan in c789d3e
  • cue/literal: use Label for labels consistently by @mvdan in 97695d0
  • cmd/cue: move Dockerfile to the main package directory by @mvdan in e801994
  • cue/parser: switch from go-fuzz to native fuzzing by @mvdan in 43da0b0
  • internal/ci: bump goreleaser and Go ahead of the next release by @mvdan in 7248da6
  • internal/core/export: allow exporting snippets by @mpvl in e775398
  • internal/pkg: make Len ignore optional fields by @NoamTD in afe322d
  • all: remove last usages of ast.Node.{Comments,AddComment} by @NoamTD in 4ae7530
  • cue: add regression test for a disjunction fix in evalv3 by @mvdan in b3006ad
  • internal: remove some deprecated type/method usages by @NoamTD in 84fe1b9
  • cuego: remove deprecated cue.Instance usage by @NoamTD in 1dcd350
  • all: add language.version to module.cue files by @rogpeppe in 690add3
  • cmd/cue: repurpose exitOnErr into printError by @mvdan in e9bf33c
  • mod/module: add qualifier in ImportPath when necessary by @rogpeppe in 64baa18
  • internal/core/adt: fix attribute processing by @mpvl in 185426f
  • internal/core/export: fix dereferencing bug by @mpvl in efd38e6
  • internal/cuetxtar: allow inline archives by @mpvl in 645d586
  • internal/core/export: update error todos by @mpvl in 22b8c74
  • cmd/cue: add cue fmt --files mode by @NoamTD in 336a991
  • internal/core/export: fix test by @mpvl in 07d485c
  • tools/flow: enable matrix tests by @mpvl in 5f8930a
  • internal: replace and remove PackageInfo by @NoamTD in a49ee92
  • internal/filetypes: remove deprecated API usage by @NoamTD in 9a0cae9
  • cue/ast/astutil: remove deprecated API usage by @NoamTD in 64bbf1b
  • doc/ref: the subsumption relation for fields was backwards by @mvdan in b83ae37
  • cmd/cue: replace most fatal exitOnErr calls with error returns by @mvdan in 6c5f6e7
  • internal/ci: upgrade GH actions JSON Schema by @myitcv in a246bdd
  • pkg/encoding: add test cases for {json,yaml}.Validate by @NoamTD in 00a747c
  • mod/modregistry: treat all 404 errors as not-found by @rogpeppe in bf75699
  • pkg/struct: add tests for MinLength and MaxLength by @NoamTD in a169ae2
  • encoding/toml: first decoder implementation by @mvdan in a35caed
  • cmd/cue: an empty string is neither a valid package nor file by @mvdan in a7bdc24
  • internal/vcs: only consider actual sub-directory for status checks by @rogpeppe in cf3cf2f
  • cmd/cue: no need to buffer an error to print to stderr by @mvdan in d5802f6
  • cmd/cue: remove TestHelp in favor of testscript by @mvdan in 3977e0c
  • cue/errors: use fmt.Fprintf in writeErr directly by @mvdan in 22d5530
  • cmd/cue: improve cue vet examples' argument order by @jpluscplusm in fbe004d
  • cue/load: empty or absolute paths are not std import paths by @mvdan in fdebcd9
  • mod/modfile: do not reuse a global cue.Context in Parse and ParseLegacy by @mvdan in 91eec1b
  • cmd/cue: expand cmd_filetypes.txtar with more edge cases by @mvdan in 72319e4
  • cmd/cue: refer to 'workflow commands' instead of 'commands' by @myitcv in 65ed76d
  • internal/core/adt: eliminate non-rooted indirections by @mpvl in a651ed4
  • internal/core/dep: dereference non-rooted values by @mpvl in 68efe82
  • mod/modzip: use filepath.WalkDir by @mvdan in 9518dae
  • internal/core/adt: unwrap ConjunctGroup in EnvExpr by @mpvl in a8ec4b7
  • internal/core/adt: unwrap ConjunctGroups in ToExpr by @mpvl in d281a75
  • all: tidy up a number of leftover Go mentions by @mvdan in 495feee
  • cue: fix godoc links by @mvdan in 4ed59e7
  • cue/load: don't load from $PWD in the integration tests by @mvdan in bd9e49f
  • internal/core/adt: remove direct access to BaseValue by @mpvl in 91223e3
  • internal/core/adt: propagate structural cycle up by @mpvl in 9efad90
  • internal/core/adt: fix let bug by @mpvl in 576a3ed
  • internal/diff: add matrix test by @mpvl in 4c60191
  • internal/core/export: fix dropping of optional field by @mpvl in a080c35
  • internal/core/subsume: pass tests for new evaluator by @mpvl in c023c4a
  • internal/core/adt: make invalid builtin call resolve to bottom by @NoamTD in 76f656a
  • cue: remove matrix_test.go by @mpvl in cd43871
  • cuecontext: add options to set version and debug flags by @mpvl in f0cd02b
  • cue/load: restore the error result on an empty string argument by @mvdan in 5e9aa4e
  • cue/load: simplify logic around build.LoadFunc by @mvdan in 3ebadf1
  • cue/load: remove the now-unused moduleschema.cue file by @mvdan in 7614463
  • update golang.org/x/... dependencies for v0.9.0 by @mvdan in b3a7fea
  • internal/core/debug: append to []byte rather than using io.Writer by @mvdan in 0bf573f
  • internal/core/adt: don't allocate when asserting in Environment.up by @mvdan in 9ecd7a0
  • internal/core/debug: simplify label code following a TODO by @mvdan in c445c7d
  • internal/core/debug: allow io.WriteString to be efficient by @mvdan in 51209a5
  • internal/core/adt: avoid creating closures for adt.Config.Format by @mvdan in e284eef
  • internal/core/adt: fix some typos by @NoamTD in af36efd
  • cmd/cue: fail when requesting a missing help topic by @mvdan in 1be0b0f
  • tools/flow: disable (part of) flaky test by @mpvl in dff77a6
  • tools/flow: use matrix for tests by @mpvl in fc7d3f3
  • tools/trim: prepare for using test matrix by @mpvl in 926f060
  • pkg: update tests to use matrix by @mpvl in a983b19
  • internal/core/validate: use matrix in test by @mpvl in 4706840
  • internal/core/subsume: use matrix for tests by @mpvl in b5321de
  • internal/core/export: use matrix for TestValue by @mpvl in f418fc3
  • internal/core/export: use matrix for SelfContained by @mpvl in 3f52195
  • internal/core/export: assign a name to TestSelfContained by @mpvl in 78e9e12
  • internal/core/export: use matrix for TestExtract by @mpvl in 9d3d545
  • internal/core/export: use matrix for TestGenerated by @mpvl in e5f8e0e
  • internal/core/dep: add in tests for new evaluator by @mpvl in cb2410c
  • internal/cuetdtest: introduce test matrix by @mpvl in 1e843cb
  • cmd/cue: use cue/parser and cue/format directly in fmt by @mvdan in 6d50092
  • cmd/cue: add tests that cover fmt on various filetypes by @mvdan in 7e0fbec
  • all: apply cue fmt as of v0.9.0-alpha.4 by @mvdan in b2dd75a