Skip to content

v0.10.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@cueckoo cueckoo released this 12 Jul 10:11
· 481 commits to master since this release

This release includes initial support for the embed proposal, multiple fixes for the new modules support, as well as many other fixes and enhancements.

Evaluator

CLs 1195897 and 1196094 fix two crashes with CUE_EXPERIMENT=evalv3 as reported by users.

Embed proposal

With CUE_EXPERIMENT=embed, CUE now supports the embedding of non-CUE files within a CUE package. See the embed proposal and its design document for details, as well as the new how-to guide for the feature.

Modules

CL 1197530 fixes the behavior of build tags, and also adds support for parentheses in build tag expressions.

CL 1197531 implements better caching when evaluating dependencies, which should speed up evaluation of modules that use multi-directory packages.

Go API

CL 1196721 disallows importing or loading packages with an underscore qualifier like foo.com/bar:_, as it was never intended behavior. Users should use the new embed proposal instead.

CL 1196820 adds a cue.LanguageVersion function to obtain the current version of the language spec that the Go module implements.

CL 1197160 implements considered support for build tags in modules. Build tags are considered false when outside the main module.

Encodings

CL 1195628 ensures that cue/format prints a newline after every comment.

CL 1195884 teaches cue/format to preserve comments associated with ... ellipsis expressions.

CL 538624 fixes a bug where cue/format would start a CUE file with white space if it began with a clause.

CL 1196134 fixes a bug where a comment at the start of a CUE file would sometimes be indented.

CL 1196135 fixes a bug where index or selector expressions could cause extra tab indentation.

CL 1196291 tweaks the YAML decoder so that comments following a field are attached to the entire field.

CL 1196332 tweaks the JSONL (newline-delimited JSON) so that line numbers aren't reset with each new JSON value.

CL 1196436 tweaks the textproto decoder to correctly handle required and optional fields.

Builtins

CL 1196212 adds a list.Reverse function to reverse the elements of a list.

CL 1197452 tweaks tool/exec.Run so that its errors are unambiguous when any command arguments contain white space.

cmd/cue

CL 1196822 adds a --language-version flag for cue mod init and cue mod edit to set the language.version value.

CL 1197185 teaches cue mod resolve to work on the current module when no arguments are given.

CL 1196370 teaches cue mod registry to gracefully shut down when interrupted.

