github cue-lang/cue v0.15.0

19 hours ago

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

Note that this release no longer includes a checksums.txt asset; GitHub now provide digests natively.

LSP

This release includes the initial version of cue lsp - with support for "go to definition", "find references", rename, code completion, hover documentation, and code formatting.

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.

Language

explicitopen experiment for #A...

The explicitopen per-file experiment enables the posfix ... operator to explicitly open closed structs, allowing additional fields to be added. This change simplifies CUE's semantics, reduces user confusion, and enables clearer expression of type extensibility patterns.

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

aliasv2 experiment

The aliasv2 per-file experiment implements the new "postfix aliases" syntax, and introduces a "self" predeclared identifier referring to the innermost surrounding struct or list.

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

Other experiments

⚠️ With its proposal accepted, the keepvalidators global experiment is now stable, meaning that CUE_EXPERIMENT=keepvalidators is always enabled.

With its proposal accepted, the structcmp per-file experiment is now stable with language.version at v0.15.0 or later, meaning that the @experiment(structcmp) attribute is unnecessary as it's always enabled.

Evaluator

⚠️ Removing evalv2

The old evalv2 evaluator, which previously could be re-enabled via CUE_EXPERIMENT=evalv3=0, is now deleted. The new evalv3 evaluator has been on by default since v0.13.0, and at this point our entire test suite including Unity is working.

Removing the old evaluator reduces significant load on development, as we were able to clear out 4000 lines of code, and simplify the internal types and code structure. This is a necessary step to unblock ongoing feature and performance work in the evaluator.

As a bonus, because the old and new evaluators shared many core evaluator types, removing the fields only used by the old evaluator yields modest memory usage improvements of around 4-6%.

Performance

Evaluating concrete CUE values no longer involves dependency analysis; this should result in modest speed improvements when marshaling to YAML, via either cue export -e expr -o yaml or yaml.Marshal.

Dependency analysis now avoids computing references more than once, which resolves an expontential performance issue for some configurations using chains of CUE references.

Add caching to a part of the typochecker algorithm; this has been measured to provide performance improvements of up to 30% on a few large projects.

cue/parser now reuses more memory, which results in parsing performance improvements of up to 30% and memory savings of up to 50%, especially when loading large CUE data files.

Other changes

File embedding via the @embed attribute has gained an allowEmptyGlob option, to allow glob patterns to match zero files without causing an error.

The evaluator now shows all user errors created with the error builtin when they can be related to a disjunction failure. Previously, the evaluator would try to only show user errors directly part of a disjunction error, but that caused too many omissions.

Some error positions which were lost in the transition from evalv2 to evalv3 have been reintroduced.

