github cue-lang/cue v0.17.0-alpha.1

pre-release3 hours ago

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

Language

The active try experiment renames the new fallback keyword, used with for comprehensions, to otherwise. fallback continues to be accepted for now, but is rewritten to the new form.

The active aliasv2 experiment now allows ~(X) as an alternative to ~X for the single postfix alias form. ~X is also rewritten as ~(X) for the sake of consistency and clarity.

Language versions v0.17.0 and later allow omitting commas in multi-line lists. Just like a newline after a struct field implies a comma, a newline after a list element now implies a comma as well.

The language spec is tweaked to make $ a valid identifier, which was already allowed by the parser and evaluator.

⚠️ Support for the infix div, mod, quo, and rem operators has been removed. Since late 2020, these infix forms have been undocumented and rewritten by cue fix to the new function calls.

The new shortcircuit experiment

This release introduces the shortcircuit experiment, which changes the && and || operators to not evaluate the right operand if the left operand alone determines the result.

This matches the behavior already documented in the CUE spec and is consistent with most mainstream languages, but for the sake of a smooth transition for end users, we are rolling out this change via an experiment.

You can try this experiment via the @experiment(shortcircuit) file attribute. To mimic the old behavior with the experiment, you can use a hidden field:

_y: Y
if X && _y {}

Evaluator

Fix a number of issues where cue def could produce invalid CUE output, such as due to name conflicts.

Fix an evaluator regression where embedded disjunctions across packages may not correctly apply closedness.

Fix an evaluator bug where cue.Context.BuildExpr of close({}) did not actually result in a closed struct.

Fix a bug where some calls to standard library functions or validators did not include the "error in call to pkg.Func" error context, or included it twice.

A few changes to the evaluator should reduce allocated objects by up to 16%, reducing GC overhead and memory usage.

cmd/cue

The new global -C or --chdir flag runs cue from the given working directory.

cue import --path now skips over null values in an input stream, such as empty documents in a YAML file.

The new cue exp gengotypes --outfile flag controls the output file path when generating a single package.

LSP server

Add an initial version of organize-imports, which sorts the existing imports and removes unneeded imports. It is not yet capable of suggesting missing imports.

Wait for a short period of inactivity before sending diagnostics to the editor. This "debounce" means that a user typing incomplete CUE syntax will not be distracted with syntax errors as much.

The aliasv2 experiment is now fully supported.

The rename function is fixed to distinguish between field names and aliases.

Improve field name analysis in general so that fields with multiple aliases (e.g. v=[k=string]: _) are properly supported.

Improve attribute handling for file-level embedded attributes, and to attach attributes within expressions to the correct struct.

Treat conjunctions (&) and disjunctions (|) the same way for goto-definition. With the cursor on a path, it returns all results that the path MAY resolve to. With the cursor on a field declaration name, it returns all results that the path constructed from the field's name, and its field's name (and so on) MAY resolve to.

Special-case close function calls so that paths can resolve through fields within the argument to close.

Encodings

The JSON Schema decoder is improved to better handle the prefixItems keyword.

The JSON Schema encoder is improved to support list.UniqueItems and standalone validators, to use maxItems and minItems instead of maxLength and minLength for lists with prefix elements, and to generate description keywords for doc comments.

Standard library

The net IP APIs now consistently return an error on invalid input types.

strconv.FormatFloat now accepts a string format parameter, like FormatFloat(3.14, "e", 4, 64).

list.MatchN now shows what expected value it's matching against when it fails.

Go API

Using cue.Values concurrently is now fully supported, which required deprecating cue.Value.Context. If you encounter any races or bugs, please report them.

cue/load now supports loading from an io/fs.FS, as outlined in proposal #4285. Loading file embeds through Config.Overlay and Config.FS is supported now as well.

cue/ast/astutil deprecates Sanitize in favor of the new SanitizeFiles API, given that Sanitize on a single file cannot know if another file in the same package shadows builtin names like self.

Clarify that cue/format indents with a tab width of 4 by default.

A new fuzzer has been introduced in the cue package, checking that the parser doesn't crash and that its results are consistent with the rest of the Go APIs like cue/literal. So far, it has already resulted in seventeen bug fixes.

The cue.Interpreter option API has been deprecated in favor of cue.WithInjection, which is a better name going forward.

⚠️ cue/ast.File.Imports, deprecated in mid 2025 in favor of cue/ast.File.ImportSpecs, is now removed.

⚠️ The long-deprecated and hidden cue.Instance methods Lookup, LookupDef, LookupField, and Fill are now removed.

