v0.16.0

cue-lang/cue Released

A release of CUE OSS · its page on GitHub

Changes which may break some users are marked below with: ⚠️

Language

As a reminder, we have two ongoing language experiments since v0.15; a replacement for struct embedding and a rework of aliases. Please give these a try and report any issues or feedback!

⚠️ The cmdreferencepkg global experiment is now stable, meaning that CUE_EXPERIMENT=cmdreferencepkg is always enabled.

#"""# is now accepted as a string literal quoting a double quote, ".

Multiline string literals now require a trailing newline, matching the language spec.

The new try experiment

This release introduces the try experiment, which adds a try clause in comprehensions as well as the use of ? in field selectors. This addition to the language is intended to provide a more concise syntax for handling optional fields without the risk of unintentionally swallowing errors.

This experiment also introduces the else clause for if and try comprehensions, and the fallback clause for for comprehensions, which trigger when a comprehension produces zero values.

You can try this experiment by following our how-to guides on the try clause and the else clause. For more information, see the proposal on GitHub and the spec change patch.

Evaluator

Performance

Further improve the use of caching in the typochecker algorithm; this provides speed-ups of up to 80% on some large projects.

Very large structs (tested with 20,000 fields) are up to 80% faster now, as we were repeating some work unnecessarily.

A great deal of effort has gone into reducing the allocations and memory usage across a number of projects. For some of these, memory usage is down by as much as 60%.

These improvements were possible thanks to our Unity service, letting us analyze CUE’s performance and test for regressions on third party projects. Contact @mvdan on Discord, Slack, or via the Unity page to ensure that your project is included or you are running into slowness.

A number of changes were made to improve support for using cue.Values concurrently; see Issue #2733 for more details and ongoing progress.

Other changes

Fix a regression introduced in v0.13 where the or built-in with literal arguments could stop behaving like a disjunction.

A number of panics and other bugs in the evaluator which were reported since v0.15.0 have been fixed; thank you to all who reported these.

cmd/cue

Add support for $DOCKER_AUTH_CONFIG to directly provide the contents of $DOCKER_CONFIG/config.json to authenticate with module registries, matching Docker’s current behavior.

The --outfile flag now works when given non-regular files such as named pipes or sockets.

⚠️ cue mod publish no longer ignores sub-directories containing a go.mod file.

⚠️ Using cue inside the cue.mod directory now fails consistently with a clear error message to not place CUE code there. Previously, some commands worked while others failed with confusing errors.

⚠️ The global --verbose and --trace flags have been moved to the cue get go and cue trim commands respectively, as they were the only ones actually using those flags, and this could be confusing to users.

Fix a bug where loading ./...:pkgname could lead to loading directories without CUE files as instances, which could cause poor performance for CUE packages with multiple parent directories.

cue exp writefs gains an encoding optional field for regular files, to specify an encoding rather than infer it from the filename extension.

LSP server

Initial LSP support for editing embedded JSON and YAML files. This feature provides completions and hover-docs when editing JSON or YAML files which are embedded into CUE via the @embed attribute. A teaser video is available on YouTube.

Code Actions: two code actions are now provided, Add surrounding struct braces and Remove surrounding struct braces, which convert between

a: b: c

and

a: {
	b: c
}

with the cursor on b.

A complete overhaul of how the LSP server suggests code completions. This solves the previous naïve implementation which would only make suggestions after a field name or path had been started. Now completions are available from within whitespace.

Embedded paths with mutual dependencies: embedded paths with multiple components (e.g. a.b.c) can in some cases only be fully resolved after the resolution of other embedded paths. The LSP server can now correctly handle these dependencies.

The LSP server now implements LSP Document Symbols functionality. This is often used by editors to provide light-weight breadcrumb navigation within a file.

Some preliminary diagnostics are now sent from the LSP server back to the editor. Initially this mainly indicates syntax errors in CUE files, but this can be extended in the future.

Many bug fixes, including better behaviour for files and directories with spaces; improvements for value aliases (foo: L=x); LSP rename now provides placeholder text; improved jump-to-definition behaviour for package-level fields; fixed issues around imports; path resolution; formatting of standalone CUE files; and others.

See our Getting Started wiki page for instructions on how to set it up with your editor.

Please report any bugs or missing features you encounter via the Issue tracker or via the #lsp channels on Discord or Slack.

Encodings

Add support for encoding YAML tags like key: !Custom value by using CUE attributes like key: "value" @yaml(,tag="!Custom").

cue get go now detects which Go packages use Kubernetes type semantics via // +k8s:openapi-gen=true and obeys the field annotations // +optional and // +nullable.

cue get go gains a --codec flag to configure the use and priority of Go struct field tags like json or yaml.

Fix a bug where cue get go could skip over fields whose type implements one of the supported marshaling interfaces.

Fix a few bugs where cue get go could result in invalid or failing CUE code.

JSON Schema’s Config.OpenOnlyWhenExplicit option is now exposed for the CLI via the filetype tag jsonschema+openOnlyWhenExplicit.

JSON Schema now properly encodes hash references for better compatibility with other tools.

