v0.10.0-alpha.1

cue-lang/cue Pre-release Released

A release of CUE OSS · its page on GitHub

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.

All changes

86 changes since v0.9.0by area

cmd17

  • cmd/cueadd test case for issue 3262@rogpeppe56d6987
  • cmd/cuefix link in embed help text@rogpeppe77ac696
  • cmd/cuehandle signals and perform a graceful shutdown for mod registry@haoqixu27adbac
  • cmd/cuetest tool/exec.Run with arguments involving spaces@mvdan5903ec8
  • cmd/cueadd a forwards compatibility test case for bugfix releases@mvdan2a96988
  • cmd/cuedo not allow embedding of CUE file types (for now)@myitcva0f2cac
  • cmd/cueadd test case for embedding of CUE file type files@myitcv868c110
  • cmd/cueprovide initial text for 'help embed'@myitcv5c8be53
  • cmd/cuedocument CUE_EXPERIMENT=embed@myitcve460eb0
  • cmd/cuemake mod resolve work with no args@rogpeppedbe24df
  • cmd/cueimplement --language-version flag for cue mod edit and init@rogpeppee9b2c29
  • cmd/cue,cue/loadadd tests for underscore packages@rogpeppe9295a20
  • cmd/cueremove unnecessary fields and do not use filepath.WalkDir@mvdandb5c6bf
  • cmd/cuecorrectly import comments after a field key@haoqixucc7cb90
  • cmd/cueforbid cue help help in favor of cue help@mvdan859f1f6
  • cmd/cueparse module.cue file in non-strict mode@rogpeppeb44f02f
  • cmd/cueadd test for mod edit strictness@rogpeppe3eafda7

cue32

  • cue/loadimplement shared syntax cache@rogpeppefc16ef8
  • cue/loadmove syntax cache into fileSystem@rogpeppeafa222f
  • cue/loaduse constructor for fileSystem@rogpeppef787af8
  • cue/loadCUE files only contain a single *ast.File@rogpeppe75d4005
  • cue/loadmove towards unified syntax cache@rogpeppe14deefa
  • cue/loadremove import comment parsing@rogpeppeb03789f
  • cue/loadclean up allTags@rogpeppe59fe2e4
  • cue/loadcache file names only@rogpeppe4a8f673
  • cue/interpreter/embeddon't allow hidden files in glob@mpvl8bedc2b
  • cue/interpreter/embedrespect module boundaries@rogpeppe6056916
  • cue/interpreter/embedrequire type if glob extension not specified@myitcv2c8ee2f
  • cue/interpreter/embedfix handling of dir matching glob@myitcv970d10f
  • cue/loadbetter treatment for build tags with respect to modules@rogpeppe79c1739
  • cueadd LanguageVersion@rogpeppea9009e8
  • cue/interpreter/embedadd support for embedding@mpvl6594f45
  • cue/ast,specdocument that package _ is equivalent to missing package@rogpeppec7f9334
  • cue/loaddo not consider anonymous packages when checking package qualifier@rogpeppe5ab2d73
  • cue/loadclarify the docs for Config.ModuleRoot@mvdana94d22f
  • cue/formatprevent vertical tabs from causing extra indentation@mvdan1f197eb
  • cue/formatavoid indenting a lone leading comment@mvdand70f9d7
  • cue/...remove remnants of /*block*/ comment support@mvdan0cf2060
  • cue/formatadd test cases for issue 2496@mvdan59e276a
  • cue/encoding/jsonschemafix staticcheck errors@NoamTDb095ecb
  • cue/loadfix loading when Config.Package does not match default package@rogpeppeac34157
  • cue/loadadd tests for issue 3213@rogpeppe4111b3e
  • cue/loadadd Config.AcceptLegacyModules@rogpeppe63d1318
  • cue/formatomit whitespace before the first clause@mvdan95035da
  • cue/formatadd a regression test for issue 1544@mvdan475f692
  • cue/formatrewrite TestFiles with testscript@mvdan08b1ce0
  • cue/formatpreserve comments associated with ellipsis@NoamTD9bd3e17
  • cue/formatadd tests for ellipsis comments in fmt -s@NoamTDda2a575
  • cue/formatensure a newline after every comment@mvdanb423a27

