Repository navigation
fix(deps): update module cuelang.org/go to v0.18.0 - #395
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
renovate
Bot
force-pushed
the
renovate/cuelang.org-go-0.x
branch
from
November 27, 2026 00:58
691b8e9 to
62b133e
Compare
renovate
Bot
force-pushed
the
renovate/cuelang.org-go-0.x
branch
from
November 29, 2026 02:39
62b133e to
11d4379
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.17.1→v0.18.0Release Notes
cue-lang/cue (cuelang.org/go)
v0.18.0Compare Source
The new cue.dev is live! Starting with v0.18, CUE Labs builds, signs and publishes CUE there, with v0.18 as our first long-term support release. For companies that depend on CUE, we're also introducing CUE Enterprise.
https://cue.dev/blog/the-cue-labs-distribution/
Changes which may break some users are marked below with:⚠️
Language
As a reminder, the
tryexperiment and theshortcircuitexperiment introduced in v0.17.0 are both still ongoing. Please give them a try and report any issues or feedback!...operatorThe
explicitopenexperiment, ongoing since v0.15.0, is now stable: from language versionv0.18.0on, embedding is strict and needs no opt-in. A struct which embeds a closed value is now closed to that value's fields, where before the embedding constrained only itself and left its sibling fields alone, and a comprehension's conjunct closes its struct just like any other conjunct. The new postfix...operator opens an embedded value again, so#A...embeds#Awithout closing the struct around it.Migrate a module with
cue mod upgrade, described below, or by runningcue fix --exp=explicitopenwhile it is still at an older language version and only then raisinglanguage.versionincue.mod/module.cue: a file atv0.18.0or later has no way back, as an@experimentattribute can only enable an experiment. See the how-to guide and the proposal for the full design.selfThe
aliasv2experiment, also ongoing since v0.15.0, is now stable: from language versionv0.18.0on, the postfix alias syntax and the predeclaredselfidentifier need no opt-in, and the old prefix syntax is no longer accepted.As above,
cue mod upgradeorcue fix --exp=aliasv2rewrites the prefix form;cue fix --exp=explicitopen,aliasv2applies both migrations in one pass. See the how-to guide and the proposal.The new
functionsexperimentThe new
functionsexperiment adds function literals, function types, and calls to the language. A function literal declares its parameters, may constrain its result with->, and defines its body after the final:; a call supplies arguments by position or by label. Functions are values: they unify with themselves and with function types, they capture the scope they are declared in, and they may be applied partially.You can try this experiment on a module at language version
v0.18.0via the@experiment(functions)file attribute:A literal without a body denotes a function type, which constrains a function value in the same way a schema constrains a struct: an implementation unified with a function type must accept every argument the type admits, and callbacks are checked where they are passed. Function types match parameters by label, combining optional, required, and regular parameters as for struct fields. Recursion via closures, such as with a fixed-point combinator, is detected as a structural cycle (#4495). See the proposal discussion and its revision on function contracts for the full design.
The new
openlistsexperimentThe new
openlistsexperiment makes lists open by default, just like structs. A list literal without a trailing ellipsis is no longer fixed to its length outside of definitions, so unifying[3]with[_, 4]yields[3, 4]rather than an incompatible list lengths error. Lists close where structs close: within a definition, or when passed toclose, which now accepts lists as well as structs.The experiment also introduces closed literals:
#[1, 2]means what[1, 2]means without the experiment, and#{a: 1}closes a struct at its own level asclosedoes. As#[now starts a closed list, an index on a definition named#is written(#)[i].You can try this experiment on a module at language version
v0.18.0via the@experiment(openlists)file attribute.cue fix --exp=openlistsrewrites existing files so they keep their meaning, writing list literals as closed literals and wrapping slices and builtin results inclose. See the proposal for the full design.Integer addition, subtraction, and multiplication are now exact at any size, as the spec requires, rather than rounding to 34 digits. This also fixes
strconv.FormatIntanduuid.FromIntfailing on large integers (#3787, #4263), as well as SI multipliers on long literals,math.Floor,math.Ceil, andmath.MultipleOf, which all rounded numbers beyond 34 digits.Dividing two integers now yields an
intwhen the quotient is exact, as the spec has always prescribed:4 / 2is the integer2, sox: float & 10 / 5is now a conflict. A quotient also keeps the decimal places its operands imply, so6.00 / 3is2.00, and an exported float always carries a digit after its decimal point.The
list.Sum,list.Product,list.Avg,list.Range,list.Min,list.Max,math.Abs,math.Copysign, andmath.Dimfunctions now follow the arithmetic operators, keeping the kinds of their arguments:list.Sum([1.5, 2.5])is now the float4.0rather than the integer4, so a field declaredintno longer accepts it.Other changes
A CUE file which belongs to no module can now declare the language version it is written for with a
@versionattribute, placed ahead of any other file attribute and the package clause, so that a reproducer or a standalone file written for an older version runs as written without creating a module for it. The attribute is an error in a file of a module which declares a language version, as the module file decides the version of its files.File attributes such as
@experiment(...)and@extern(embed)are now honored between the package clause and the import declarations, where the spec allows them, rather than being silently ignored or rejected (#2371).[string]?: intand[string]!: intare now rejected by the parser, matching the spec grammar. A pattern constraint is optional by construction, so the markers had no effect; simply remove them (#3716).The comparison bounds
==and!=now work with boolean values, so constraints like!=truebehave as documented in the spec (#4388). Multi-line strings now accept a backslash-escaped newline (#2317), andfor k, k in xis rejected as a redeclaration (#4012).Evaluator
Selecting through a regular field which holds a definition now keeps the definition's closedness, just like selecting from the definition itself. Such selections inside a
forcomprehension's body are now closed as well, as they already were inside anif.This most often shows up when a comprehension iterates over a definition and the values it yields are then extended with further fields, for example by a pattern constraint. If those values are meant as data to build on, declare them as a regular or hidden field instead of a definition, or leave the struct open with
....Closedness also follows what a reference denotes rather than where it is evaluated. A reference which reaches into a definition from outside now closes the value it selects even when it is evaluated inside that definition, such as
outside.sbelow, which was previously accepted. Conversely, a definition which refers to a regular struct no longer rejects a field which a sibling reference in that struct supplies (#4501).As the spec requires, an ellipsis in an embedding, as in
s: {{#B, ...}, h: {i: 1}}, now opens only the struct it is part of, and no longer the structs declared beside the embedding, so that a field added to one of them, such ass: h: extra: 1, is rejected asfield not allowed. Give such a struct its own ellipsis, as inh: {i: 1, ...}, or declare the field in it. Fields opened by the spread operator are also closed again in more cases, as the spec requires (#4525, #4528).Performance
A reference unified with a definition or with a disjunction of definitions, as in
deps: [...#Node]with#Node: #Task | #Group, is now shared with the value it refers to rather than evaluated again under every path, so that a dependency graph typed this way is evaluated once per node rather than exponentially in its depth, regardless of the order in which the fields are declared (#4512, #4513).Configurations with many nested disjunctions, such as schemas imported from JSON Schema, evaluate up to 9% faster and allocate up to 16% less memory. A recursive disjunction wrapped in a struct no longer drops disjuncts and grows exponentially in cost (#4475), and exporting a struct holding many unifications of empty or single-field structs no longer takes memory exponential in their number.
Other changes
The order in which fields and comprehensions are written no longer matters: a configuration which only evaluated when a comprehension came after the fields it reads now evaluates in any order (#4098).
==and!=now compare integers and floats numerically wherever they appear, so{a: 1.0} == {a: 1}and[1.0] == [1]are true, matching how1.0 == 1already behaved at the top level (#4120).cue.Value.Equalsandlist.Containschange in the same way.The
!=and=~bounds and the builtin validators of a field in an inline struct or aletwhich is read through a reference, such as by an interpolation, are now checked, where they were silently dropped. This surfaces conflicts which earlier releases accepted (#4510).Errors are reported more completely and accurately. A missing required field now points at the data which omits the field, so that
cue vetwith many data files says which one is at fault (#2520), and an error inside an interpolation, as in"\(x.foo & {})", no longer evaluates to an empty string (#2201). Many other errors now carry the positions of the values involved, report all failing elements or disjuncts rather than only the first, or are no longer hidden behind a sibling error (#2507, #2615, #3986, #4115, #4462, #4477).Fix several regressions introduced in
v0.17.0: avertex not initializedpanic involving pattern-constrained maps (#4521), a disjunction's default not applied when a comprehension guard reads it early (#4520), and spuriousfield not allowederrors with definitions embedded in lists or at a package root (#4522, #4523).A number of hangs, panics, and spurious errors such as structural cycles have also been fixed, many involving disjunctions, comprehensions, or
letbindings (#4176, #4399, #4428, #4440, #4447, #4448, #4449, #4453, #4474, #4478, #4479, #4487, #4490).cmd/cueThe
formatv2experiment, announced in v0.17.0, is now enabled by default:cue fmtand thecue/formatGo API are backed by a rewritten formatter. The new implementation resolves long-standing issues with the old one, in particular around the alignment of fields and trailing comments and the layout of multi-line expressions, so expect some reformatting when runningcue fmtover existing files. It keeps the source's line breaks between consecutive import declarations, asgofmtdoes (#1545), and between function parameters and call arguments (#4497).The old formatter remains available via
CUE_EXPERIMENT=formatv2=0for v0.18; v0.17 also accepts theformatv2experiment name, so the setting can be shared by teams using both versions. Please report any misformatting via the issue tracker, as we intend to remove the old formatter once the new one is stable.Other changes
The new
--language-versionflag of the commands which read CUE outside a module, among themcue eval,cue export,cue vet,cue fmt,cue fix,cue import, andcue get go, selects the language version for files which belong to no module, including standard input. It is only a fallback: the files of a module which declares a language version keep that version, and a file's own@versionattribute takes precedence. CUE generated bycue import,cue get go, andcue get crdtargets the chosen version.cue fixwithout package arguments now fixes every file of the module, from any directory inside it. Its rewrites leave fewer structs wrapped in__closeAllor__reclose(#4534), and theexplicitopenrewrite no longer closes values which the original left open.CUE packages can now be combined with individual schema and data files in a single invocation, such as
cue vet ./schemapkg extra-schema.json data.yaml, and the--packageflag now treats individual CUE files the same way as packages (#3341, #3671, #3914).cue vetnow checks every data file, and every document of a stream, against the schema and reports all of their errors, rather than stopping at the first one which fails to unify (#2511), and honors all-d/--schemaflags rather than only the last one (#3726).cue evallikewise carries on past a failing data file.cue vet,cue export, andcue eval -cnow report incomplete values, such as missing required fields, alongside any other errors, rather than leaving them out whenever another field had a conflict (#1319, #3358, #4140).cue eval --ignore --concretenow shows non-concrete values and reference cycles as errors, as documented (#2342).-eexpressions now apply only to the selected expressions, avoiding spurious errors from unrelated parts of the input (#3371), and are parsed and compiled at the language version of the module they are evaluated against, so they may use the features which are stable there, such asselfto select a field whose name is not an identifier (#358, #4297).-n/--nameflag is now only accepted bycue import, the only command where it had any effect (#3048), and the-s/--simplifyflag is now only accepted bycue eval,cue fix,cue fmt, andcue trim. A--pathvalue with a trailing component which is not a label, such asfoo:bar:baz, is now rejected rather than silently ignored (#3368).cue cmdnow unifies data files named on the command line with the loaded package, as the other commands do (#4473), and its memory use no longer grows with the number of tasks which return a result: the peak memory of a command running 40 such tasks drops from about 500MB to about 125MB (#4509). Tool tasks now surface evaluation errors in their fields rather than treating them as unset, andtool/execandtool/httpgain a number of fixes, such as atimeoutfield forhttp.Do(#4467).The
cuebinary is 7% smaller thanks to dropping most of the protobuf runtime from its dependencies.Modules
The new
cue mod upgradecommand moves a module to a new language version, rewriting every CUE file of the module for that version, including those undercue.mod, before recording the version incue.mod/module.cue. Files are rewritten without loading them, so a package whose import cannot be resolved is converted all the same, and a file which cannot be converted stops the upgrade before anything is written unless--forceis given.Each module's files are now parsed at the language version that module declares, rather than at the main module's version, so a module which has moved to
v0.18.0can still depend on packages written for an older version of CUE.Module zips now order files before directories, as documented, which changes the digests of newly published modules. Publishing a version again with the same files reuses the archive already in the registry, so retrying a release job keeps working against registries with immutable tags (#3340).
cue mod getcan now move a dependency off a version which no longer exists in the registry (#3965), a module version is downloaded at most once per process (#3413), and fetching modules through a registry proxy which compresses its responses or omitsContent-Lengthnow works. Registry errors now name the registry host and the module involved without repeating them, and report HTTP failures such as rate limits as such (#2952, #3611, #3696).@embednow works in files named directly on the command line within a module, and in packages loaded from dependency modules (#4439), and a file using@embedwithout@extern(embed)now reports the missing declaration rather than silently ignoring it (#4010).Wildcard package patterns such as
./.../namenow match the package path in full rather than any of its suffixes (#3212), package directory arguments with a trailing slash or a relative form now behave consistently (#3707), and imports using a redundant package qualifier, such asfoo.com/bar:bar, now resolve correctly in all cases (#4446).LSP server
The language server now understands the function literals of the
functionsexperiment: go-to-definition, find references, rename, completion, and hover work inside function literals and on labeled arguments, which resolve to the parameter they bind.Standard library imports now resolve, so
strings,list, and the rest offer completion and hover like any other package. Hovering over a field now shows its value with all conjuncts unified, and doc comments follow the semantic ownership rules of the language, such as attaching to the innermost field of a shorthand likea: b: c(#2672).Fix a regression introduced in
v0.17.0where finding definitions and references failed through an import of a package from a transitive module dependency (#4553). The language server is also more robust, fixing a number of crashes and stale results, including with symbolic links and unusual files in a package directory (#4491).As always, the language server is under active development: please report any bugs or missing features you encounter via the Issue tracker or via the
#lspchannels on Discord or Slack. See our Getting Started wiki page for instructions on how to set it up with your editor.Encodings
Experimental INI support
INI files can now be both imported and exported, such as via
cue import config.iniorcue export --out ini(#2689). As INI has no specification, the default generic flavor only accepts the syntax which all flavors share, so that no data is lost; theflavorfile tag selects the syntax of a particular tool, as inini+flavor=git:for a git config file, withgit,python,systemd, andwindowssupported. The encoding is experimental, so both the flavors and the CUE they decode to may still change.OpenAPI documents
The new
openapiv2experiment teachescue importandcue exportto handle complete OpenAPI documents — including paths, servers, and security — rather than only their component schemas. Enable it viaCUE_EXPERIMENT=openapiv2; the underlying Go APIs areencoding/openapi.ExtractV2andencoding/openapi.GenerateV2.cue get gocue get gonow followsencoding/jsonfor embedded structs, promoting their fields without requiring aninlinetag option (#1026), and emits them as a spread embedding,#Embedded..., in modules at language versionv0.18.0or later. It supports theencoding/jsonadditions of Go 1.27, such as theembedoption, and the newjsonv2codec followsencoding/json/v2instead (#4471).The new
--omitflag takes selectors such aspkg.Name, replacing the deprecated--excludeflag. Itspkg.Name.Methodform translates a type as if it lacked an encoding method likeMarshalJSON, so that a schema can be generated for types which only implement such methods to validate their input (#2466).JSON Schema
The JSON Schema encoder can now generate JSON Schema draft-07 and the OpenAPI 3.0 dialect in addition to draft 2020-12, and its output is improved in many ways, such as exact numeric bounds and
formatkeywords for sized number types (#2529, #4438).The JSON Schema decoder now supports
unevaluatedPropertieswhere the evaluated properties are known statically, such as viaallOfand$ref, and unifiesallOfsubschemas so their fields and documentation appear in the result.YAML
The new
--out yaml+indentSequences=falseencoding tag emits the zero-indent list style favored by Kubernetes and others (#4177). A@yamltag can now be given to a list element or an embedded value via a declaration attribute, as in{"x", @yaml(,tag="!Env")}.The YAML encoder now quotes strings which YAML 1.1 decoders would read as values of other types, such as
0x_or=. The YAML decoder once again decodes YAML 1.1 octals with a sign, such as-0123, and floats with a leading zero, such as01289.5, fixing a regression introduced inv0.17.0, and decodes integers beyond 64 bits as integers. Merge keys referencing an alias count towards the limit on alias expansion, and no longer panic or overflow the stack on an alias to a sequence or to the mapping being merged into.Other changes
New output encoding tags
--out cue+compactand--out json+compactemit compact single-line output, andcue importnow prefers hash-delimited strings like#"..."#when they avoid escaping (#124).The TOML decoder now takes linear time, where large inputs took quadratic time (#4580).
Standard library
uuid.ToIntnow decodes the 128-bit value of its UUID, as documented, rather than converting the bytes of its string form, so its results change. Any form accepted byuuid.Parseyields the same value, which round-trips throughuuid.FromInt.list.Sort,list.SortStable, andlist.IsSortedno longer panic on a comparator whoselessfield comes from a comprehension, an embedding, or a unification (#3063).math.Pownow returns1for a zero exponent with any base, including zero, as documented (#4506).Go API
The new
cue.Unifyfunction unifies many values at once, more efficiently than a chain ofValue.Unifycalls.cue/ast's newClonefunction copies a syntax tree, including its comments and its resolved references, so a tree can be rewritten without disturbing the original. Its newDocCommentsandResolveCommentsfunctions report the doc comments that semantically document a node, resolving the field-shorthand convention.cue/formatexposes the knobs of the new formatter: its newIndent,IndentWidthandLineWidthoptions control the indentation string, its visual width, and the target line width, and its newCompactoption renders a value on a single line.UseSpacesandTabIndentare deprecated in favor ofIndentandIndentWidth;go fixmigrates uses ofUseSpaces.cue/load.Config.LanguageVersionsets the fallback language version for input which belongs to no module, as the--language-versionflag does, and the newcue/build.Instance.TargetLanguageVersionreports the version whichcue.Value.Syntaxtargets for an instance. The newencoding/jsonschema.CRDConfig.TargetLanguageVersionfield letsencoding/jsonschema.ExtractCRDsgenerate schemas for modules declaring an older language version.The experimental
encoding/jsonschema.GenerateManyfunction generates several schemas at once with a shared pool of definitions, as used by the new OpenAPI generator.The Go code generated from
cue.protois now shipped as theencoding/protobuf/cueprotopackage, so proto definitions using CUE options can be compiled without extra setup (#581). The compatibility shim atencoding/protobuf/cueis deprecated and will be removed in v0.19.Programs embedding CUE could be far larger than necessary, as the
text/templatebuiltin andcue/statslooked up methods by name, which stops the Go linker from discarding unused exported methods anywhere in the binary; one reported binary was 66MiB rather than 25MiB (#4514).cue/statsno longer does so, and building with thecuenotemplatebuild tag leaves thetext/templatepackage out of the standard library so that the linker discards unused methods again, at the cost of CUE code importingtext/templatefailing.cue.IsIncompletenow reports an error combining several others as incomplete only when all of them are, so that a permanent error is never mistaken for an incomplete one, and lists of errors fromcue/errorsnow implementUnwrap.A number of APIs, such as exporting values and
cue/ast/astutil.Sanitize, no longer modify the values or syntax trees given to them, which also fixes data races when using them concurrently, as well as incue.Iterator.Nextandcue.Value.LookupPath.cue.Value.Decodeonce again prefers a tagged field over an untagged one at the same depth, fixing a regression introduced in v0.9.0, and converting a Go struct to CUE now names its fields asencoding/jsondoes (#2261).cue.Context.Encodenow honors theomitzeroJSON struct tag (#4429) and encodes a nil pointer of any type asnullrather than panicking.A number of panics and other bugs in
cue.Valuemethods such asAllows,Subsume, andUnifyhave been fixed (#4387, #4496, #4545, #4549).Inlining imports, via
cue def --inline-importsorcue.InlineImports, now handlesletdeclarations and values which have been unified or merged with data files, rather than emitting unresolved references (#2252, #2495, #3484).cue/parserno longer takes quadratic or worse time on some pathological inputs, such as deeply nested parentheses, calls, or function signatures.tools/flownow supports tasks in a value below the root of its instance (#2185), and fixes a data race (#2184), leaked goroutines (#2663), and the handling of tasks returningErrAbort.Configuration
📅 Schedule: (UTC)
* 0-3 * * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.