Standard library

The strconv package adds ParseNumber, like ParseInt or ParseFloat but allowing other CUE number strings such as 1Ki.

The net package adds InCIDR to test whether an IP is contained by a CIDR string.

The net package adds ParseCIDR to extract useful information from a CIDR string.

The net package adds CompareIP to compare two IP addresses, which can be useful for computing with IP ranges.

The net/http package adds Serve as an experimental API to listen on a port and serve HTTP requests.

The tool/file package adds Symlink to create symbolic links.

Go API

cue.Value.Decode now supports the new cue.Unmarshaler interface, allowing Go types to implement their own CUE value decoding logic via an UnmarshalCUE(cue.Value) error method.

The new cue.IsIncomplete function reports whether the given value is a CUE incomplete error.

cue/ast gains the NewPredeclared and Ident.IsPredeclared to mark and detect identifiers referencing predeclared names like error or int rather than fields which may shadow those names in the current scope.

⚠️ cue.Value.Decode now uses cue.IsIncomplete to not treat incomplete errors as fatal, allowing the decoding to continue.

Fix a bug where cue.Value.Decode could behave incorrectly when decoding a CUE null or incomplete value.

⚠️ cue/token.Compare now sorts absolute paths before relative ones, to ensure consistent behavior between Unix-like systems and Windows.

⚠️ The long-deprecated cue/ast.Node.Comments and cue/ast.Node.AddComment interface methods are now removed; use cue/ast.Comments and cue/ast.AddComment respectively.

⚠️ The long-deprecated and unused cue/parser.FromVersion and cue/parser.DeprecationError APIs are now removed.

⚠️ The long-deprecated and hidden cue.Instance.Eval method is now removed.

All changes

385 changes since v0.15.0by area

.claude3

  • .claudeallow more commands@mvdan60b5bd9
  • .claudeexpand the list of allowed commands@mvdan856d441
  • .claudeallow git grep@mvdan842db84

all14

  • allstart using "else" in comprehensions@mvdan3f2f654
  • alluse reflect.TypeAssert in three more places@mvdan58cbd0c
  • allre-apply go fix -any=false ./... after Go version bump@mvdan8579c46
  • allapply the straightforward Go 1.25 or later cleanups@mvdane834a18
  • alltest and release on Go 1.26, require Go 1.25 or later@mvdan0dc0eac
  • allgo fix -any=false ./...@mvdan3d3f74b
  • allstart using slices.DeleteFunc@mvdan77b401f
  • allfix up uses of the deprecated cue.Value.Elem method@mvdanc8653bf
  • allfix up uses of the deprecated cue/ast comment methods@mvdanba4ebbb
  • allreplace cue.Value.Null with IsNull when we just need a bool@mvdan9461bd2
  • alluse cue/token.Pos.IsValid rather than comparing with NoPos@mvdan550abc9
  • allmake use of adt.Pos consistently@mvdan132e8b9
  • allgo fix -stringsbuilder ./...@mvdan8652b30
  • allgo fix -forvar ./...@mvdan03b6d6e

