v0.7.0
This release comprises a number of bug fixes and small improvements, as well as more ground work for Modules, WebAssembly, and the core evaluator's performance refactors.
Note that v0.7 was originally planned to center around the core evaluator's performance improvements. Since those refactors are not ready, and we have other fixes and improvements we want to release, we have slightly altered the release plan accordingly. We will share more details on our next community call.
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 terms of performance. Unity continues to catch multiple issues with each release. Adding your project to Unity not only guarantees that we will not break your tests (if we do, we will work with you to fix your CUE code), 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.
Thank you to @SteVwonder, @bozaro, @cedricgc, @howardjohn, @mpvl, @mvdan, @myitcv, @nickfiggins, @rogpeppe, @rudifa, and @uhthomas for contributing to this release!
And a special thanks to all who joined the recent contributor office hours calls on our community calendar, as well as our #contributing channel on Slack! Thanks to their involvement, more issues can be investigated and fixed each release.
Go API
Note that this version of CUE requires Go 1.20 or later, per our policy to support the latest two stable Go releases just like upstream.
CL 1172105 fixes a regression introduced in v0.6.0 where calling Iterator.Selector.Index
while iterating over a list would incorrectly panic.
CL 1167597 fixes cue/load
so it now errors on package import cycles, following the spec.
CL 1167647 adjusts cue.Value.Decode
to decode empty CUE lists into a Go interface{}
as a non-nil empty slice.
CL 547369 teaches cue.Value.Decode
how to decode values which aren't entirely concrete into a Go type by using cue.Value
as part of the destination type.
Language
There are no changes to the language in this version.
Spec
CL 1171216 fixes two errors in a dynamic fields example.
Core Evaluator
CL 1172014 disallows the direct use of unary operators with basic types, since they would result in confusing bounds which seemed incorrect.
CL 1172013 fixes a closedness bug where close
did not properly apply when used inside definitions.
CL 1172874 fixes a panic in cue export
introduced by v0.6.0.
Encoders
CL 1172314 teaches encoding/protobuf
to follow the field_behavior
annotation marking a field as either optional or required when decoding.
Builtins
CL 1172991 adds a mustSucceed
boolean parameter to tool/exec.Run
, which can be set to false
to allow a command to fail and set its own field success
to false
.
CL 557322 fixes the values of math
's Log2E
and Log10E
constants, which were being incorrectly truncated.
cmd/cue
CLs 1170966 and 1171302 fix a number of issues in cue fmt
(and by extension the cue/format
package), resulting in better and more consistent formatting of CUE files.
CLs 1171292, 1171015, 1170115, and 1171971 implement a variety of improvements and bug fixes for cue get go
.
CL 1172017 fixes a number of issues with the line and column positions reported by our YAML decoder, which could result in weird CUE formatting when using cue import
or misleading positions being shown to the user.
CL 1169709 increases the robustness of cue export -o
, which in some situations could ignore file errors or incorrectly replace an existing file without the -f
flag.
CL 1173072 fixes a panic when using cue import --list
with empty YAML input.
CL 1168436 updates the cue export
documentation to add the missing cue
and binary
supported export formats.
Modules
A number of changes are included to support an experimental implementation of the proposed modules and package management support. These aren't enabled by default, and will be announced soon.
Full list of changes since v0.6.0
- internal/ci: bump to Go 1.21.5 for the upcoming release by @mvdan in ce1ad81
- cmd/cue: fix panic when importing empty files as a list by @uhthomas in b36b477
- internal/core/adt: change semantics of unary_op(basictype) by @mpvl in e1ceed4
- internal/core/adt: fix closedness bug by @mpvl in 886eefd
- internal/core/adt: add test to prepare for fix by @mpvl in 145764d
- CONTRIBUTING: mention the Slack channel and office hours calls by @mvdan in 16a0cda
- pkg/tool/exec: add a Run.mustSucceed parameter by @nickfiggins in 10c4796
- cue: explicitly document values are not safe for concurrent use by @mvdan in d805c22
- internal/ci: bump Go and GoReleaser for v0.7.0-rc.1 by @mvdan in 8f88dcb
- internal/slices: move from internal/mod/mvs/internal/slices by @rogpeppe in 0e51dbb
- internal/mod/internal/par: move from internal/mod/mvs/internal/par by @rogpeppe in fe0e04a
- internal/registrytest: do not check that dependencies exist by @rogpeppe in 99bdbad
- internal/mod/modimports: new package by @rogpeppe in 79033c2
- internal/core/export: fix a recent nil pointer regression by @rudifa in 141925a
- internal/core/adt: use state directly by @mpvl in bba2263
- internal/core/adt: expand on permutations for test by @mpvl in 596fdc9
- internal/cuetxtar: include diff between test and fallback test by @mpvl in 6774d0d
- internal/txtarfs: factor out from registrytest by @rogpeppe in 265a7a0
- internal/cueimports: export API and fix for CUE syntax by @rogpeppe in 47d6dce
- internal/cueimports: copy code from cue/load by @rogpeppe in 9e55783
- cue/load: remove unused functionality by @rogpeppe in b727189
- all: replace html/template by text/template by @mvdan in 361ae4f
- encoding/protobuf: support field_behavior "required" option by @howardjohn in 80b0eee
- cmd/cue: fix incorrect position in yaml import by @uhthomas in d97b0c3
- all: adopt .gitignore for new delve binary naming by @mpvl in 68e9d5d
- internal/core/adt: make ListMarker Src an expression by @mpvl in f59894c
- internal/core/adt: changes needed for new evaluator by @mpvl in fb88beb
- cue: don't panic on Iterator.Selector.Index with lists by @mvdan in 9dd0f82
- cue: allow top level JSON marshalers in EncodeType by @rogpeppe in 8f796bf
- cue: support decoding into cue.Value fields by @rogpeppe in b25fc05
- internal/mod/mvs: discard copied par tests by @mvdan in 4e30101
- CONTRIBUTING: fix repo reference rendering by @cedricgc in 7a4ea86
- internal/e2e: make unique module names more robust by @mvdan in a404c89
- cmd/cue: support optional comments in get go by @uhthomas in 67ea9cf
- cmd/cue: ignore complex types in get go by @uhthomas in 112b0b2
- pkg/internal/builtintest: don't print superfluous newlines by @uhthomas in 8b32c49
- internal/tdtest: document how the name field is used by @rogpeppe in deab307
- internal/e2e: add a test for a private github repo by @mvdan in 4d2ba88
- internal/ci: add gcloud auth to the e2e tests by @mvdan in 95a88a5
- CONTRIBUTING: clarify two sections by @cedricgc in d947a69
- internal/e2e: add a "cue mod upload" end-to-end test with gcloud by @mvdan in a060f85
- internal/e2e: rename existing testscript and add a summary by @mvdan in 4dba8dd
- internal/e2e: tweak how we use secret env vars by @mvdan in d3efde7
- internal/mod/modfile: add copyright message by @rogpeppe in f9c8d98
- cmd/cue: cue mod upload command by @rogpeppe in ca20656
- internal/ci: enforce vet and mod tidy on all modules by @mvdan in 2ae1a9e
- internal/e2e: run go mod tidy by @mvdan in 8b95971
- cue/load: do not format registry as a string by @rogpeppe in 4fd631d
- internal/mod/modzip: rename from internal/mod/zip by @rogpeppe in 5365838
- cmd/cue: wire up OCI authorization by @rogpeppe in b2ac3f7
- internal/registrytest: remove _registry remnants by @rogpeppe in 273602f
- internal/ci: only run e2e tests in source repo by @myitcv in b15fcb0
- internal/ci: test internal/e2e on protected branches by @mvdan in d72997f
- cmd/format: be consistent with whitespace in lists by @uhthomas in d70007c
- internal/e2e: first version of the end-to-end module tests by @mvdan in 8c826bc
- cmd/cue: support type parameters in get go by @uhthomas in 3b4e03d
- cue: add more godoc links by @mvdan in 286dfcb
- cmd/cue: support unsafe pointer in get go by @uhthomas in 05ceba6
- spec: fix two errors in the dynamic fields example by @SteVwonder in 200a8ec
- README: add a direct mention of the community calendar by @mvdan in 8a98ac0
- cmd/cue/cmd: wire up modmux by @rogpeppe in ac1b433
- internal/mod/modmux: new package by @rogpeppe in 8e24597
- cue/format: indent list elements correctly by @uhthomas in eddccfc
- internal/registrytest: do not assume subdirectory by @rogpeppe in f892345
- internal/mod/modregistry: remove error return from New by @rogpeppe in 1e26aa2
- internal/mod/modresolve: new package by @rogpeppe in 2a7d1d6
- internal/mod/module: add CheckPathWithoutVersion by @rogpeppe in c6da768
- cue: make use of some godoc links by @mvdan in 63307bd
- internal/registrytest: support prefix by @rogpeppe in 6c71b2c
- cmd/cue/cmd: support CUE_REGISTRY by @rogpeppe in d5c0745
- update ociregistry dependency by @rogpeppe in a43792c
- internal/mod: kick off WIP doc to track FAQs, points to document by @myitcv in b664f0c
- pkg/path: use a subtest helper to test for each OS value by @mvdan in 1227a83
- internal/core/adt: avoid chatty tests by @mvdan in 55c6db6
- internal/mod/zip: skip SizeLimit tests with -race by @mvdan in 91d9766
- internal/mod/zip: silence "err value not used" warnings by @mvdan in 665d19a
- internal/mod/zip: use testing.T.TempDir by @mvdan in fd8d5f9
- internal/mod/zip: make all tests parallel by @mvdan in b004dd6
- internal/mod/zip: remove duplicate test case by @mvdan in 6c51cf0
- cue/load: make Config.Registry an ociregistry.Interface by @mvdan in fefeb36
- internal/registrytest: rewrite in terms of io/fs by @mvdan in 5f19042
- internal/registrytest: move from cue/load/internal by @mvdan in 633874c
- internal/semver: copy from golang.org/x/mod by @rogpeppe in a9a6965
- internal/cueexperiment: parse CUE_EXPERIMENT by @rogpeppe in b4583de
- cue/load: update for OCI modules by @rogpeppe in b951b07
- internal/mod/modregistry: new package by @rogpeppe in 3c368d3
- update testscript so that it propagates GORACE by @mvdan in e3d42af
- cmd/cue: do not ignore Encoder.Close errors on export by @mvdan in f3a515e
- cmd/cue: add more test case for exporting to a filename by @mvdan in 388f9a1
- internal/ci: set GORACE=atexit_sleep_ms=10 for
go test -race
by @mvdan in cbdd996 - internal/core/export: fix a few staticcheck warnings by @mvdan in 6923617
- cmd/cue/cmd: remove a few unused parameters by @mvdan in 2f6b27b
- go.mod: update a few dependencies by @mvdan in c08344a
- cue: simplify the reflect checks in Value.Decode by @mvdan in 8709d8a
- cue/ast/astutil: use generics to remove some reflect by @mvdan in b8cb9a4
- cue/load: use tdtest for TestLoad by @rogpeppe in 7389fe9
- internal/tdtest: clean filenames before comparison by @rogpeppe in 28f34a2
- internal/cuetxtar: report full result for cuetxtar test failures by @rogpeppe in bfa250d
- internal/mod/modfile: new package by @rogpeppe in 551fe68
- internal/mod/module: improve error message by @rogpeppe in 0e95843
- internal/mod/zip: adapt to CUE semantics by @rogpeppe in 3142030
- internal/mod/mvs: adapt to CUE semantics by @rogpeppe in 4eca0c7
- internal/mod/mvs/internal/...: remove ignore build tags by @rogpeppe in a102419
- internal/mod/module: adapt to CUE semantics by @rogpeppe in 38cf584
- internal/mod/mvs: copy from cue/load/internal/mvs by @rogpeppe in 204665c
- internal/mod/module: split module.go by @rogpeppe in c6e91b1
- internal/mod: copy files from golang.org/x/mod by @rogpeppe in 6f5b370
- cmd/cue: update the list of output formats by @mvdan in 42ae8e4
- cue: minor drive-by cleanups by @mvdan in a44c805
- all: fix two minor printf bugs spotted by staticcheck by @mvdan in 7b49758
- all: fix issues spotted by nilness by @mvdan in 382449b
- pkg/math: reuse Ln2 and Ln10 in Log2E and Log10E by @mvdan in fe2f216
- pkg: teach gen.go about go/types by @mvdan in 2091170
- pkg: swap go/build for go/packages in gen.go by @mvdan in e9a412d
- bump golang.org/x dependencies by @mvdan in bf3ac20
- all: clean up some TODOs for old Go versions by @mvdan in 106fc3a
- cue: make use of Go 1.20+ APIs by @mvdan in fae9c82
- internal/core/adt: change slice type of notify by @mpvl in 3165a5e
- internal/core/adt: rename node to vertex by @mpvl in 0b96e3b
- internal/cuetxtar: allow using a fallback golden set by @mpvl in 826f28c
- internal/core/adt: hoist the test body of TestEval by @mpvl in ca254d6
- internal/core/adt: add new closedness implementation by @mpvl in 5062118
- internal/tdtest: make function detection more robust by @mpvl in 49728f7
- internal/tdtest: mimic replacement of testing.Run in Select by @mpvl in 1763cea
- cue/load: add package import cycle error by @bozaro in 220b44e
- cue: decode empty list as empty slice instead of slice-typed nil by @bozaro in 66ebe0f
- internal/core/adt: fix nil pointer dereference by @bozaro in 3286ead
- pkg/math: fix Log2E and Log10E constant expressions by @mvdan in a1038f7
- pkg/math: add tests which show the API constants by @mvdan in 63a4256
- all: add Go 1.21, drop Go 1.19 by @mvdan in 3a101ba
- all: minor wins with strings.Cut and utf8.AppendRune by @mvdan in 72ba066
- cmd/cue: fix up fmt_multi comparison by @mvdan in d4d109e
- encoding/gocode: don't require output to be stable by @mvdan in 3bf3dbd