Full list of changes since v0.16.0
  • internal/ci: bump Go and goreleaser versions for v0.17.0-alpha.1 by @mvdan in d11a8f8
  • cue/ast/astutil: deprecate Sanitize in favor of SanitizeFiles by @mvdan in 89b80ad
  • cmd/cue/cmd: add regression test for hidden fields like _5 by @mvdan in 1ed8051
  • cmd/cue/cmd: add regression test for vet list.Contains errors by @mvdan in c2f7338
  • update dependencies ahead of v0.17.0-alpha.1 by @mvdan in 03f2868
  • cue/testdata/cycle: add test for issue #4253 by @mvdan in f31ac4d
  • encoding/ini: introduce an INI decoder by @ReginaZhangMS in e5482ee
  • cue/load,internal/mod/modpkgload: respect nested cue.mod boundaries by @mvdan in de61149
  • all: use slices and maps iterators for collect-and-sort patterns by @mvdan in 8345fc2
  • cmd/cue/cmd: document wrong nested-module behavior for issue 2707 by @mvdan in 8ff6cee
  • all: use strings.SplitSeq and strings.Cut to avoid intermediate slices by @mvdan in 1ea5ad5
  • all: fix stray and misplaced doc comments by @mvdan in 64eaf2f
  • cue/inject/embed: resolve files via cue/load.Config's FS or Overlay by @mvdan in b0ce1f5
  • internal/core/export: sanitize Profile.Value output by @mvdan in d846deb
  • cue: add regression test for predeclared builtin shadowing in %v by @mvdan in 6040780
  • cmd/cue: list user-defined commands in cue cmd --help by @mvdan in fbcd9f7
  • internal/core/export: mark predeclared builtin references as such by @mvdan in d3187e5
  • internal/core/export: add test for predeclared builtin shadowing by @mvdan in 922493a
  • internal/core/adt: fix conjunction semantics for opened embeddings by @mpvl in 619d46e
  • tools/fix: extract and extend explicitopen fix by @mpvl in 349c457
  • cmd/cue: add -C flag, like go and git by @mvdan in 079f1a3
  • internal/core: __reclose: detect and restore non-recursive closing by @mpvl in 3091146
  • tools/fix: add inline @test framework by @mpvl in f679d39
  • cue/ast/astutil: detect aliasv2 postfix label-name redeclarations by @mvdan in 27b5e67
  • cue/ast/astutil: add test coverage for redeclared alias errors by @mvdan in 6d45692
  • internal/core/adt: document why toComplete hook must stay by @mpvl in 5ae2c12
  • internal/core/adt: remove completeNodeTasks from doDisjunct by @mpvl in a6b5a9f
  • internal/core/adt: strengthen field-set and arc-type checks by @mpvl in 5750aa5
  • .claude: remove deny clause by @rogpeppe in aa0b641
  • encoding/jsonschema: support description keyword by @rogpeppe in 70043a5
  • cue: allow and enforce parens for single postfix alias by @mpvl in d05d75f
  • internal/core/adt: remove dead code in process and evalStateCI by @mpvl in 1ebe938
  • internal/core/adt: fix error propagation bug in inline structs by @mpvl in 881d9cf
  • internal/core/adt: remove support for list task dependencies by @mpvl in 75af110
  • internal/core/adt: remove taskPos field from scheduler by @mpvl in 003a182
  • internal/core/adt: add handleParents and processAncestors by @mpvl in 61fb61b
  • cue/ast/astutil,tools/fix: add cross-file shadowing detection for predeclared identifiers by @mpvl in e249168
  • .gitignore: ignore .gocache by @mpvl in 09c0a65
  • internal/core/adt: streamline task equality checking by @mpvl in 24446ee
  • internal/core/adt: get rid of schedFINALIZING by @mpvl in fd21f07
  • internal/cueexperiment: add ShortCircuit experiment by @mpvl in 7946990
  • cue/format,fix: handle trailing commas in lists by @mpvl in 0fdc3b3
  • cue/parser: allow omitting commas in lists by @mpvl in 70a9648
  • Revert "internal/core/adt: remove now-unnecessary panic workaround" by @mvdan in 1b32beb
  • internal/lsp: add toggle surrounding struct braces code action by @myitcv in cb4bd6a
  • internal/core/adt: unify builtin-range matching under MatchBuiltinRange by @mvdan in 99c9c5c
  • internal/core: render predeclared ranged numeric types by name by @mvdan in ba93a23
  • cmd/cue: add regression test for ranged numeric type names by @mvdan in 04f2c29
  • internal/core/debug: document Config fields by @mvdan in 8a3c77c
  • cue/testdata: re-test with CUE_UPDATE=1 by @mvdan in 8165de0
  • cue/load: support absolute directory paths as package args by @mvdan in c08ec6d
  • cmd/cue: test that package paths outside the module are rejected by @mvdan in af9f89b
  • cue/ast: add Interpolation.Quotes helper by @mvdan in f2dcaea
  • cue: remove long-deprecated and hidden Instance methods by @mvdan in 7efad27
  • all: allow newlines around interpolations in single-line strings by @mvdan in 35cefbf
  • cue/literal: reject trailing characters after SI multiplier by @mvdan in 6ed6b1e
  • cue: use %q rather than %s in fuzzing errors by @mvdan in fa30adf
  • cue/literal: reject NUL bytes in ParseNum by @mvdan in 728b6f6
  • cue/scanner: accept SI multiplier after a bare 0 by @mvdan in a00881d
  • cue/scanner: align raw quote lexing with cue/literal by @mvdan in a655ed1
  • cue/cuecontext: allow multiple injections for a given kind by @rogpeppe in 311bfa7
  • cue/scanner: fix greedy lexing of _ followed by | by @myitcv in e26d4a7
  • all: adopt cueckoo guidance SessionStart hook by @myitcv in 3ce5d41
  • CLAUDE.md: use cueckoo guidance as a base by @myitcv in 9802e5e
  • internal/cuetxtar: remove @test(leq) by @mpvl in a24e1f8
  • internal/cuetxtar: fix two inline runner bugs by @mpvl in 5f95d22
  • cue/testdata: convert txtar tests to inline @test format by @mpvl in 5fc6ae2
  • cue/testdata: add @test to cycle/issue3527 by @mpvl in 78a2962
  • cue/testdata: rename #todo:inline: markers by @mpvl in 32d96b5
  • internal/cuetxtar: add field coverage checking by @mpvl in 236f4eb
  • cue/ast: remove the deprecated File.Imports slice by @mvdan in 68d9c0b
  • cmd/cue: make tests pass with Go at tip (1.27) again by @mvdan in f1be256
  • internal/cuetxtar: use structural_cycle code by @mpvl in 96651e4
  • internal/cuetxtar: auto-manage out/errors.txt by @mpvl in 50022d1
  • internal/cuetxtar: merge permuteCount into permute directive by @mpvl in d0a9f9a
  • cue/testdata/benchmarks: convert to inline @test format by @mpvl in 59c78d5
  • internal/cuetxtar: simplify empty @test() by @mpvl in 3820643
  • cue/testdata/cycle: harder cases by @mpvl in 0de9845
  • cue/testdata: conversion of cases marked as "hard" by @mpvl in 9045f62
  • cue/testdata: more issue descriptions and links by @mpvl in 96b4a97
  • internal/core/export: fix infinite recursion in vertex() on cyclic BuiltinValidator by @mpvl in fbc8eaa
  • internal/cuetxtar: convert runner tests to txtar inline format by @mpvl in d3cd0d8
  • cue/testdata: add shareID annotations and fix pos= line numbers by @mpvl in 69a8bc6
  • internal/cuetxtar: handle field aliases in labelSelector by @mpvl in ca5b6d1
  • cue/testdata/comprehensions: manual corrections by @mpvl in 4cdd361
  • internal/cuetxtar: emit embedded scalars by @mpvl in 7e957c9
  • internal/cuetxtar: include definitions in list elements of @test(eq) by @mpvl in c2f87c5
  • cue/testdata/eval: manual corrections by @mpvl in d1f08be
  • cue/testdata/resolve: manual corrections by @mpvl in 9a8f69b
  • cue/testdata: convert remaining medium tests by @mpvl in 0fc9179
  • cue/testdata: convert disjunctions tests to inline @test format by @mpvl in 635c10b
  • cue/testdata: convert comprehensions tests to @test format by @mpvl in d2f6c3e
  • internal/cuetxtar: enhance @test(err) fill by @mpvl in 994cb28
  • cue/testdata: convert eval/ tests to @test format by @mpvl in 6fbe77c
  • internal/cuetxtar: fix two @test(err) bugs and unify validation logic by @mpvl in 2c81a10
  • mod/modregistrytest: add metadata capability by @rogpeppe in 97b4cd0
  • internal/cuetxtar: emit @test(err,...) annotation for error fields in eq fill by @mpvl in aa02a6d
  • internal/cuetxtar: add txtar test by @mpvl in dd2e03a
  • cue/testdata: force update cleanup by @mpvl in ea287c1
  • internal/cuetxtar: fill nested pos=[] by @mpvl in b8bbf50
  • pkg/tool/http: restore Do request header/trailer to accept single strings by @mvdan in c476e86
  • cmd/cue/cmd: use goproxytest.Setup for per-test proxy modules by @rogpeppe in 89bcf7a
  • cue/testdata: convert resolve/ tests to inline @test format by @mpvl in 97ee8d4
  • internal/cuetxtar: fix deduplication for at= directives by @mpvl in 58a3f02
  • internal/cuetxtar: extend shareID checks and fix path aliasing by @mpvl in edbf489
  • internal/cuetxtar: improve eq value formatter by @mpvl in 8e08414
  • internal/cuetxtar: split inline.go by @mpvl in ac993a2
  • cue/testdata: convert definitions/ tests to inline @test format by @mpvl in d7cb1b1
  • cue/testdata: convert definitions/ and comprehensions/ tests by @mpvl in 035331e
  • internal/cuetxtar: detect misplaced @test by @mpvl in 388b7b8
  • internal/cuetxtar: add custom eq formatter for hidden fields and disjunctions by @mpvl in 0890c56
  • internal/cuetxtar: fix hidden-field path handling in source AST walker by @mpvl in dc09eb7
  • internal/cuetxtar: restrict @test(allows) to struct/list by @mpvl in 6a50f74
  • internal/cuetxtar: improve @test(eq) formatting and body validation by @mpvl in 9f6b851
  • internal/cuetxtar: fix error message formatting by @mpvl in 9e38c54
  • internal/cuetxtar: add @test(allows, sel) directive by @mpvl in 4f32ebb
  • internal/cuetxtar: omit optional error fields in closed structs by @mpvl in 1cc2518
  • internal/cuetxtar: fix shared disjunction eq; add at= support by @mpvl in 83c2843
  • cue/testdata: convert choosedefault/ compile tests to use @test by @mpvl in d178621
  • cue/testdata: convert builtins tests to inline @test format by @mpvl in 592dd33
  • internal/cuetxtar: unify write-backs; strip test attrs from formatted values by @mpvl in 0096aed
  • internal/cuetxtar: fix error positions to reference original source by @mpvl in 2d88651
  • internal/cuetxtar: rename debugOutput to debug by @mpvl in ad75f35
  • internal/cuetxtar: fix debug attr formatting by @mpvl in 806d5cc
  • cue/testdata: add missing issue comments to txtar files by @mpvl in 54759dc
  • cue/testdata: add issue comments to txtar test files by @mpvl in c426c7f
  • cue/testdata: convert comparison, interpolation, list, and scalar tests to inline format by @mpvl in 748a3db
  • internal/cuetxtar: detect hidden/def fields in non-struct @test(eq) by @mpvl in 50f436a
  • doc/ref: treat "$" as a valid identifier in the spec by @mvdan in 658e2c5
  • cue/literal: reject triple quotes at line start in multiline strings by @mvdan in 52810f7
  • cue/testdata/fuzz: remove a file I added by accident by @mvdan in 531e826
  • cue: exempt preamble keywords from fuzzer's ParseFile vs ParseExpr check by @mvdan in 9f0aeee
  • cue/build, cue/load: add ModuleVersion field to build.Instance by @rogpeppe in 4c72d71
  • internal/core/runtime: rename Interpreter/Compiler to Injection/Injector by @rogpeppe in 6d814c7
  • internal/lsp: implement organise imports code action by @cuematthew in 70a104f
  • pkg/net: work around upstream idna bug breaking net.FQDN validation by @mvdan in f001187
  • pkg/net: add regression tests for net.FQDN with invalid domain names by @mvdan in 1e47014
  • internal: remove cuetest.Chunker by @mvdan in d574f75
  • internal/core/runtime: refactor ExtractAttrsByKind by @rogpeppe in 3798917
  • internal: replace ParseAttrBody with ParseAttr by @rogpeppe in 069f279
  • internal/core/export: fix hidden field visibility for anonymous pkgID by @mpvl in c87cd58
  • cue/literal: reject invalid UTF-8 in Unquote by @mvdan in dc8d0f7
  • cue/scanner: reject leading-zero integers followed by range operator by @mvdan in 88f4d9d
  • cue/parser: use named error return in ParseExpr to fix error loss on bail-out by @mvdan in f7464a8
  • cue: always check that ParseExpr doesn't panic in the fuzzer by @mvdan in 6aad43f
  • mod/modconfig: set DOCKER_CONFIG in tests to prevent hangs by @mpvl in 30718b7
  • cue/literal: reject literal NUL bytes in Unquote by @mvdan in 6ba6d06
  • cue: add Attribute.Args iterator by @rogpeppe in 856a378
  • cue: refactor attribute test by @rogpeppe in ed15be3
  • internal/core/path: remove unused internal package by @mvdan in 54c2b42
  • internal/copy: remove unused internal package by @mvdan in a84d23d
  • cue/literal: fix panic when parsing an empty string by @rogpeppe in aa9ec0f
  • internal/cuetxtar: fix astcmp for embedded scalars by @mpvl in b97865c
  • internal/cuetxtar: fix error message formatting by @mpvl in d55ba61
  • internal/cuetxtar: fix permuteCount lookup and log permutation count by @mpvl in 50a2f84
  • internal/cuetxtar: error on suberr without = by @mpvl in ba24b41
  • cue/parser: initialize experiments in ParseExpr by @mvdan in 2b939e8
  • cue/literal: reject invalid characters after digits in ParseNum by @mvdan in 9b4d4a4
  • cue/scanner: don't let bare \r prevent multiline string closing by @mvdan in 719111c
  • cue/scanner: refactor TestScan to use named fields and a want field by @mvdan in 470120e
  • internal/core/adt: stop comparing V3/V2 stats in TestEvalV3 by @mpvl in 288a9fd
  • internal/cuetxtar: fix CUE_UPDATE=force for eq by @mpvl in 34ded2f
  • internal/cuetxtar: report @test parse errors by @mpvl in b1846d7
  • internal/cuetxtar: add err:todo, incorrect, and p= modifiers by @mpvl in 6a8143b
  • cue/testdata: add issue headers and convert tests to inline format by @mpvl in 0ff6db1
  • internal/cuetxtar: fix pattern label comparison in @test(eq, ...) by @mpvl in 63752f9
  • internal/golangorgx: delete Go-specific analyzer infrastructure by @mvdan in f70cf43
  • lsp/eval: correct lsp evaluator for imports by @cuematthew in fae4cc7
  • internal/golangorgx: delete unused gopls protocol/command package by @mvdan in 8277362
  • cue/literal: reject consecutive underscores in numbers like the parser does by @mvdan in df4ddd9
  • cue/literal: reject leading-zero integers like the parser does by @mvdan in a31acf2
  • cue: fuzz invalid CUE source as well by @mvdan in 560ba4b
  • cue/scanner: reject multiline strings with non-matching whitespace by @mvdan in 0e01196
  • list: suggest MatchN for non-concrete values in Contains doc by @mxey in e21b59a
  • cue: add more entries to the fuzzing seed corpus by @mvdan in 0d9aef6
  • cue/literal: allow triple quotes inside multiline string content by @mvdan in 4bc27c4
  • cue/scanner: expand checkError to scan past interpolations too by @mvdan in fa9c31f
  • update the rest of the direct dependencies by @mvdan in b9b0210
  • update all golang.org/x/... dependencies by @mvdan in de8a97c
  • cue/testdata: re-test with CUE_UPDATE=1 by @mvdan in b06b49a
  • internal/lsp: support lazy code action edit resolution by @cuematthew in c28dcea
  • all: rename fallback keyword to otherwise by @mpvl in 58cc93c
  • pkg/list: improve error message for MatchN by @mxey in 1b8f058
  • cue/testdata: convert txtar tests to inline @test format by @mpvl in 9dd28f0
  • internal/cuetxtar: add hint= flag and unknown-flag validation to @test directives by @mpvl in 7d7052e
  • cue/testdata/eval: convert eval txtar tests to inline @test format by @mpvl in fcb5e33
  • internal/cuetxtar: fix @test(debugOutput) multiline string format by @mpvl in fc0e52b
  • internal/cuetxtar: simplify regression guard for @test(eq) mismatches by @mpvl in c882b03
  • internal/cuetxtar: require commas between pos= specs by @mpvl in b1f4929
  • internal/cuetxtar: add at=, pos= order-independence, and hidden field guards by @mpvl in a909542
  • internal/cuetxtar: add args= and suberr= to @test(err, ...) by @mpvl in 7a97228
  • internal/cuetxtar: support suberr=(...) in @test(err, ...) by @mpvl in aecf5fe
  • internal/cuetxtar: move error assertion code to inline_err.go by @mpvl in 1513726
  • internal/cuetxtar: support shareID assertions in inline tests by @mpvl in 953a252
  • cmd: fix link to issue 2031 by @mxey in c237724
  • internal/cuetxtar: document new @test directives by @mpvl in afc75bc
  • internal/cuetxtar: show ./ prefix in out/errors.txt paths by @mpvl in 3456ab0
  • internal/cuetxtar: fix inline loader by @mpvl in aac9498
  • cue/testdata: convert easy inline tests by @mpvl in 1c555aa
  • cue/testdata: convert issue2649 to inline by @mpvl in 6e5ebcf
  • internal/cuetxtar: support struct-embed form in @test(eq, ...) by @mpvl in a8dddff
  • cue/testdata: mark unconverted tests by @mpvl in 6e0f91c
  • cue/testdata: convert list/comprehension tests by @mpvl in f5c7dc5
  • internal/cuetxtar: detect @test in comprehensions by @mpvl in 5e6eac8
  • cue/testdata/basicrewrite: convert basic by @mpvl in 39c40b7
  • internal/cuetxtar: support multi-code errors by @mpvl in 3189d7f
  • internal/cuetxtar: add out/errors.txt section by @mpvl in 94e7ceb
  • cue/testdata: convert fulleval/resolve by @mpvl in aabdde7
  • cue/testdata: convert tests to inline @test annotations by @mpvl in 1f46fae
  • internal/cuetxtar: add validator and todo support by @mpvl in 5d1f99a
  • internal/cuetxtar: add inline test runner by @mpvl in d5ec6ca
  • lsp/eval: teach lsp to understand "close" by @cuematthew in 650c029
  • lsp/eval: add tests showing current behaviour for close calls by @cuematthew in 4fe6dcb
  • doc/ref: clarify the rule for preceding whitespace in multiline strings by @mvdan in 6c3186b
  • cue/scanner: reject underscores in string escape sequences by @mvdan in a3b2da7
  • cue/scanner: reject octal and hex escapes in string literals by @mvdan in 2fccd15
  • cue/literal: allow bare carriage return in single-line strings by @mvdan in 49e709a
  • lsp/eval: treat disjunctions the same as conjunctions by @cuematthew in d28c79a
  • internal/lsp: debounce sending non-empty diagnostics by @cuematthew in e3b45a0
  • cue/scanner: reject exponents with no digits by @mvdan in 286fbab
  • internal/pkg: rely on the adt package to wrap call errors by @mvdan in 9572fbc
  • internal/core/adt: implement BuiltinValidator equality by @mpvl in 801a74a
  • cue: teach the fuzzer to check against cue/ast and cue/literal by @mvdan in 7f20f3e
  • cue/scanner: reject closing quotes of multiline strings not after a newline by @mvdan in 2f87503
  • cue/scanner: reject __# as an invalid identifier by @mvdan in b1dc725
  • cue: teach the fuzzer to cover cue/format, ast.Walk, and astutil.Apply by @mvdan in 9a4eacf
  • cue: move fuzz_test.go from cue/parser and expand a bit by @mvdan in c1e6de6
  • protobuf/jsonpb: fix panic when decoding non-string bytes by @cuematthew in cdc175b
  • internal/core/convert: avoid allocating when checking for omitempty by @mvdan in f48f1de
  • internal/core/adt: use grouped allocation for let Vertex and Conjunct by @mvdan in db07a41
  • internal/pkg: remove unnecessary runtime fields by @mvdan in 08e8038
  • internal/core/adt: use strings.Builder for interpolations by @mvdan in 5acaffb
  • internal/core/compile: return Disjunction directly from or() builtin by @mvdan in a97cdb9
  • all: remove support for infix div, mod, quo, and rem by @mvdan in 6b49d16
  • internal/core/adt: fix !=null as top-level embedding losing constraint by @mpvl in 990bcf9
  • internal/core/adt: add test for !=null as top-level embedding by @mpvl in 4739b2c
  • cmd/cue: add a regression test for issue #1595 by @mvdan in 3b9743e
  • remove f.txtar and gitignore any such files going forward by @mvdan in 56af02f
  • cue/testdata: add regression test for issue #1886 by @mvdan in 5e3b554
  • cue/testdata: add a regression test for issue #2405 by @mvdan in 584547e
  • internal/core/adt: allocate tasks in chunks to reduce GC overhead by @mvdan in 4865a8e
  • internal/core/adt: avoid interface boxing in error creation by @mvdan in fede7d9
  • cmd/cue: add regression test for issue #1783 by @mvdan in f5c2185
  • internal/lsp: correct attributes in expressions by @cuematthew in 875bf82
  • lsp/eval: add support for aliasv2 experiment by @cuematthew in ef4f661
  • lsp/eval: rework field name(s) analysis by @cuematthew in 62b93c3
  • internal/core/adt: use inline buffer for error position slices by @mvdan in 98fc542
  • internal/core/adt: use slices.Clip instead of slices.Clone for Conjuncts by @mvdan in 824cbfc
  • internal/core/adt: propagate ClosedNonRecursive for non-data vertices by @mvdan in 2c281cb
  • internal/core/adt: fix closedness check for cross-package embedded disjunctions by @mvdan in c172d9c
  • internal/core/runtime: rename "test" extern interpreter to "testfn" by @mpvl in 2b3154a
  • internal/diff: use Myers algorithm for lists by @mpvl in 26db406
  • internal/diff: memoize shared-vertex pairs to avoid re-traversal by @mpvl in 20e140f
  • cmd/cue: add regression test for issue #1834 by @mvdan in cebad32
  • cmd/cue: add regression test for issue #2575 by @mvdan in a78c254
  • cue/testdata: add regression test for issue #962 by @mvdan in 7473662
  • cmd/cue: print error and benchmark results with CUE_BENCH by @mvdan in bcabdbb
  • cmd/cue: test CUE_STATS_FILE and CUE_BENCH on failing evaluations by @mvdan in b777709
  • cue/load: fs.FS support by @rogpeppe in d267795
  • cue: clarify that values no longer need to come from the same context by @mvdan in 4c1f083
  • cmd/cue: add exp gengotypes --outfile by @mvdan in 0716321
  • internal/core/export: add regression test for issue 3714 by @mvdan in b546fdd
  • pkg/strconv: allow string argument for FormatFloat format parameter by @mvdan in 36ee91d
  • internal/lsp/fscache: use internal.Package helper by @mvdan in 8a417a6
  • all: use cue/ast.File.Preamble in two more places by @mvdan in 79b0698
  • cmd/cue: swap BuildFile for BuildExpr in --path by @mvdan in d5a7b9b
  • simplify and generalize @extern support by @rogpeppe in d1f58c6
  • cmd/cue: add edge case tests for embed attributes by @rogpeppe in de7f29a
  • lsp/extvalidator: support https://github.com/ remotes by @cuematthew in d4d0005
  • cmd/cue: add testscript for #2648 by @mvdan in f8e86e8
  • cmd/cue: reuse astutil.ToFile for --path expressions by @mvdan in 0f3b837
  • cmd/cue: skip over null when importing with --path by @haoqixu in 31ab53b
  • cmd/cue: add tests for issue 3464 by @haoqixu in 52606f9
  • cue/format: fix indentation of multiline strings with interpolation by @mvdan in 256bd97
  • pkg/net: return errors for unexpected types in IP validators by @mvdan in d2d85c7
  • pkg/net: add regression tests for IP validators with unexpected types by @mvdan in c1fa76c
  • mod/module,cue/load,internal/filetypes: reject version in import qualifier by @mvdan in 1de56c5
  • cmd/cue: add tests for bad version and qualifier in import paths by @mvdan in eab59f8
  • internal/lsp: add support for evaluation via external validators by @cuematthew in bf11a94
  • tools/jsonrpc2: permit func enqueuing into message daisychain by @cuematthew in 48972ef
  • lsp/server: remove mutex by @cuematthew in ce34b12
  • gopls/cmd: remove unused code by @cuematthew in 52868cf
  • cue/format: change default tab width from 8 to 4 by @mvdan in 470250b
  • cue/format: add a test showing how each Option behaves by @mvdan in 3ab3da1
  • mod/modfile,internal/mod: clean up now that #2733 is fixed by @mvdan in 6a7dca8
  • internal/cueversion: bump for the upcoming v0.17 release cycle by @mvdan in 60dac4a
  • cmd/cue: suggest docker/podman login when OAuth2 device flow is unsupported by @mvdan in 295e51e
  • cmd/cue: add testscript for cue login when device code endpoint is unsupported by @mvdan in a789bce
  • cmd/cue: clarify how to authenticate with standard OCI registries by @mvdan in 35f0a56
  • cue/format: fix spurious empty line between definitions by @mvdan in b6f4b6d
  • lsp/cache: improve rename by @cuematthew in 9a0566b
  • integration/workspace: add test showing bad behaviour by @cuematthew in fe0649f
  • cue: allow concurrent use of Value by @rogpeppe in 5b2a1ff
  • doc/ref/spec.md: show multiple package attributes in example by @myitcv in 67c9c5b
  • internal/core/convert: simplify typeAssert by @rogpeppe in 03f71ff
  • cue/format: fix incorrect column alignment in lists and call args by @mvdan in 67e478b
  • cue/format: add test cases for issue #1006 by @mvdan in 3a3e2ab
  • internal/core/convert: fix astFromGoType for recursive types and shared AST pointers by @rogpeppe in 0feb8a8
  • internal/core/compile: avoid mutating AST by @rogpeppe in efbd321
  • internal/core/convert: split FromGoType into AST and ADT phases by @rogpeppe in a5034b4
  • internal/core/export: fix alias/field name conflict in pattern constraints by @mvdan in e429741
  • internal/core/export: add regression test for alias/field name conflict by @mvdan in a825637
  • internal/encoding/gotypes: preserve type references through conjunctions by @mvdan in 820e153
  • cmd/cue: add gengotypes test for conditional narrowing of a type reference by @mvdan in 757e683
  • pkg: fix godoc mistakes across several packages by @mvdan in f86d07c
  • internal/core/convert: fix panic when encoding pointer-receiver marshalers by @mvdan in f087406
  • cue/literal: make invalid multi-line string whitespace errors explicit by @mvdan in a6075bd
  • cmd/cue: return an error for non-label --path expressions instead of panicking by @mvdan in e098874
  • encoding/json: clarify and test the behavior of nil data with Extract by @mvdan in b06b9bd
  • cmd/cue: add test for package qualifier in subdirectories by @mvdan in 2ebb51d
  • cue/format: fix field alignment for manual ASTs with relative positions by @mvdan in d84ff45
  • cue/format: add regression test for #4296 by @mvdan in bf001e0
  • cue/format: clarify the default behavior for the spacing options by @mvdan in 5898489
  • encoding: add godoc hints for cue/ast result types by @mvdan in d8a8c79
  • cue: improve error messages for hidden fields in paths by @myitcv in dd80ba6
  • internal/ci: default to a later version of the CI commit checks by @myitcv in 9147ea2
  • cue/errors: use token.Pos.Compare in Positions by @mvdan in c045ec2
  • all: remove some unused code spotted by staticcheck by @mvdan in 4047528
  • internal/core/compile: recognize ast.NewPredeclared by @mvdan in b99401f
  • cue: add tests showing how ast.NewPredeclared fails to compile by @mvdan in abfb224
  • all: stop using XXX for examples and tests by @mvdan in db09a3c
  • README: clarify that source archive builds lack version info by @mvdan in c19c1c4
  • doc/ref: start testing code blocks which we expect to fail parsing by @mvdan in 310f61c
  • lsp/server: protect lsp state modifications with mutex by @cuematthew in 08f7d61
  • doc/ref: start testing CUE code blocks in the spec via go test by @mvdan in cec0ef8
  • doc/ref: annotate CUE code blocks via their triple backticks by @mvdan in 28736a8
  • doc/ref: annotate EBNF code blocks via their triple backticks by @mvdan in 990bf09
  • internal/core/adt: always add disjunctionTask on builtin arg eval by @rogpeppe in 9c38a1d
  • internal/core/adt: do not side-effect argument state to result state by @rogpeppe in 6b2a5c6
  • internal/ci: use OIDC with the Central Registry for the e2e tests by @mvdan in c38e454
  • encoding/jsonschema: recognize builtin validators without call by @rogpeppe in 8da9114
  • cue: fix Value.ReferencePath on top level value by @rogpeppe in b63d89f
  • cue: add test case for Value.ReferencePath at top level by @rogpeppe in 7c8469a
  • encoding/jsonschema: handle items keyword correctly in draft2020-12 by @rogpeppe in 807ba3b
  • encoding/jsonschema: fix two bugs in CUE-to-JSON-Schema generation by @rogpeppe in e6866ab
  • re-enable staticcheck's SA4000 and SA4003 checks by @mvdan in 0a6b6d6
  • internal: bump staticcheck to v0.7.0 for Go 1.26 support by @mvdan in 691d604
  • lsp/eval: correct resolution of package-level fields by @cuematthew in 43aefcc
  • lsp/eval: add test showing bad behaviour by @cuematthew in 2a5108a
  • lsp/server: make "Remove surrounding struct braces" preferred by @cuematthew in 83e4b54
  • internal/core/adt: preparatory work for user-defined functions by @rogpeppe in 14b4578
  • internal/core/adt: remove CallContext.Args method by @rogpeppe in 7d60579

Don't miss a new cue release

NewReleases is sending notifications on new releases.