Fix a bug where required fields in a definition might not be enforced when unifying with an inline struct in an expression, such as (#RequiresFoo & {bar: "baz"}).bar.

Fix a regression introduced in v0.12.0 where incomplete errors were not being handled consistently if they directly involved the top-level value.

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

cmd/cue

A new cue help experiments command is introduced to document all available per-file and global experiments.

The cue fix --exp flag is introduced to rewrite files or packages to use new and experimental semantics with @experiment attributes.

cue mod mirror now copies OCI referrers between registries, which ensures that artifacts like signatures and attestations which reference modules being mirrored are copied as well.

cue mod resolve gains a --deps flag that lists all dependencies of the current module and which registries they resolve to.

cue get go gains an --outfile flag to generate exactly one CUE file for a single Go package, which can be useful when integrating cue get go into build systems like Bazel.

Fix a regression introduced in v0.9.0 where loading a qualified pattern like ./...:pkgname no longer filtered files based on the package name given.

cue get go now stops on any Go package loading error. Trying to continue in the presence of syntax or type-checking errors could lead to generating incorrect CUE.

Encodings

Initial support for encoding CUE schemas as JSON Schema is added. This includes a new encoding/jsonschema.Generate Go API, as well as CLI support via cue def --out jsonschema. This is currently very experimental, and many features are missing. For now, it can only generate a single version of JSON Schema, draft/2020-12.

The YAML library in the archived Go module gopkg.in/yaml.v3 has been replaced by go.yaml.in/yaml/v3, an active fork now maintained by the YAML organization.

cue exp gengotypes is improved to handle more edge cases with CUE package imports which could result in broken Go code.

The Protobuf decoder has been tweaked to not require files such as google/protobuf/timestamp.proto to exist on disk, given that they are mapped to CUE standard library APIs directly.

The Protobuf decoder has also been tweaked to support fully qualified references such as my.pkg.name.MessageName.

A bug is fixed in the TOML decoder where sub-table keys could incorrectly lead to duplicate key errors.

Standard library

The net package has gained new AddIP and AddIPCIDR functions to add numerical offsets to IP addresses or CIDR networks.

The Atoi, ParseInt, and ParseUint functions in the strconv package now work on integers with unlimited precision, like the rest of the CUE evaluator, rather than just a maximum of 64 bits.

Go API

The new cue.Value.IsClosed and cue.Value.IsClosedRecursively methods report whether a value has been closed at the top level or recursively, which is useful information when writing schema encodings.

The new cue.Patterns and cue.Selector.Pattern APIs allow introspecting pattern constraints in CUE struct values.

The new encoding/yaml.Decoder API allows decoding a stream of YAML documents, given that existing APIs did not support streams of multiple YAML documents.

encoding/json gains JSON Pointer APIs, which are already useful in packages like encoding/jsonschema.

cue/ast introduces PostfixExpr to support upcoming additions to the language syntax.

cue/ast introduces StringLabelNeedsQuoting to determine whether a string label needs to be quoted when used in CUE syntax.

cue/ast introduces NewStringLabel to create an ast.Label as either an unquoted identifier or a quoted string, depending on whether the string label needs quoting.

tools/fix has gained new APIs to fix configs to use an active experiment, as well as fixing configs to a newer language version.

cue introduces a Path.Append convenience method.

⚠️ cue/build.Instance.Match is removed, given that it was never set to any value at any point since it was added.

cue/token is adjusted so that node positions within a file never result in an offset which is outside the bounds of the file. This could easily lead to subtle bugs or panics when using node position offsets.

⚠️ The cue/token.Pos.Before method is now rewritten to match cue/token.Pos.Compare, given that it always returned "false" for positions from different files. The method is now deprecated as well.

cue/errors is adjusted so that Positions only collects printable positions, to prevent printing empty positions in the CLI.

cue/ast deprecates the File.Imports field in favor of the File.ImportSpecs iterator method. The iterator method File.ImportDecls is also introduced for completeness.

⚠️ The long-deprecated cue.ResolveReferences option API is now removed.

cue/parser.DeprecationError.Version is deprecated, as tracking CUE language versions via integers has not been used since v0.4.3, and the mechanism was never properly documented.

Full list of changes since v0.14.0
  • tools/fix: fix several issues with explicitopen rewrite by @mpvl in 4aad065
  • tools/fix: add some test cases by @mpvl in 3b2b9b4
  • internal/core/adt: add __reclose by @mpvl in f8bf47a
  • doc/ref: clarify exact meaning of value for match* builtins by @mpvl in a650c53
  • internal/ci/base: cue fmt files by @mpvl in ab19f98
  • lsp/definitions: fix find-references (UsagesForOffset) by @cuematthew in 27f5797
  • internal/core/dep: fix dependencies on spread operator by @mpvl in 5634c58
  • internal/core/dep: add test for spread operator by @mpvl in f1cd0d2
  • internal/core/export: handle spread operator by @mpvl in 52f26f9
  • doc/ref/spec.md: document matchN and machIf by @mpvl in 020764b
  • cue/parser: fix too restrictive parser test by @mpvl in 7d69171
  • cue/ast/astutil: handle patching of some references in Apply by @mpvl in b979ace
  • cue/ast/astutil: include Sanitize in TestApply by @mpvl in 57c6f9f
  • tools/fix: do not add spread operator to lists by @mpvl in 7e9a83e
  • all: remove two error results which are always nil by @mvdan in 6ed9b98
  • all: remove three func results which are never used by @mvdan in eca4996
  • cmd/cue: remove unused addInjectionFlags parameter by @mvdan in 083dd03
  • internal/core/adt: make CloseInfo.AncestorPositions an iterator by @mvdan in 82c321f
  • CONTRIBUTING: discourage SSH for Gerrit more actively by @mvdan in 2e7e5af
  • pkg/path: fix test failures when executed with -count N by @roman-mazur in 1bfde52
  • internal/source: simplify ReadAll by @mvdan in cc3d92d
  • internal/source: avoid a NopCloser if src is already a Closer by @mvdan in 6d58d63
  • cue/ast/astutil: avoid walking to the root to reuse scopes by @mvdan in 4ba9572
  • lsp/fscache: set version on token.File by @cuematthew in e79d2ea
  • internal/lsp: simplify processing of package imports by @cuematthew in bbf6f4f
  • cue/ast/astutil: assume LetClause.Expr and Alias.Expr are non-nil by @mvdan in a77e741
  • cue/ast/astutil: reuse scope allocations by @mvdan in e5706db
  • cue/ast: do not allocate in SetComments when it's a no-op by @mvdan in d88bc99
  • cue/parser: reuse commentState allocations by @mvdan in 1e30ed2
  • all: replace two uses of astutil.ParseImportPath by @mvdan in 2dcf1d8
  • cue: use Vertex.SingleConjunct in Value.Source by @mvdan in dea3faa
  • cue/load: ensure that Config.ModuleRoot is clean, like Config.Dir by @mvdan in 14472be
  • cue/load: correctly handle the filesystem root as Config.ModuleRoot by @mvdan in d7a839b
  • encoding/jsonschema: avoid redundant patternProperties in Generate by @rogpeppe in a8385f8
  • cmd/cue: update help text to reflect renamed experiment by @jpluscplusm in 7d0090a
  • cmd/cue/cmd: add --deps flag to 'cue mod resolve' by @rogpeppe in 15afd50
  • cue/load: add test case showing an error when Config.ModuleRoot=="/" by @mvdan in 44dba4e
  • internal/ci/goreleaser: actually disable checksum generation by @mvdan in 93c434c
  • all: remove two obsolete and commented-out APIs by @mvdan in 25322ae
  • lsp/definitions: call pos.Offset() directly by @cuematthew in 64182de
  • internal/lsp: support standalone files with imports in modules by @cuematthew in 7dcbdf6
  • internal/lsp: add support for rename by @cuematthew in 24300be
  • internal/lsp: support references with definitions by @cuematthew in 6feb520
  • cmd/cue: adjust cue get go --outfile logic by @mvdan in 6491013
  • cue/token: rewrite Pos.Before in terms of Pos.Compare by @mvdan in 6c2aa6a
  • cue/token: don't unpack line info in Pos.Compare by @mvdan in 9623737
  • cue/token: remove unnecessary Pos.file nil checks by @mvdan in 852de61
  • cue/token: don't unpack line info in Pos.Offset by @mvdan in 8972e06
  • cue/token: don't unpack line info in Pos.Filename by @mvdan in 6543708
  • cue/token: reuse File.Offset in File.position by @mvdan in f4ba49b
  • cue/ast/astutil: use go fix -inline on ImportPathName by @mvdan in 1850e9b
  • internal/core/layer: rudimentary implementation of layers by @mpvl in 654b5c0
  • internal/core/adt: set t.id only once by @mpvl in aae1e07
  • internal/lsp: wire UsagesForOffset into the LSP by @cuematthew in bdc3901
  • lsp/definitions: implement UsagesForOffset by @cuematthew in 5303c60
  • lsp/definitions: add ability to reset definitions analysis by @cuematthew in aba5ee2
  • lsp/rangeset: add String methods by @cuematthew in bfe4aba
  • encoding/yaml: add Decoder for streaming YAML documents by @mpvl in 738e6e4
  • all: start leveraging go fix -inline by @mvdan in 70d6a9c
  • all: go fix -inline ./... by @mvdan in 279e355
  • all: rename aliasandself experiment to aliasv2 by @mpvl in b85644f
  • encoding/jsonschema: explicit close handling by @rogpeppe in a94cfbc
  • encoding/jsonschema: add tests by @rogpeppe in 2606457
  • internal/ci: don't let "---" lines break git commit trailers by @mvdan in e735c99
  • mod/modregistry: mirror referrers in Client.Mirror by @rogpeppe in f0d24a9
  • all: go fix -slicescontains ./... by @mvdan in 7b65843
  • all: go fix -stringsseq ./... by @mvdan in 2895806
  • internal/core/adt: treat equality bound as open validator by @mpvl in 15f2a53
  • internal/core/adt: add tests for Issue 4142 by @mpvl in de886bc
  • cue/testdata/eval/bounds.txtar: accept v3 as golden by @mpvl in ff6f38b
  • cue: support ... operator in Expr by @mpvl in 3d8e9ea
  • internal/ci: bump Go and goreleaser by @mvdan in 64a5e68
  • update all dependencies by @mvdan in d4d62e6
  • tools/fix: add fixAliasAndSelf by @mpvl in 2b281ea
  • internal/core: make label references work for all field types by @mpvl in 23a328a
  • cue/ast/astutil: add resolver support for postfix aliases by @mpvl in 4d8b1da
  • internal/core/adt: report error for missing required fields by @mpvl in a25fb94
  • internal/core/adt: add tests for issue 3918 by @mpvl in 166a851
  • cue/parser|format: implement postfix alias syntax by @mpvl in 0eb7de7
  • all: apply more gopls suggestions by @mvdan in 8d2909c
  • lsp/definitions: fix broken build due to self renaming by @cuematthew in 8df341b
  • internal/cueexperiment: rename self experiment to aliasandself by @mpvl in a8dce0b
  • internal/ci: use unauthenticated GerritHub URL by @jpluscplusm in 3dabab4
  • cue: add postfix alias syntax infrastructure by @mpvl in d92ce18
  • internal/core/adt: fix disjunction related mem mgmt bug by @mpvl in 335e4fb
  • encoding/jsonschema: optimize items in definitions too by @rogpeppe in 098b6d1
  • encoding/jsonschema: add a test to check optimization in definitions by @rogpeppe in 29ad8ee
  • all: fix a number of bad godocs spotted by gopls by @mvdan in 5b42b38
  • encoding: fix two gopls warnings by @mvdan in 33621a6
  • switch this repository to cue.gerrithub.io by @mvdan in 2a81d1e
  • encoding/jsonschema: use unique item values in Generate by @rogpeppe in 947c85c
  • internal/anyunique: new package by @rogpeppe in 84c673a
  • encoding/jsonschema: recognize pattern constraints in Generate by @rogpeppe in c356c10
  • encoding/jsonschema: fix patternProperties in Extract by @rogpeppe in fc58592
  • encoding/jsonschema: recognize different forms of "const" by @rogpeppe in 5433cb9
  • cue: support iteration over pattern constraints by @rogpeppe in a6f97a1
  • internal/core/adt: cache containsDefID results by @mvdan in 992c1cd
  • internal/core/adt: always print errors in leaf nodes by @mpvl in 8dce6dc
  • internal/ci: stop generating checksums.txt as a release archive by @mvdan in 15e67c0
  • internal/core/adt: turn Vertex.VisitAllConjuncts into an iterator by @mvdan in 2536d4f
  • internal/core/...: fully transition away from Vertex.VisitLeafConjuncts by @mvdan in 40aa589
  • encoding/jsonschema: recognize closed structs in Generate by @rogpeppe in 113d7b9
  • cue: implement IsClosed and IsClosedRecursively by @mpvl in b28a5f3
  • encoding/jsonschema: improve teststats by @rogpeppe in 28054b0
  • encoding/jsonschema: treat close as no-op for now by @rogpeppe in b670102
  • encoding/jsonschema: recognize list.MatchN in Generate by @rogpeppe in 09a0f42
  • encoding/jsonschema: recognize explicit errors in CUE by @rogpeppe in d293a17
  • encoding/jsonschema: use error builtin rather than _|_ by @rogpeppe in 49126bb
  • cue: add test case for the fixed bug 4037 by @mvdan in 5c6dd1c
  • cue: fix panic in LookupPath on unfinalized arcs by @rogpeppe in 4160e88
  • encoding/jsonschema: recognize matchIf in Generate by @rogpeppe in fedcd87
  • internal/core/adt: avoid hang on self-references through "let" by @mvdan in 85e008d
  • encoding/yaml: consistently use cue.Concrete when calling Value.Syntax by @mvdan in 39d559b
  • encoding/jsonschema: use more generic siblings function by @rogpeppe in 366de4b
  • encoding/jsonschema: minor improvements to Generate by @rogpeppe in 06d8b91
  • encoding/jsonschema: add a few tests by @rogpeppe in 2efaae1
  • encoding/jsonschema: recognize matchN in Generate by @rogpeppe in 40a9710
  • encoding/jsonschema: round trip external tests by @rogpeppe in 899a983
  • encoding/jsonschema: list support by @rogpeppe in b4b3d1b
  • encoding/jsonschema: improve mergeAllOf behavior by @rogpeppe in b8e3859
  • internal/core/adt: test TopKind in TestKindString by @mvdan in 42731c2
  • all: continue transition away from adt.Vertex.VisitLeafConjuncts by @mvdan in 658608c
  • encoding/jsonschema: adjust for net/url fix in go@master by @mvdan in f79aafe
  • internal/core/adt: add the Vertex.LeafConjuncts iterator by @mvdan in 2af8a20
  • internal/core/adt: turn VisitConjuncts into ConjunctsSeq by @mvdan in b33320b
  • internal/mod/semver: clean up with cmp.Compare by @mvdan in a85df20
  • cmd/cue: clarify what version affects experiments by @mvdan in ef2044e
  • cmd/cue: add --outfile flag to get go by @fionera in a6eaaf6
  • encoding/jsonschema: use ast.Expr rather than map by @rogpeppe in 77c93c6
  • encoding/jsonschema: add test case for regular fields by @rogpeppe in e58947e
  • internal/encoding: add jsonschema as an output format by @rogpeppe in 577c245
  • internal/encoding: do not require input to be concrete for concrete output formats by @rogpeppe in 9305978
  • internal/encoding: refactor Encoder.Encode, Encoder.EncodeFile by @rogpeppe in 93c27cc
  • cmd/cue: explain package instances in cue-help-inputs by @jpluscplusm in 103b1ce
  • cmd/cue: rewrite export help text by @jpluscplusm in ff5711d
  • internal/cuetxtar: do not skip tests on Instance failure by @rogpeppe in d62b617
  • Revert "mod/modregistry: mirror referrers in Client.Mirror" by @mvdan in 6f47bbf
  • mod/modregistry: mirror referrers in Client.Mirror by @rogpeppe in 9b06b4c
  • encoding/jsonschema: implement Generate by @rogpeppe in c60b98a
  • cue/ast: simplify IsValidIdent logic via strings.CutPrefix by @mvdan in 53ace20
  • cue: reuse internal.IsDef to tell if a name is a definition by @mvdan in c486bc3
  • encoding/jsonschema: remove unused state.value method by @mvdan in 14a7236
  • cue/literal: properly include hashes in escape sequences in bytes by @mvdan in d21fac3
  • cue/literal: add test case for lossy bytes quoting by @mvdan in d8c663c
  • cmd/cue/cmd: alias cue help experiment by @rogpeppe in 5432a20
  • internal/encoding/gotypes: handle CUE import aliases and duplicates by @phoban01 in ba534b5
  • all: run cuetxtar garbage collection by @rogpeppe in 3e1e769
  • internal/cuetxtar: implement garbage collection by @rogpeppe in a3eb068
  • cue/ast: rename NewLabel to NewStringLabel by @mvdan in 869b034
  • cue/build: remove the Instance.Match field, which was never set by @mvdan in dc3731d
  • cue/literal: use Form.tripleQuote when quoting a string by @mvdan in af175ed
  • cue/ast: remove commented out bits of code by @mvdan in ed355b0
  • internal/core/compile: properly quote labels in error message paths by @mvdan in 01181e9
  • cue/testdata: add a test case for quoting paths in evaluator errors by @mvdan in 08d34f9
  • cue/format: remove unnecessary IsDefOrHidden check by @mvdan in 0010744
  • encoding: use ast.StringLabelNeedsQuoting by @mvdan in a73e4cd
  • cue/ast: add StringLabelNeedsQuoting by @mvdan in 1f88e1a
  • internal/cuetdtest: consider the first item in a Matrix to be default by @rogpeppe in 1bc296c
  • cue/stats: use ResolveDep in arithmetic by @rogpeppe in 37ebf7e
  • cue/testdata/basicrewrite: use consistent spelling for "diff/explanation" by @rogpeppe in 8332fd5
  • internal/core/adt: "write" stats file even when it isn't changing by @rogpeppe in 1873f84
  • lsp/cache: be robust for nil file content by @cuematthew in ec216cf
  • cue/parser: use more robust logic for detecting the end of an interpolation by @rogpeppe in afdde34
  • cue/parser: add test case for string interpolation edge case by @rogpeppe in 276bcce
  • cue/scanner: document how interpolations work by @rogpeppe in 7e9543b
  • update all dependencies by @mvdan in 5944fee
  • lsp/definitions: add support for the self experiment by @cuematthew in d4f9bfb
  • lsp/definitions: completions from dot should be zero width by @cuematthew in 5c15642
  • lsp/cache: prevent files from being both standalone and module/package by @cuematthew in 9357acf
  • cue/ast: tweak ParseImportPath to treat :pkgname as .:pkgname by @mvdan in 0a41be8
  • cmd/cue: add a test case for the recent :pkgname CLI argument regression by @mvdan in a880c06
  • lsp/cache: add support for standalone files by @cuematthew in 632f9b7
  • internal/lsp: refactoring by @cuematthew in ab67c05
  • cue/load: respect package qualifiers when matching wildcard packages by @rogpeppe in a862f84
  • cue/loader: add test for issue 4110 by @rogpeppe in 36bcb3e
  • internal/core/adt: add Kind.AllKinds and Kind.Count methods by @rogpeppe in 313e0c1
  • internal/export: cater for NodeLink by @rogpeppe in b2a7b29
  • cue: add test for issue 4093 by @rogpeppe in 47dab36
  • cmd/cue: simplify when printing imported CUE schemas by @mvdan in 16118b3
  • encoding/xml/koala: use ast.NewLabel by @mvdan in 880df5b
  • internal/encoding/yaml: use cue/ast.NewLabel by @mvdan in 43c8a39
  • cue/ast: introduce NewLabel helper for regular fields by @mvdan in 8561bce
  • cmd/cue: remove debug print in get go by @mvdan in 91d2572
  • internal/core/convert: use reflect.Value iterator methods by @mvdan in be9298b
  • internal/core/adt: improve structure sharing for _ by @mpvl in 458b038
  • internal/ci: update various action dependencies by @mvdan in 79e9f72
  • swap gopkg.in/yaml.v3 for go.yaml.in/yaml/v3 by @mvdan in 2502321
  • cue/load: add test case for the fixed issue 741 by @mvdan in b74aa03
  • all: consistently split test table structs by @mvdan in 43fd8bc
  • internal/core/adt: make Vertex.Elems return an iterator by @mvdan in e95b0f9
  • cue: deduplicate work from adt.Vertex.Elems by @mvdan in 258881a
  • all: swap len([]rune(s)) for utf8.RuneCountInString(s) by @mvdan in 2de87fb
  • cmd/cue: remove the last use of sh in testscripts by @mvdan in 25d062b
  • doc/ref/spec.md: some formatting and typo fixes by @mpvl in 139b17a
  • doc/ref/spec.md: support unary == bound by @mpvl in 3500cef
  • doc/ref/spec.md: support comparing values of different types by @mpvl in c356290
  • internal/cueexperiment: make keepvalidators stable by @mpvl in c9da2b2
  • cmd/cue: include global experiments in experiment help by @mpvl in 062fc5b
  • internal/cueexperiment: standardize experiment lifecycle system by @mpvl in 9867177
  • cmd/cue: added cue help experiments command by @mpvl in f1feade
  • internal/core/adt: accept structcmp experiment by @mpvl in 8572198
  • cue: implement "self" by @mpvl in 28641c0
  • cmd/cue: test the handling of interrupt signals by @mvdan in 8e34149
  • cmd/cue: treat top-level incomplete errors consistently by @mpvl in 26efa72
  • cmd/cue: add test for issue 4079 and 4029 by @mpvl in 07635e5
  • cue/testdata: add fixed test case for issue 3743 by @mvdan in bae3189
  • cmd/cue: add test for issue 4005 by @mpvl in 1fc8f9d
  • internal/core/adt: show all user errors by @mpvl in 519b41f
  • internal/core/adt: add test for Issues 3983 and 3984 by @mpvl in ada7c5a
  • internal/core/debug: prevent stack overflow by @mpvl in 59ed403
  • internal/core/debug: remove use of compact printer type by @mpvl in 9ad4116
  • lsp/definitions: Add support for explicit-open by @cuematthew in cbb9e94
  • .claude: wildcards are only supported at the end of a command by @mvdan in 64f9a26
  • cmd/cue: stop using an internal test package by @mvdan in 1c4b8f6
  • Revert "cmd/cue: use os/signal.NotifyContext for the root command context" by @mvdan in 1061fcd
  • cue: add Path.Append method by @mpvl in 9ddc9b8
  • internal/task: factor out task function creation by @mpvl in 4336f31
  • tools/flow: make running variable more robust by @mpvl in c87a88b
  • tools/fix: implement __closeAll wrapper insertion by @mpvl in c5f9ed8
  • internal/core/export: disable pivotter for data output by @mpvl in a964aef
  • internal/core/adt: avoid computing duplicate dependencies by @mpvl in f545420
  • internal/core/dep: add test for Issue #4064 by @mpvl in c5f1aa9
  • internal/core/dep: keep track of number of dependencies computed by @mpvl in 7ebdd14
  • internal/core/adt: reuse allocations of source-less booleans by @mvdan in 2135d16
  • internal/core/adt: re-enable TestScheduler by @mvdan in fbc7d36
  • lsp/server: make formatter be a noop if result is unparsable by @cuematthew in 1b05645
  • lsp/server: add test to show bad formatting by @cuematthew in 3e45a4d
  • update cobra and pflag dependencies by @mvdan in 0667e66
  • update golang.org/x/... dependencies by @mvdan in fff2509
  • internal/ci: upgrade to actions/setup-go@v6 by @mvdan in 467726a
  • internal/ci: update versions of Go and goreleaser for alpha.1 by @mvdan in a486317
  • cue/token: clarify docs on printable positions by @mvdan in 8799675
  • internal/lsp: implement hover by @cuematthew in 723e0de
  • lsp/cache: refactor and reduce duplication by @cuematthew in cd1a950
  • lsp/cache: prevent infinitely loading the same package by @cuematthew in 20531e1
  • internal/core:adt: don't report errors beyond disjunction boundary by @mpvl in e999d98
  • internal/core/adt: revert "report comprehension error at task level" by @mpvl in 58e6f08
  • internal/core/adt: report comprehension error at task level by @mpvl in d77101d
  • internal/core/adt: add tests for Issue 4055 and 4056 by @mpvl in 9ce1ae1
  • internal/core/adt: disable part of memory reclamation for disjunctions by @mpvl in a6fa43f
  • internal/core/adt: start clean up of IsClosedStruct by @mpvl in 7ceab16
  • cue: compile/erralias.txtar no longer stack overflows on evalv3 by @mvdan in 8e0b5ae
  • all: clean up #skip-v2 txtar lines by @mvdan in bca58a4
  • internal: remove "dev" test matrices by @mvdan in b6fed6e
  • cue/errors: omit non-printable positions from Positions by @mvdan in c7831b9
  • cmd/cue: add a test showing how we can print empty positions by @mvdan in c9a076f
  • cue/errors: use cue/token.Pos.Compare directly in approximateEqual by @mvdan in 3058193
  • pkg/strconv: CUE_UPDATE=1 go test by @mvdan in 6519da0
  • internal/lsp: cope with symlinks and files being deleted by @cuematthew in 3883a78
  • cue: remove more unnecessary evalv3 test skips by @mvdan in 2957497
  • cue: remove todoV3 for a Syntax test with a structural cycle by @mvdan in 4830d30
  • cue: remove the long-deprecated ResolveReferences option by @mvdan in e8f4d93
  • internal/core/adt: add test for issue #4001 by @mpvl in 881c5f1
  • internal/core/compile: fix stack alignment for let references by @mpvl in 3de5c17
  • cmd/cue: increase the cmd_after sleep before printing a timestamp by @mvdan in ee222d3
  • internal/core/export: add tests for Issue #4051 by @mpvl in a30ff33
  • internal/core/compile: add option to print expressions in let references by @mpvl in b97a8db
  • internal/core: remove some parallel tests by @mpvl in 335d306
  • cue/parser: remove all users of FromVersion by @mvdan in 38ec6b8
  • internal/core/dep: don't do typo checks for dependency analysis by @mpvl in 9110e72
  • internal/core/adt: gate openDebugGraph on debug flag by @mpvl in 3ea1abe
  • internal/core/adt: pass flags through as is by @mpvl in 3e7dc44
  • internal/core/adt: refactor flags passed to unify by @mpvl in 7065726
  • internal/core/adt: make combinedFlags public by @mpvl in af2083a
  • internal: remove old mechanism to track CUE language versions by @mvdan in d1f6273
  • internal/lsp: implement LSP Completion by @cuematthew in 6beee33
  • lsp/cache,lsp/fscache,lsp/server: always use a non-nil AST by @cuematthew in a1d0472
  • internal: move SetPackage to cmd/cue/cmd.setPackage by @mvdan in 0434db5
  • internal/core/compile: implement __closeAll builtin by @mpvl in 2b8b299
  • tools/fix: add TestX for quick tests by @mpvl in 6d6ff15
  • cmd/cue: add cue mod upgrade and --exp flag for fix by @mpvl in 0070ee7
  • tools/fix: add experiment and upgrade support by @mpvl in af6c567
  • internal/cueexperiment: add experiment validation and lifecycle API by @mpvl in d442e3a
  • lsp/definitions: correct modelling of ellipses by @cuematthew in 80231f2
  • lsp/definitions: add test showing broken behaviour by @cuematthew in 2061b79
  • internal: move ListEllipsis to internal/core/compile.listEllipsis by @mvdan in ae9f86a
  • internal: move MergeDocs to internal/core/export.mergeDocs by @mvdan in 4e71090
  • internal: move EmbedStruct to encoding/jsonschema.embedStruct by @mvdan in 859b546
  • internal: move IsEllipsis to cue/format.isEllipsis by @mvdan in 0f64f5d
  • internal/core: implement #A... by @mpvl in faed5e0
  • cue/parser: test use of ... with wrong version by @mpvl in b523734
  • cue/parser,cue/format: implement PostfixExpr parsing and formatting by @mpvl in c6ca3e0
  • internal: move ErrInexact to internal/core/subsume by @mvdan in cd50fd0
  • internal: ConstraintToken is no longer necessary by @mvdan in 18f3952
  • lsp/cache: be tolerant of unknown imports by @cuematthew in 55e8ce9
  • internal: remove ErrIncomplete, which was read once but never set by @mvdan in 3efa36a
  • cmd/cue-ast: always print the ast if it exists by @cuematthew in 74ef4d2
  • internal: inline the only use of NewAttr by @mvdan in 36a56d2
  • cue/ast: add PostfixExpr AST node for postfix operators by @mpvl in 1bc2d90
  • cmd/cue: abort get go on any syntax or type errors by @mvdan in b311ec4
  • cmd/cue: tweak get go error tests to actually do what they say by @mvdan in 3995d69
  • CONTRIBUTING: fix links spotted by xurls -fix by @mvdan in a8ef9bc
  • cmd/cue: re-enable skipped cue get go test with broken go:embed by @mvdan in 5e7885d
  • cue/load: simplify DefaultTagVars code a bit by @mvdan in bcb48b3
  • encoding/protobuf: support decoding fully qualified references by @hiporox in aa2b7a6
  • internal/core/adt: remove check by @mpvl in e2b9c0d
  • cue/ast: add a TODO as a reminder to remove deprecated Field fields by @mvdan in 331b88b
  • cue/ast: deprecate File.Imports in favor of File.ImportSpecs by @mvdan in ff529b7
  • cue/ast: introduce File.ImportSpecs by @mvdan in f3ad21b
  • all: replace uses of cue/ast.File.VisitImports with ImportDecls by @mvdan in b523454
  • internal/golangorgx/tools/testenv: remove unnecessary package by @mvdan in 07ed0ce
  • encoding/toml: fix decoding subtable duplicate keys by @theoretick in 343456a
  • cue/ast: introduce an iterator version of File.VisitImports by @mvdan in ad08a6b
  • cue/load: clarify semantics of Dir with Overlay by @mvdan in 506578a
  • encoding/protobuf: don't require google/protobuf files on disk by @hiporox in 8d98b1c
  • cmd/cue: use os/signal.NotifyContext for the root command context by @mvdan in 6334f7f
  • internal/ci/checks: improve @-mention comments by @jpluscplusm in 3e063a7
  • cue/ast/astutil,internal/core/toposort: remove unused code by @mvdan in adc29dd
  • re-enable staticcheck's S1008 check by @mvdan in a7ba537
  • internal/golangorgx/tools/xcontext: replace Detach with context.WithoutCancel by @mvdan in 1118c02
  • internal/golangorgx/tools/fuzzy: remove another unused package by @mvdan in b168c3c
  • internal/golangorgx/gopls/util/constraints: remove another unused package by @mvdan in dd1b8df
  • internal/golangorgx/tools/proxydir: remove another unused package by @mvdan in b3707ad
  • internal/golangorgx/gopls/version: remove another unused package by @mvdan in 1fec68d
  • internal/golangorgx/tools/memoize: remove another unused package by @mvdan in e6c9e27
  • cue/token: correct out-of-bounds token offsets and positions by @cuematthew in 0b2faae
  • lsp/definitions: detect new nodes more efficiently by @cuematthew in c68d9ad
  • internal/golangorgx/tools/versions: remove as an unused package by @mvdan in fa7625d
  • internal/golangorgx/tools/gocommand: remove as an unused package by @mvdan in 8949907
  • lsp/definitions: fix forward references via explicit unification by @cuematthew in 1eff22f
  • lsp/definitions: add test showing bad behaviour by @cuematthew in 45af799
  • cue/parser: consistent double-underscore validation by @mpvl in 978fc1e
  • encoding/openapi: fix "allOff" misspelling by @rogpeppe in a77f90c
  • encoding/openapi: attempt round-trip of generated OpenAPI schema by @rogpeppe in c7bd41c
  • lsp/definitions: canonicalise import path during resolution by @cuematthew in 4f7461a
  • lsp/definitions: add tests for bad imports by @cuematthew in 180b162
  • lsp/cache: Only reformat CUE files if they have no syntactic errors by @cuematthew in 710d9e5
  • lsp/server: add test to demonstrate bad formatting by @cuematthew in 445d741
  • lsp/fs_cache: cache the parsing error as well as the ast by @cuematthew in db451cd
  • lsp/cache: Add support for old module system by @cuematthew in a070a4a
  • lsp/definitions: add test for definition definitions by @cuematthew in f2ba1a2
  • lsp/definitions: correct evaluation of comprehensions by @cuematthew in 70f9753
  • lsp/definitions: Add test for broken for- and let-comprehensions by @cuematthew in 829997b
  • lsp/definitions: Improve resolution of fields inline expressions by @cuematthew in 53e2d0a
  • lsp/definitions: add tests for broken behavior by @cuematthew in fac115c
  • lsp/server: allow server to be initialized with zero workspace folders by @cuematthew in ae03d29
  • lsp/cache: Do not rely on import paths being unique by @cuematthew in 542de3a
  • lsp/cache: Override the registry Fetch method within LSP by @cuematthew in 9880749
  • lsp/cache: Add failing test by @cuematthew in 8d73712
  • mod/modimports: errors from parsing are not terminal and are captured by @cuematthew in 948b921
  • internal/core/adt: better doc comment for OpContext by @rogpeppe in 66d6226
  • cmd/cue/cmd: fix CRD imports by @rogpeppe in e3445f0
  • cmd/cue/cmd: add vet to CRD test by @rogpeppe in ed18339
  • internal/core/adt: fix panic on uninitialized vertex in attemptOnly mode by @mvdan in 15d1982
  • cmd/cue/cmd: skip TestVersion if VCS information is not stamped by @mvdan in 84dd9df
  • lsp/definitions: Make field keys resolve to themselves by @cuematthew in bfd487f
  • encoding/openapi: deprecate Gen by @rogpeppe in 2bf0bd5
  • cue/errors: cleanups by @rogpeppe in 02cd8d7
  • all: simplify iterating over reflect and go/types lists by @mvdan in 6b7cdcd
  • internal/vcs: remove SYSTEMROOT workaround for Windows by @mvdan in 4adf74c
  • internal/intset: delete this no-longer-used package by @mvdan in 8cfc2a0
  • internal/cueconfig: use omitzero for RegistryLogin.Expiry by @mvdan in f83cf7b
  • cmd/cue: rip out the VCS-based version logic by @mvdan in 80884df
  • cmd/cue: test cue version outside of testscript by @mvdan in 043b7de
  • encoding/jsonschema: remove evalv2 from test data by @rogpeppe in a2eed32
  • cue/interpreter/embed: add allowEmptyGlob option for globs by @rogpeppe in e09bac9
  • encoding/jsonschema: flip the character class tests on for Go 1.25 by @mvdan in 5f50884
  • cmd/cue: replace os.Chdir with testing.T.Chdir in tests by @mvdan in d405769
  • all: rely on go get -tool now that we require Go 1.24 or later by @mvdan in d40cfd3
  • all: require Go 1.24 or later, release on 1.25 by @mvdan in f2abd00
  • lsp/definitions: goto-dfn on an import spec jumps to that pkg by @cuematthew in 919aeb4
  • cmd/cue: include full gengotypes warning prefix by @jpluscplusm in 26ca4d3
  • internal/core/adt: fix dependency issue by @mpvl in 0fde6c8
  • internal/core/adt: add test for dependency issue by @mpvl in f5f9ae3
  • internal/core/adt: remove unused StructLit fields by @mpvl in ba43e9f
  • Revert "mod/modregistry: mirror referrers in Client.Mirror" by @rogpeppe in 66211bf
  • internal/core/adt: ensure a node is initialized by @mpvl in ccc44aa
  • internal/core/adt: promote some evalv3 results to "golden" by @mpvl in 2424234
  • internal/core/adt: note that envDisjunct.src is unused via a TODO by @mvdan in d7b32c7
  • encoding/json: export JSON Pointer functions by @rogpeppe in 01a745a
  • mod/modregistry: mirror referrers in Client.Mirror by @rogpeppe in e402d77
  • internal/core/adt: use stringer for two more types by @mvdan in d782e0b
  • internal/core/adt: add a TODO about the parent in newInlineVertex by @mvdan in cc7e9a4
  • encoding/jsonschema: add ExtractedCRD.VersionToPath by @rogpeppe in 4dfe192
  • pkg/strconv: make ParseUint work with unlimited size ints by @rogpeppe in f607070
  • internal/core/adt: deduplicate code handling lower and upper bounds by @mvdan in 0bcb56d
  • internal/core/adt: fix a few godocs to align with the declared names by @mvdan in 41c09d5
  • internal/core/adt: remove duplicate package docs by @mvdan in 8893db5
  • lsp/cache: reduce column number by 1 if jump-to-definition produces no results by @cuematthew in fef46d9
  • lsp/definitions: do not ever call eval before all fields are established by @cuematthew in 7fb2146
  • lsp/definitions: flatten tests by @cuematthew in d858fb3
  • lsp/definitions: implement ability for jump-to-dfn to switch package and module by @cuematthew in 2ddc6de
  • lsp/cache: create modules and packages when demanded by modpkgload by @cuematthew in 31dc91e
  • internal/lsp: wire up jump-to-dfn by @cuematthew in 895f15c
  • lsp/definitions: add analysis to determine resolution of idents by @cuematthew in 5b5cf18
  • pkg/strconv: fix Atoi and ParseInt to handle unlimited precision integers by @rogpeppe in 54a8330
  • internal/core/adt: fix concreteness check by @mpvl in 1fcd2a3
  • internal/core/adt: add tests for 3993 by @mpvl in d3cf5b3
  • internal/core/adt: clarify n.reqSets is a buffer by @mpvl in 5d9d0bb
  • internal/core/adt: add tests for Issue 4020 by @mpvl in 8d60816
  • internal/core/adt: remove Specialize methods by @mvdan in 28455c7
  • internal/core/adt: remove Environment.evalCached by @mvdan in fb72538
  • internal/core/adt: apply evalv3 TODO in updateListType by @mvdan in 8230c13
  • internal/core/adt: remove StructMarker.NeedClose by @mvdan in ceeef0f
  • internal/core/adt: fix initArcs for errors in optional fields by @mpvl in dd5aacf
  • internal/core/adt: add tests for Issue 4022 by @mpvl in e7d914a
  • internal/core/adt: remove OpContext.optionalMark by @mvdan in d9a9f7b
  • internal/core/adt: remove CloseInfo.IsClosed by @mvdan in 88adc22
  • internal/core/adt: remove StructInfo.Disable by @mvdan in 34592cd
  • internal/core/adt: remove CycleInfo.Inline by @mvdan in 5657913
  • internal/core/adt: disable OpContext.toFinalize by @mvdan in b33c0f5
  • internal/core/adt: remove OpContext.inDisjunct by @mvdan in a2c445b
  • internal/core/adt: remove disjunct.isDefault by @mvdan in 49b8b29
  • internal/core/adt: remove nodeContext.conjuncts by @mvdan in bebae29
  • internal/core/adt: actually set nodeContext.kindID by @mvdan in c40a3f9
  • internal/core/adt: remove a piece of code in isFinal only needed for evalv2 by @mvdan in 5310686
  • internal/core/adt: remove a piece of code in isClosed only needed for evalv2 by @mvdan in e02b962
  • internal/cueexperiment: deprecate the evalv3 flag by @mvdan in 40e1595
  • cmd/cue/cmd: use ParseInt with 64 bit size in cmd_after testdata by @folliehiyuki in 08f7564
  • internal/adt/core: improve validation error positions by @mpvl in 6e2b1df
  • internal/core/adt: use cuetdtest for TestValidate by @mpvl in 4389bff
  • internal/core/adt: add missing dereference by @mpvl in 889734f
  • pkg/net: add ip arithmetic functions by @takonomura in f374d29
  • internal/core/adt: add tests for 4011 by @mpvl in ae34585
  • all: remove some more unused code found by staticcheck by @mvdan in fd7eec8
  • internal/core/adt: add more error positions by @mpvl in a293c62
  • encoding/xml/koala: remove trailing whitespace by @mpvl in 441eab3
  • internal/core/adt: remove unused nodeContext fields by @mpvl in 4b8d8d6
  • internal/core/adt: remove some Vertex-related fields by @mpvl in 34a8732
  • internal/core/adt: remove EvalV2 optional tracking by @mpvl in 216b1c0
  • internal/core/adt: remove obsolete CloseInfo methods by @mpvl in 54603d1
  • internal/core/adt: remove EvalV2 closeInfo remnants by @mpvl in f0cc63b
  • tools/trim: remove EvalV2 trim implementation by @mpvl in dbc027a
  • internal/core/adt: remove unused Vertex fields by @mpvl in 8bcd577
  • internal/core/adt: remove unused nodeContext fields by @mpvl in 536ab5a
  • internal/core/adt: remove EvalV2 remnants by @mpvl in 240b79d
  • ai: document cueckoo runtrybot command by @mpvl in c996280
  • internal/core/adt: remove EvalV2-specific code by @mpvl in dfb0f39
  • internal/core/adt: set right version for test by @mpvl in 29544b4
  • internal: remove EvalV2 from public API and runtime by @mpvl in ed13739
  • internal/cuetdtest: remove evalv2 from default matrixes by @mpvl in b0dcdba
  • cue: turn of some tests for evalv2 by @mpvl in 2ae3ec2
  • cmd/cue/cmd: remove EvalV2-specific tests by @mpvl in 3eef82c
  • internal/cuetdtest: remove support for evalv2 by @mpvl in fa08400
  • internal/core/adt: detect non-cycle by @mpvl in a622559
  • internal/core/adt: fix cycle for structural cycles by @mpvl in e44ffe8
  • internal/core/adt: add tests for issue 3940 and 3990 by @mpvl in fbbee4d
  • ai: add more commands allow list by @mpvl in 25f71ea
  • internal/core/subsume: use errors.Details instead of single error by @mpvl in 1630b49
  • internal/core/subsume: remove explicit test indices by @mpvl in 5d07944
  • internal/core/subsume: convert to cuetdtest framework by @mpvl in fe3d72f
  • internal/core/subsume: use error strings in tests by @mpvl in 0ad768e
  • internal/core/subsume: reformat struct fields by @mpvl in 59b4253
  • internal/ci: drop the use of ns-linux aliases by @mvdan in 9bd14b4
  • ai: set coAuthoredBy in settings by @mpvl in e6d8175
  • internal/ci: have the dispatch and trigger workflows use a separate cache by @mvdan in d7a0e58
  • internal/ci: drop use of setup-buildx-action by @mvdan in 7c21401
  • internal/ci: require that workflow names be unique by @mvdan in de5c77e
  • internal/cueversion: bump LanguageVersion to v0.15.0 by @mvdan in abf08f2
  • internal/core/adt: fix ellipsis strictness issue by @mpvl in 8729327
  • internal/core/adt: add tests for #4015 by @mpvl in 4350895
  • lsp/cache: don't return cue errors to client by @cuematthew in 49b8de5
  • internal/robustio: mark sleeping test as long by @mvdan in 93337b3

Don't miss a new cue release

NewReleases is sending notifications on new releases.