cmd58

  • cmd/cueadd a test case for issue 4286@mvdanedc89df
  • cmd/cuesupport explicit encodings in exp writefs@mvdand0eca3f
  • cmd/cuerewrite exp writefs with internal/filetypes and internal/encoding@mvdan766668d
  • cmd/cueadd first exp writefs testscript@mvdan00eddbf
  • cmd/cueadd regression test for issue 4275@mvdan791e697
  • cmd/cuebe more helpful when publishing a module without source@mvdan3dfa50a
  • cmd/cueadd and unskip tests for invalid task type errors@mvdandb4afc1
  • cmd/cue/cmdadd test coverage for absolute packages with cue cmd@mvdanf5e266a
  • cmd/cuedeflake cue_after test@rogpeppe4504db0
  • cmd/cue/cmdadd failing test for issue #4202@mvdan0a4a11a
  • cmd/cuerewrite help fmt@mvdan0fa24af
  • cmd/cuealter flag behavior based on the command name@mvdanbc5bd8f
  • cmd/cuedrop --verbose and --trace as global flags@mvdan92afa2e
  • cmd/cuemap constants by go/types.Type directly@mvdandac4e90
  • cmd/cuetest that cue fmt also formats files with no package clause@mvdand65c829
  • cmd/cuerewrite help vet@mvdan9488f0c
  • cmd/cueadd a testscript running commands inside cue.mod@mvdan50aaf7e
  • cmd/cueclarify the restrictions around @embed file paths@mvdandc9a189
  • cmd/cueappease gopls in gen_experiments_help.go@mvdan79c8f3a
  • cmd/cuerelax login --token prefix validation@rustyx98e651d
  • cmd/cueallow non-regular files with --outfile@mvdan0408e0f
  • cmd/cuecorrectly parse type=number and type=int tags@mvdan650cce2
  • cmd/cueadd a test for a type=number injection tag@mvdan0ac9d7f
  • cmd/cueadd test cases for cue cmd tag injection with more types@mvdan4e6a19f
  • cmd/cuereintroduce type: "file" default in exp writefs@mvdan220e7c8
  • cmd/cuesimplify exp writefs example a bit@mvdan02fbd6d
  • cmd/cuerewrite exp writefs to not require go run@mvdan1d15871
  • cmd/cueadd exp writefs moving the code from the cuelang.org repo@mvdan98a60eb
  • cmd/cueavoid panic in get go when an enum has zero named values@mvdane6123b0
  • cmd/cueget go: expose field name lookup priority@gdvalle7bd151d
  • cmd/cuetest --outfile and --force with named pipes@mvdan51f429e
  • cmd/cueadd support for DOCKER_AUTH_CONFIG OCI registry credentials@bogdanbojanb06d4a7
  • cmd/cueremove all "not yet stable" cue mod notes@mvdanb408552
  • cmd/cuequote Go field tags if they are invalid CUE attribute bodies@mvdan602eb31
  • cmd/cuetest how cue get go generates invalid CUE attributes@mvdan034e892
  • cmd/cuestabilize mod registry, rename, mirror@mvdanaa9f32b
  • cmd/cueensure that cue get go results in valid CUE@mvdanf7a5764
  • cmd/cueGo types implementing a supported interface are themselves supported@mvdan8d099aa
  • cmd/cueadd test case for issue #2633@mvdan2ae2665
  • cmd/cuefix regression with unsupported named types@mvdan3092bd8
  • cmd/cueskip over type aliases more precisely@mvdana8553f7
  • cmd/cueminor get go cleanups@mvdanc4464c0
  • cmd/cueremove types.Invalid checks@mvdan6bb634d
  • cmd/cuefix non-null map values being detected as nullable@fionera50371eb
  • cmd/cuedetect kubernetes semantics for get go@fionerae527387
  • cmd/cueadd kubernetes semantics test@fionera2b34ff2
  • cmd/cuedo not emit empty CUE files in get go again@mvdane03d16f
  • cmd/cuetest that we don't emit empty CUE files without --outfile@mvdan6532a5d
  • cmd/cuestabilize CUE_EXPERIMENT=cmdreferencepkg@mvdanfa74fb6
  • cmd/cuerewrite tool/http test to not rely on an internal httptest server@mvdan9587a47
  • cmd/cueclarify help wording about filenames containing colons@mvdan1039c59
  • cmd/cuetry to deflake stats test on CI@mvdan8eab7c6
  • cmd/cueadd smoke tests for CUE_STATS_FILE and CUE_BENCH@mvdan2c0184f
  • cmd/cuereuse fetchStats for CUE_BENCH@mvdan84e3e9c
  • cmd/cueinclude syscall.Rusage stats in CUE_STATS@mvdanfb96f96
  • cmd/cuemove fetching of Stats numbers into a separate func@mvdan23ef274
  • cmd/cueremove the deprecated --strict flag@mvdanf0a1fbe
  • cmd/cuego fix -stditerators ./...@mvdan129aff5