encoding3

  • encoding/protobuf/textprotocorrectly decode required/optional fields@haoqixudec1786
  • encoding/jsonfix position for jsonl@haoqixu16c15d1
  • encoding/tomlimplement support for table arrays@mvdan8a6194a

internal13

  • internal/buildattrstop at package clause and support parentheses@rogpeppe5cbddef
  • internal/buildattradd tests@rogpeppe1bb894b
  • internal/filetypesspeed up common case@rogpeppefed43b0
  • internal/cibump Go and goreleaser versions for the upcoming alpha@mvdan16c45d3
  • internal/buildattrfactor out from cue/load@rogpeppe7ca3925
  • internal/ciremove debug logging of commit message@myitcvf1f0963
  • internal/core/runtimenew attribute name for extern@mpvlb70e543
  • internal/filetypessplit ParseFile@mpvla1c1cd7
  • internal/cueversionbump LanguageVersion for v0.10@mvdan525e18b
  • internal/cialways check that git is clean when we finish@mvdanb44ef61
  • internal/core/adtfix pointer comparison issue in equalTerminal@mpvl1376fa8
  • internal/core/adtfix lifetime tracking of shared closeContext@mpvl2785aa4
  • internal/core/adtupdate TestX to include language version@mpvl8fdc65e

mod5

  • mod/moduleallow versionless module path in CheckPath@rogpeppe3a379b7
  • mod/modloadignore _test.cue files in dependencies@rogpeppe7793367
  • mod/modfileuse fixed language version for Fix@rogpeppe6f2bfb4
  • mod/modfiledeprecate LatestKnownSchemaVersion@rogpeppe71eb3be
  • mod/modfilealways allow missing major version in module field@rogpeppe1795a49

pkg4

  • pkg/tool/execdocument how Run.cmd works with string versus list@mvdan7e1f140
  • pkg/tool/execshow command arguments in errors as a Go slice@mvdan38269ec
  • pkg/listadd Reverse function@NoamTDf42327c
  • pkg/pathadd missing param declaration@NoamTDe09cb31

Other12

  • interpreter/wasm,internal/filetypesfix wasm awkwardness@rogpepped5d4815
  • bump go-internal to get the latest testscript fixes@mvdan695fefc
  • update Go dependencies for the upcoming alpha@mvdanf6be8a8
  • core/adtsimplify duplicate NumKind and NumberKind consts@cuematthew304530f
  • core/adtrename CompositKind to CompositeKind@cuematthew95802d3
  • READMElink to Slack and Discord via cuelang.org@jpluscplusmddfe8eb
  • tools/trimconvert inline tests to txtar@cuematthew8079151
  • doc/ref/implfix order of arguments in δ partial feature function@cuematthew4eecacd
  • disallow explicit underscore import path qualifiers@rogpeppe1c381a0
  • READMEsimplify a bit, add new website links, add Discord invite@mvdanfecf80d
  • remove navbar.md and its supporting logo@mvdan0d69846
  • update github.com/emicklei/proto@mvdan1d70939

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.10.0-alpha.1_darwin_amd64.tar.gzca50b6c9e6808ac906ebc5d9c397209e30f2815cf87d36d2d744dd8a29789f54
macOS, Apple siliconcue_v0.10.0-alpha.1_darwin_arm64.tar.gz3549677cf0629bce9c3464e7f9a236323cdc454985d016e28dbb02c692c5e1ed
Linux, x86-64cue_v0.10.0-alpha.1_linux_amd64.tar.gz5a89a4253cc23b54da8065752caa5a7f7e87b5967804abf3a688aad0ca38c219
Linux, Arm64cue_v0.10.0-alpha.1_linux_arm64.tar.gzf386fefce9fac9ca652bc8ece104c028a389560d2707d0f528faaa4d7d5d6f5a
Windows, x86-64cue_v0.10.0-alpha.1_windows_amd64.zipb60093bb075e765fd8becfade8307b19fd5d62e51651089f2f0f19cddfdb431a
Windows, Arm64cue_v0.10.0-alpha.1_windows_arm64.zip70e2ac89f872a1721523e9d42510be7894bde05e7bcb783634f2839fbc23aef7

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

Install CUE