Full list of changes since v0.9.0
  • mod/module: allow versionless module path in CheckPath by @rogpeppe in 3a379b7
  • cmd/cue: add test case for issue 3262 by @rogpeppe in 56d6987
  • mod/modload: ignore _test.cue files in dependencies by @rogpeppe in 7793367
  • cmd/cue: fix link in embed help text by @rogpeppe in 77ac696
  • mod/modfile: use fixed language version for Fix by @rogpeppe in 6f2bfb4
  • cue/load: implement shared syntax cache by @rogpeppe in fc16ef8
  • cue/load: move syntax cache into fileSystem by @rogpeppe in afa222f
  • cue/load: use constructor for fileSystem by @rogpeppe in f787af8
  • internal/buildattr: stop at package clause and support parentheses by @rogpeppe in 5cbddef
  • internal/buildattr: add tests by @rogpeppe in 1bb894b
  • cue/load: CUE files only contain a single *ast.File by @rogpeppe in 75d4005
  • cue/load: move towards unified syntax cache by @rogpeppe in 14deefa
  • cue/load: remove import comment parsing by @rogpeppe in b03789f
  • cue/load: clean up allTags by @rogpeppe in 59fe2e4
  • interpreter/wasm,internal/filetypes: fix wasm awkwardness by @rogpeppe in d5d4815
  • cue/load: cache file names only by @rogpeppe in 4a8f673
  • internal/filetypes: speed up common case by @rogpeppe in fed43b0
  • cmd/cue: handle signals and perform a graceful shutdown for mod registry by @haoqixu in 27adbac
  • bump go-internal to get the latest testscript fixes by @mvdan in 695fefc
  • cue/interpreter/embed: don't allow hidden files in glob by @mpvl in 8bedc2b
  • pkg/tool/exec: document how Run.cmd works with string versus list by @mvdan in 7e1f140
  • update Go dependencies for the upcoming alpha by @mvdan in f6be8a8
  • internal/ci: bump Go and goreleaser versions for the upcoming alpha by @mvdan in 16c45d3
  • core/adt: simplify duplicate NumKind and NumberKind consts by @cuematthew in 304530f
  • pkg/tool/exec: show command arguments in errors as a Go slice by @mvdan in 38269ec
  • cmd/cue: test tool/exec.Run with arguments involving spaces by @mvdan in 5903ec8
  • core/adt: rename CompositKind to CompositeKind by @cuematthew in 95802d3
  • cmd/cue: add a forwards compatibility test case for bugfix releases by @mvdan in 2a96988
  • cue/interpreter/embed: respect module boundaries by @rogpeppe in 6056916
  • README: link to Slack and Discord via cuelang.org by @jpluscplusm in ddfe8eb
  • cue/interpreter/embed: require type if glob extension not specified by @myitcv in 2c8ee2f
  • cue/interpreter/embed: fix handling of dir matching glob by @myitcv in 970d10f
  • cmd/cue: do not allow embedding of CUE file types (for now) by @myitcv in a0f2cac
  • cmd/cue: add test case for embedding of CUE file type files by @myitcv in 868c110
  • cmd/cue: provide initial text for 'help embed' by @myitcv in 5c8be53
  • cmd/cue: document CUE_EXPERIMENT=embed by @myitcv in e460eb0
  • tools/trim: convert inline tests to txtar by @cuematthew in 8079151
  • doc/ref/impl: fix order of arguments in δ partial feature function by @cuematthew in 4eecacd
  • cmd/cue: make mod resolve work with no args by @rogpeppe in dbe24df
  • cue/load: better treatment for build tags with respect to modules by @rogpeppe in 79c1739
  • internal/buildattr: factor out from cue/load by @rogpeppe in 7ca3925
  • internal/ci: remove debug logging of commit message by @myitcv in f1f0963
  • cmd/cue: implement --language-version flag for cue mod edit and init by @rogpeppe in e9b2c29
  • mod/modfile: deprecate LatestKnownSchemaVersion by @rogpeppe in 71eb3be
  • cue: add LanguageVersion by @rogpeppe in a9009e8
  • cue/interpreter/embed: add support for embedding by @mpvl in 6594f45
  • cue/ast,spec: document that package _ is equivalent to missing package by @rogpeppe in c7f9334
  • disallow explicit underscore import path qualifiers by @rogpeppe in 1c381a0
  • cue/load: do not consider anonymous packages when checking package qualifier by @rogpeppe in 5ab2d73
  • cmd/cue,cue/load: add tests for underscore packages by @rogpeppe in 9295a20
  • internal/core/runtime: new attribute name for extern by @mpvl in b70e543
  • internal/filetypes: split ParseFile by @mpvl in a1c1cd7
  • pkg/list: add Reverse function by @NoamTD in f42327c
  • cue/load: clarify the docs for Config.ModuleRoot by @mvdan in a94d22f
  • README: simplify a bit, add new website links, add Discord invite by @mvdan in fecf80d
  • encoding/protobuf/textproto: correctly decode required/optional fields by @haoqixu in dec1786
  • encoding/json: fix position for jsonl by @haoqixu in 16c15d1
  • remove navbar.md and its supporting logo by @mvdan in 0d69846
  • cmd/cue: remove unnecessary fields and do not use filepath.WalkDir by @mvdan in db5c6bf
  • cue/format: prevent vertical tabs from causing extra indentation by @mvdan in 1f197eb
  • cue/format: avoid indenting a lone leading comment by @mvdan in d70f9d7
  • cue/...: remove remnants of /block/ comment support by @mvdan in 0cf2060
  • update github.com/emicklei/proto by @mvdan in 1d70939
  • cue/format: add test cases for issue 2496 by @mvdan in 59e276a
  • internal/cueversion: bump LanguageVersion for v0.10 by @mvdan in 525e18b
  • cmd/cue: correctly import comments after a field key by @haoqixu in cc7cb90
  • cmd/cue: forbid cue help help in favor of cue help by @mvdan in 859f1f6
  • cue/encoding/jsonschema: fix staticcheck errors by @NoamTD in b095ecb
  • cmd/cue: parse module.cue file in non-strict mode by @rogpeppe in b44f02f
  • cmd/cue: add test for mod edit strictness by @rogpeppe in 3eafda7
  • cue/load: fix loading when Config.Package does not match default package by @rogpeppe in ac34157
  • cue/load: add tests for issue 3213 by @rogpeppe in 4111b3e
  • cue/load: add Config.AcceptLegacyModules by @rogpeppe in 63d1318
  • mod/modfile: always allow missing major version in module field by @rogpeppe in 1795a49
  • internal/ci: always check that git is clean when we finish by @mvdan in b44ef61
  • cue/format: omit whitespace before the first clause by @mvdan in 95035da
  • encoding/toml: implement support for table arrays by @mvdan in 8a6194a
  • cue/format: add a regression test for issue 1544 by @mvdan in 475f692
  • cue/format: rewrite TestFiles with testscript by @mvdan in 08b1ce0
  • internal/core/adt: fix pointer comparison issue in equalTerminal by @mpvl in 1376fa8
  • internal/core/adt: fix lifetime tracking of shared closeContext by @mpvl in 2785aa4
  • internal/core/adt: update TestX to include language version by @mpvl in 8fdc65e
  • cue/format: preserve comments associated with ellipsis by @NoamTD in 9bd3e17
  • cue/format: add tests for ellipsis comments in fmt -s by @NoamTD in da2a575
  • cue/format: ensure a newline after every comment by @mvdan in b423a27
  • pkg/path: add missing param declaration by @NoamTD in e09cb31