cue70

  • cue/loadcheck some errors that were ignored@rogpeppe13fdcdb
  • cue/loaddo not panic when load.Instances(args, nil) fails very early@mvdancd6a481
  • cue/parsersimplify else/fallback clause rules@mpvl0cbc9a1
  • cue/parserrestrict else to single clause only@mpvl28f0246
  • cueadd fallback keyword for for comprehensions@mpvlfe9f503
  • cue/testdatarename out/eval to out/evalalpha when appropriate@rogpeppec76dc5a
  • cue/buildfix stale identifier resolution across instances@mvdandd7361a
  • cue/testdataupdate stats for comprehensions/try.txtar@mvdan20c1149
  • cue/buildintegrate identifier resolution into Complete@mpvl1aeb33e
  • cue/ast,cue/ast/astutiladd NewPredeclared and IsPredeclared for builtin references@mpvl8405422
  • cue/loadimprove error for major-only version packages outside a module@mvdan7675369
  • cueclarify that Schema is only useful for Value.Subsume@mvdanbb18d7b
  • cue/loaddo not load non-CUE directories as instances@rogpeppea4d2a6f
  • cue/loadadd test case for non-package directories@rogpeppe028411e
  • cue/internalMake ToFile optionally preserve StructLits@cuematthewec3e289
  • cue/ast,cue/ast/astutiladd Predeclared sentinel for builtin references@mvdan42cc85f
  • cue/ast/astutilfix false positive in label expression check for let clauses@mvdana93bcc1
  • cue/testdataadd regression test for issue #4203@mvdane3eb948
  • cue/errorsavoid duplicate path in error list formatting@mvdan487c072
  • cue/testdata/builtinsadd test for error() with erroring interpolation@mvdana6070c8
  • cue/testdata/disjunctionsadd regression test for value alias in disjunction@mvdan0c9ed36
  • cue/testdata/cycleadd regression test for issue 4244@mvdaneb2c57c
  • cue/tokensort absolute positions before relative ones@mvdan46c1f9d
  • cueremove Instance.Eval@mvdan60c0505
  • cuepoint out cue/format exists in the godoc@mvdanba2ce99
  • cue/loaderror when loading packages from inside cue.mod@mvdan52e0dde
  • cue/formatsimplify label replacement without astutil.Apply@mvdanfdc3f74
  • cue/formatfix comma placement for ellipsis with inline comments@mvdan79305ff
  • cue/formatadd test for issue #4238@mvdan452fbae
  • cueadd IsIncomplete for checking for incomplete errors@rogpeppe40a5f00
  • cueadd test case for decoding incomplete value@rogpeppec98dca2
  • cue/testdata/cycleadd test for issue #4230@mvdan02450bd
  • cue/tokenPos.Add should be noop if Pos is not absolute@cuematthewde49f5c
  • cue/ast/astutilfix nil pointer dereference in postfix alias error@mvdan8293c52
  • cuesimplify unmarshaler logic further a bit@mvdandbf0666
  • cuerefactor how Decode handles custom unmarshalers@snuxollc157e78
  • cue/parseradd test cases for newlines in interpolations@mvdanb779ef6
  • cue/astAdd period position to selector@cuematthew5e3d8da
  • cue/formatfix single import with trailing comment@myitcveaaba8b
  • cuesupport custom CUE unmarshalling via Unmarshaler@snuxoll0c6b1ee
  • cue/loadonly inject a tag value when it was parsed correctly@mvdan3116c50
  • cue/parsersimplify how we deal with the ancient alias syntax@mvdandd6d201
  • cue/parsersimplify parseComprehensionClauses@mvdan26982e8
  • cue/parsersignal missing tokens via token.NoPos@mvdan97996d2
  • cue/parseruse errorExpected more consistently@mvdan13a79ee
  • cue/parserbalance newlines on multiline composite literals@mvdan9d60910
  • cue/parserreuse Parser.expect for more tokens@mvdan5064680
  • cue/parsersimplify the expectComma logic@mvdana9613af
  • cue/literalrequire multiline literals to end with a newline@mvdan8e4d374
  • cue/literaladd test cases for multiline literals with missing newlines@mvdan5c3e0f5
  • cue/testdatastart a disjunctions/discriminator.txtar file@mvdanb66772d
  • cue/testdataadd regression test for issue #2685@mvdan36046aa
  • cue/testdataadd a regression test for issue #3842@mvdan69c4adb
  • cue/astadd walkNilable and applyNilable helpers@mvdan8f927f8
  • cue/cuecontextwrite a short package godoc@mvdand7dda01
  • cue/ast,mod/modfileadd two more go:fix inline directives@mvdan22bc4bb
  • cue/parserdelay ast.Field allocation in parseField@mvdanfa2bca6
  • cueindirect the Go value before checking for null or noncrete@mvdan2e994df
  • cueadd more test cases to TestDecode@mvdan92e5046
  • cue/astremove Node.Comments and Node.AddComment@mvdan21abc7f
  • cue/literalaccept #"""# as a quoted double quote@mvdan81b11af
  • cue/astcorrect valid values for BasicLit.Kind@mvdan9c4df5d
  • cue/astCorrect Interpolation.End()@cuematthew2b9f396
  • cue/testdataadd test case for #3719@mvdan018a8e9
  • cue/testdataadd a test case for #4180@mvdanb0748e0
  • cueconvert.GoValueToValue returns a finalized value@mvdanfe628cc
  • cue/parserremove deprecated integer version APIs@mvdan5e7258e
  • cueadd happy paths to Value.getNum and Value.String@mvdana97a229
  • cue/astremove deprecated and unhelpful Field node fields@mvdan79b757d
  • cueremove the two last evalv2 remnants@mvdan2b1f4ac

doc4

  • doc/refclarify who maintains this document@mvdan3ee970f
  • doc/reffix three mistakes in the matchIf examples@mvdan000506e
  • doc/specuse "custom errors" instead of "user errors"@myitcvbaf8302
  • doc/refclarify the relationship between exported and hidden identifiers@mvdan367bc88

encoding9

  • encoding/yamlimprove ast.StructLit and ListLit positions@cuematthewcde471e
  • encoding/jsonschemaremove net/url.Parse workaround for Go 1.26@mvdan6cce9bc
  • encoding/gocodefix test@rogpeppe98ca6e3
  • encoding/yamladd support for YAML tags via @yaml(,tag) attribute@jonas-meyerb1a58bd
  • encoding/jsonextract PatchExpr to internal/encoding/json@cuematthewe5bfcda
  • encoding/jsoncorrect positions of field labels from json@cuematthew8c70d8d
  • encoding/jsonschemacorrectly encode references@rogpeppe781e23b
  • encoding/tomlcorrectly check for duplicate keys with arrays@mvdan3f825a4
  • encoding/tomlforget nested arrays when starting a new array element@mvdan09c2e40

internal164

  • internal/ciuse OIDC with the Central Registry for the e2e tests@mvdande47a5e
  • internalbump staticcheck to v0.7.0 for Go 1.26 support@mvdane1de78e
  • internal/core/adtmissed missing missing@mpvl8732213
  • internal/core/exportfix self-referential lets for recursive definitions@mvdanc257634
  • internal/core/compileavoid double error for invalid optional references@mpvlc1be2bb
  • internal/core/adtadd regression test for error() in pattern constraint keys@mvdan50a0a5e
  • internal/core/adtfix structural cycle hang with braced selectors@mvdan36702fd
  • internal/core/depfix stack overflow on recursive definitions in dep analysis@mvdan0b49a54
  • internal/core/dep,internal/core/exportfix stack overflow on recursive definitions@mvdand0e2ab6
  • internal/coreremove import path to instance mapping@rogpeppeb3d9ffc
  • internal/ciexplicitly set contents permission@myitcv7cde504
  • internal/core/adtimplement try expressions@mpvlf2e8299
  • internal/core/adtfix else clause duplication in comprehension field splitting@mvdan40356ab
  • internal/astinternalomit ILLEGAL tokens in debug print@mpvl23736eb
  • internal/cidisable checkout persist-credentials by default@myitcv069eac9
  • internal/core/exportfix panic in relPathLength for BinaryExpr@mvdan788eeed
  • internal/core/exportavoid let name collisions with dependency fields@mvdanf2b697a
  • internal/core/exportadd failing test for issue #4221@mvdanb690442
  • internal/core/adtfix undefined field in comprehension with structural cycle@mvdan225a1c4
  • internal/core/adtfix panic in memory reclamation@mvdan355d6fd
  • internal/core/adtadd else clause to comprehensions@mpvl9e2dec3
  • internal/core/exportfix hidden identifier renaming in for clauses@mvdan2fea4bc
  • internal/core/exportadd failing test for issue #4254@mvdanc53993e
  • internal/lspimplement ConvertFromStruct code action@cuematthewf68f686
  • internal/cibump actions/checkout and cue.dev/x/githubactions@mvdanf4d1d5a
  • internal/core/runtimeadd lock protection to loaded map@mpvl6451728
  • internal/core/adtfix race condition in Vertex.Default()@mpvl854a5b7
  • internal/core/adtuse thread-safe WeakMap for regexp caching@mpvlc7797c1
  • internal/lspmodel embedded files as packages@cuematthewfa8946f
  • internal/lspFileEvaluatorForURI returns lsp/cache.File@cuematthewdbf3293
  • internal/core/compilefix operator precedence in error() builtin@mvdan70b3f3e
  • internal/core/adtfix value alias resolution in disjunctions@mvdanb053ad5
  • internal/core/adthandle EqualOp in SimplifyBounds@mvdan0813460
  • internal/lspimplement ConvertToStruct code action@cuematthewc45f72d
  • internal/core/adtrefine cycle handling in LetReference.resolve@mvdan3e1e745
  • internal/ciallow steps to influence job permissions@myitcv839f03d
  • internal/cifix release workflow@myitcv9e34d67
  • internal/ciuse new registry-login-action@myitcvf595566
  • internal/core/adtfix spurious error in ForClause.yield key binding@mvdanbeae55b
  • internal/cueexperimentclarify the docs and update the ordering@mvdan46dc5d7
  • internal/cibump Go and goreleaser for v0.16.0-alpha.1@mvdan29a1c5a
  • internal/core/adtavoid allocations in matchPattern@mvdan523284f
  • internal/core/adtremove redundant updateConjunctInfo call@mvdane52024b
  • internal/core/convertallocate vertices in ensureArcVertex better@mvdane2b85a8
  • internal/core/convertreuse singleton struct and list marker allocs@mvdand06db86
  • internal/core/adtremove unused parameters in Vertex.AddStruct@mvdana8d5eef
  • internal/core/convertavoid repeated OpContext.Env calls@mvdan54e81b3
  • internal/core/convertavoid an allocation for "small" big.Int values@mvdan72c8aac
  • internal/core/adtalso use strings.ToValidUTF8 over x/text/encoding/unicode@mvdanb78f800
  • internal/core/convertuse strings.ToValidUTF8 over x/text/encoding/unicode@mvdan29aca5f
  • internal/pkgavoid repeating the args adt.Value slice in CallCtxt@mvdanbcb3559
  • internal/core/adtplace CallContext on the stack@mvdane0e9233
  • internal/core/convertavoid reflect.Value.Seq2 on maps too@mvdanba1ffbc
  • internal/core/adtdo not allocate a new YieldFunc in processComprehension@mvdanbd7fac4
  • internal/core/adtpreallocate CallExpr.evaluate args@mvdan29520c4
  • internal/core/adtremove last comments about the evalv3 transition@mvdan883158a
  • internal/core/adtfix regression in cycle handling for literal-only calls@mvdanecb33d7
  • internal/core/adtgroup allocations in ForClause.yield@mvdanc9c6652
  • internal/core/debugfix stack overflow in error formatting@mvdane7616e0
  • internal/lspsort results of find-definitions and find-references@cuematthew69bda43
  • internal/lspoverhaul the LSP evaluator@cuematthew48f454c
  • internal/lsprename definitions to eval@cuematthewe96b5fe
  • internal/core/adtremove redundant position code after SimplifyBounds@mvdan4c6c3c4
  • internal/core/adtsimplify disjunctError@mvdanff54443
  • internal/core/adtremove unused reportFieldMismatch parameter@mvdandd7357f
  • internal/core/adtfix nil pointer dereference in BinaryExpr.evaluate@mvdancb9da59
  • internal/ci/baseadd a #writefs CUE schema@mvdandd7a23f
  • internal/cibump Go and goreleaser versions@mvdane4c8a12
  • internal/core/adtuse the pre-validation value kind to report errors@mvdan49e75c7
  • internal/core/adtremove commented-out error assignment with a TODO@mvdan2a310e9
  • internal/core/adtremove the docs for evalv2's cycle detection algorithm@mvdanfb0e218
  • internal/core/adtremove unnecessary isShared assignment@mvdan3fe89ac
  • internal/core/adtremove another unused branch with a TODO@mvdanf48ba68
  • internal/core/adtremove unused branch with TODOs@mvdan0b445a5
  • internal/core/adtremove branch with TODO which never triggers@mvdan46b33b1
  • internal/core/adtremove now-unnecessary panic workaround@mvdan2e7e48d
  • internal/core/adtshrink CloseInfo fields in nodeContextState@mvdan06f65ae
  • internal/core/adtshrink scheduler by 40 bytes@mvdan2c35f57
  • internal/core/adtsimplify aStruct field@mvdan4dd731e
  • internal/core/adteagerly update kind to StructKind when aStruct is set@mvdanfc86988
  • internal/core/adtdo not reuse large vertexMap maps@mvdan01ef28d
  • internal/core/adtreuse vertex maps in overlayContext@mvdan7d8e1f9
  • internal/ciremove commit @-mention check@mvdanf1f7a95
  • internal/core/adtfix typo@rogpeppe9e46612
  • internal/core/adttreat a call on a non-concrete func as incomplete@rogpeppe8c751bd
  • internal/filetypessupport openOnlyWhenExplicit tag@rogpeppe7603138
  • internal/core/adtjoin overlayContext's vertices with vertexMap@mvdanac52bda
  • internal/core/toposortavoid repeating structInfos in nodeToStructMetas@mvdan642b242
  • internal/core/toposortavoid repeated ast.Node.Pos calls@mvdandf8ffc1
  • internalremove unnecessary Pos methods@mvdane190842
  • internal/corevarious minor cleanups@mvdane018a99
  • internal/core/adtremove Env and CloseInfo from StructInfo@mvdaneecd7f7
  • internal/core/adtdeduplicate Vertex.Structs by StructLit@mvdanfeb4772
  • internal/core/adtapply TODO to remove getArc call from addConstraint@mvdan6423379
  • internal/core/adtintroduce ConflictError@mvdanf6ae883
  • internal/core/convertreuse unicode.UTF8.NewEncoder@mvdan2b80cb1
  • internal/core/adtcheck opID before inheriting parent reqSets@mvdan2a257d3
  • internal/core/adtavoid allocations in Vertex.Default for closed lists@mvdand2bed8d
  • internal/core/adttrack containment positions separately@mvdan5afb0e2
  • internal/core/adtreuse task objects within an OpContext@mvdan8f38c62
  • internal/core/adtallocate Vertex with space for one conjunct in getArc@mvdan2e95b2d
  • internal/core/adtsimplify nodeContext.arcMap@mvdana89014d
  • internal/core/adtstore token.Pos rather than Node in containment@mvdan21006f9
  • internal/core/adtavoid adding replacements with replaceID.from == 0@mvdan5c715cf
  • internal/core/adtimplement CycleInfo.IsCyclic TODO@mvdan5625367
  • internal/cmd/cue-ast,internal/astinternalsupport printing positions@rogpeppe84fc284
  • internal/core/adtsimplify func declarations now that evalv2 is gone@mvdan174e758
  • internal/core/adtadd reqSets.elemPtrs@mvdanc458d79
  • internal/core/adtuse append-like func signatures for reqSets@mvdan8cd77ff
  • internal/core/adtgrow reqSets ahead of time in getReqSets@mvdan8c0dfb2
  • internal/sourcereturn a size when Open is given an os.File as src@mvdan4d54b90
  • internal/encodingdo not grow byte slices when reading source files@mvdan8e672f0
  • internal/sourcedo not guarantee io.Closer in Open@mvdan95a9687
  • internal/core/convertdo not create new cue/ast source nodes@mvdan4ad2928
  • internal/valueredesign Interface to avoid allocations@mvdanb32e411
  • internal/core/convertavoid reflect.Value.Seq2 for slices@mvdan89f45c0
  • internal/core/convertgrow slices for Go structs and slices@mvdan65503c7
  • internal/core/adtgrow Vertex.Arcs in scheduleStruct@mvdan0f5a5a9
  • internal/core/adtgrow Vertex.Arcs in processListLit@mvdan03bb83a
  • internal/core/convertavoid making unnecessary vertex copies@mvdanfd794c6
  • internal/core/toposortmake Node.sccNodeState a non-pointer@mvdanf86ad4c
  • internal/core/adtreduce allocations further in SimplifyBounds@mvdanb7cdff9
  • internal/core/adtSimplifyBounds can return nil@mvdan4b035f7
  • internal/core/toposortreturn a slice of non-pointers in analyseStructs@mvdanc01ccba
  • internal/core/toposortremove Node.Incoming@mvdan35e1c06
  • internal/core/convertrefactor fromGoValue to only use reflect.Value@mvdanb871500
  • internal/core/compiledon't panic on an alias cycle with a dynamic field@mvdancfb185d
  • internal/core/adtreuse a buffer when constructing envDisjunct.disjuncts@mvdan6c5ade3
  • internal/core/adtsimplify filterSets and filterTop a bit@mvdan368a7cb
  • internal/core/adtuse an uint64 key in containsDefIDCache@mvdan561dfd8
  • internal/core/adtoptimize containsDefIDRec with minimum replaceID tracking@mvdan3f6922f
  • internal/core/compilerevert and to use Func instead of RawFunc@mvdan3a51f9d
  • internal/core/subsumefix duplicate logic for pattern constraints@mvdan91c5b47
  • internal/core/subsumeadd test cases for pattern constraints@mvdan01cf686
  • internal/filetypesuse a less generic bootstrap build tag@mvdan29a4a17
  • internal/lspimplement support for LSP Diagnostics@cuematthewd078bc3
  • internal/lspimplement support for LSP DocumentSymbols@cuematthewe2c4321
  • internal/core/convertremove goConverter@mvdan1a6ae7a
  • internal/core/convertstop setting positions in cue/ast nodes@mvdan8b96db8
  • internal/core/exportadd a test to ensure toposort keeps Go field order@mvdan376faa9
  • internal/core/adtcheck removed scope per conjunct@mvdanb9bf6a8
  • internal/core/convertsimplify the top-level FromGoType logic@mvdane623e78
  • internal/core/convertreduce from 3 func APIs to 2@mvdan9aec0fd
  • internal/core/convertstop accepting reflect.Value as a Go value@mvdan467f82a
  • internal/pkgadd a happy path to CallCtxt.BigInt@mvdan31ca887
  • internal/core/adtremove support for CUE_EXPERIMENT=keepvalidators=0@mvdanbff5146
  • internal/filetypessupport absolute paths with colons on Unix@mvdan196a5d5
  • internal/filetypesadd test cases for absolute paths with colons@mvdan5923272
  • internal/lspformat standalone files without phantom pkg names@cuematthewf22fe29
  • internal/core/adtreduce slice allocations in nodeContext.getValidators@mvdand273ee5
  • internal/pkgadd happy path shortcuts for CallCtxt argument getters@mvdan86c5472
  • internal/core/adtreuse more Bool allocations@mvdan8305967
  • internal/core/convertdon't allocate when checking for types.Interface@mvdan7742329
  • internal/core/adtreduce allocs on BinOp for boolean operators@mvdan5d18599
  • internal/filetypesmake ParseArgs more consistent with ParseFile@mvdan5d64a2b
  • internal/filetypesclarify empty scope error in ParseFile@mvdaneb0f40d
  • internal/filetypessupport Windows absolute paths in ParseFile@mvdanf9439f5
  • internal/filetypestest an empty scope and filename consistently@mvdan003bf39
  • internal/filetypesadd test cases exposing issue 4168@mvdan1a3fdb8
  • internal/cueversionbump LanguageVersion to v0.16.0@mvdan1d77a81
  • internal/core/adtonly do a containsDefIDCache map lookup if caching@mvdan3caae9e
  • internal/core/adtsort replaceIDs to scan just once in containsDefIDRec@mvdan326891f
  • internal/core/adtrefactor overlayContext.derefDisjunctsEnv away@mvdanb08d1d0
  • internal/core/adtcache containsDefID results in OpContext@mvdanff3c4dc

lsp29

  • lsp/evalcorrect resolution of package-level fields@cuematthewe3306a9
  • lsp/evaladd test showing bad behaviour@cuematthewda5d43a
  • lsp/servermake "Remove surrounding struct braces" preferred@cuematthew5f20a71
  • lsp/evaladd support for comprehension else/fallback@cuematthewe2d8f7b
  • lsp/evalAdd support for try-clauses and optional path components@cuematthew62de631
  • lsp/fscacheignore ASTs which have no absolute positions@cuematthew2585b3b
  • lsp/cacheexpand completion range of fields in json for double-quotes@cuematthewb1c63da
  • lsp/cachecompletions must not return null items list@cuematthew75ee97a
  • lsp/evalfix field-value aliases@cuematthew29d8be4
  • lsp/evaladd test to show bad behaviour of aliases@cuematthew3e6bee7
  • lsp/serverforce-load all packages for completions within embedded files@cuematthew5eb5ed9
  • lsp/evalprocess field attributes and specialise queries for embeds@cuemattheweb192c6
  • lsp/fscacheread json and yaml files as CUE@cuematthew6825394
  • lsp/cacherework package dirtying and reloading@cuematthew22fff24
  • lsp/evalchange eval constructor to take Config struct@cuematthew3cd3244
  • lsp/fscachecorrect path components@cuematthew44a543b
  • lsp/cacheprovide placeholder for PrepareRename@cuematthew049d6e1
  • lsp/evalrework transitioning through imports@cuematthewf2a2319
  • lsp/evalPath resolution must force eval of import specs@cuematthewaf0cfc1
  • lsp/evalCorrect usages for import specs@cuematthew8e6fb3b
  • lsp/evalcorrect evaluation of embedded lits@cuematthewf1db806
  • lsp/evaladd test showing bad behaviour@cuematthew0aa51c2
  • lsp/definitionscorrect evaluation of import statements@cuematthew99ed6c5
  • lsp/definitionsadd test showing bad behaviour for import statements@cuematthewb0a088f
  • lsp/definitionsimprove UsagesForOffset for imports@cuematthew6df6f67
  • lsp/fscacheimprove removal of phantom package decls@cuematthew1449cca
  • lsp/definitionscorrect resolution of path roots@cuematthew7ee5478
  • lsp/definitionsadd test to show faulty resolution@cuematthewb05b992
  • lsp/cachestop nested modules from breaking find-references@cuematthew2c9c7d1

mod3

  • mod/modzipcheck for cue.mod existence, not just directories@mvdan8034cc1
  • mod/modzipcheck for cue.mod directories instead of go.mod files@mvdan8957a36
  • mod/modzipadd test for go.mod submodule detection@mvdan3be6c26

pkg12

  • pkg/list/testdataadd regression test for issue #4171@mvdane977cfa
  • pkg/tools/httpremove valueMu mutex from http.Serve@mpvl95ba1d2
  • pkg/tools/httpexperimental implementation of http.Serve@mpvl0badd6d
  • pkg/netadd CompareIP@mvdan174a8b9
  • pkg/encoding/openapisupport marshalSchema builtin for openAPI@mpvl66ea772
  • pkg/tool/fileadd Symlink@sprat6618a6f
  • pkg/pathremove osInfo.HasPrefix@mvdan516099a
  • pkg/netadd ParseCIDR to extract CIDR information@mvdanea83954
  • pkg/netadd InCIDR to check if an IP is within a CIDR range@mvdana3cffd4
  • pkg/math/bitsavoid an extra allocation per call@mvdan9adb47a
  • pkg/strconvre-run CUE_UPDATE=1 go test@mvdan9b36f79
  • pkg/strconvadd ParseNumber builtin@cjorge-graphopsaec0116

tools4

  • tools/flowskip phantom tasks from eliminated conditional branches@mvdan7fb912e
  • tools/fixuse ast.Predeclared to avoid shadowing in value alias conversion@mvdan08a7ec3
  • tools/fixadd tests for value alias conversion when "self" is in scope@mvdan3dacb0c
  • tools/flowsupport task results when defined via definitions@mvdan3d8f535

Other15

  • re-enable staticcheck's SA4000 and SA4003 checks@mvdan771e253
  • allow more commands in Claude@mvdan6d50284
  • lspaux/protocolinitial implementation for protocol@cuematthew3ee106b
  • update all dependencies@mvdan9fb0173
  • tweak Claude's allow and deny settings further@mvdanef6bb80
  • _scriptsadd OpenSpec support for AI-assisted development@mpvl6a78eff
  • golps/protocolintroduce DocumentURI.Path method@cuematthewf04e0fb
  • gopls/protocolrename DocumentURI.Path to DocumentURI.FilePath@cuematthewd8eca4a
  • interpreter/embedprepare embed for extension@cuematthewa95414a
  • integration/workspaceadd test showing bad behaviour@cuematthewc164d8f
  • add go tool cue and xargs as allowed Claude commands@mvdan4b495fa
  • CLAUDEdiscourage "go build" and add a set of "must follow" rules@mvdan6301c2a
  • update dependencies ahead of v0.16.0-alpha.1@mvdan14cf3bd
  • CONTRIBUTINGfix links and tweak the wording@mvdan0a9e071
  • update all dependencies@mvdan7f31475

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.16.0_darwin_amd64.tar.gz451495b46684fd78120741e1d325f9b21e6843f05ec455d3fb5073ba2a9311db
macOS, Apple siliconcue_v0.16.0_darwin_arm64.tar.gz83ba7485cbad5f031ffc3e0142bc4f3ab26b53fd4491548939bfa9d5b00f6b66
Linux, x86-64cue_v0.16.0_linux_amd64.tar.gzbbe0c5e85bc101cd1f95e68242f5ad48c3db73bad72be94fe2dc79d3f1ef0d4c
Linux, Arm64cue_v0.16.0_linux_arm64.tar.gz5c5a59bcb31d53c81feee58774752df14baef5c412138f49c208ab15608ac981
Windows, x86-64cue_v0.16.0_windows_amd64.zipe57180a908a5e35d8a2be00ba620b52fc6fdfc6e1400799d25bb53a115555b03
Windows, Arm64cue_v0.16.0_windows_arm64.zipe0bd483be9159144c1ed2a19ee722a1fc6ee18bfde173afe02637f0af8da501e
Install CUE