You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Fix an evalv3 regression first introduced in v0.11.0 where the and built-in function started evaluating its arguments too eagerly, causing failures in cue def.
Fix an evalv3 regression where closedness info could be lost when using a comprehension.
Fix a bug where the evaluator would panic on alias cycles with dynamic fields rather than giving a good error.
LSP
Formatting standalone CUE files - either without a package name, or outside of a CUE module - now works correctly.
Fix a bug where trying to use "find references" on a CUE module with nested modules would cause a hang.
Fix a bug where resolving path roots did not work correctly in the presence of struct embeddings.
cmd/cue
Fix a regression in v0.15.0 where cue get go no longer skipped generating CUE files without any declarations.
Go API
Fix a bug in the subsume package where a struct with a pattern constraint did not subsume a closed struct with a matching field.
Rename the bootstrap build tag used in the internal/filetypes package to cuebootstrap to avoid conflicts with build tags in other Go modules.
Full list of changes since v0.15.0
bump pinnedReleaseGo and LanguageVersion for v0.15.1 by @mvdan in 350755e
lsp/fscache: improve removal of phantom package decls by @cuematthew in bcc9a45
internal/lsp: format standalone files without phantom pkg names by @cuematthew in bf16055
lsp/definitions: correct resolution of path roots by @cuematthew in e64569f
lsp/definitions: add test to show faulty resolution by @cuematthew in f2076ae
lsp/cache: stop nested modules from breaking find-references by @cuematthew in 6d75085
internal/core/compile: don't panic on an alias cycle with a dynamic field by @mvdan in cf6c597
internal/core/compile: revert and to use Func instead of RawFunc by @mvdan in 37e8637
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.
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.
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.
⚠️ 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 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/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.
⚠️ 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
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined).
🚦 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.
If you want to rebase/retry this PR, check this box
Within HostnameError.Error(), when constructing an error string, there is no limit to the number of hosts that will be printed out. Furthermore, the error string is constructed by repeated string concatenation, leading to quadratic runtime. Therefore, a certificate provided by a malicious actor can result in excessive resource consumption.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.026%
EPSS Percentile
7th percentile
Description
The ParseAddress function constructs domain-literal address components through repeated string concatenation. When parsing large domain-literal components, this can cause excessive CPU consumption.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.026%
EPSS Percentile
7th percentile
Description
The processing time for parsing some invalid inputs scales non-linearly with respect to the size of the input.
This affects programs which parse untrusted PEM inputs.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.015%
EPSS Percentile
3rd percentile
Description
Validating certificate chains which contain DSA public keys can cause programs to panic, due to a interface cast that assumes they implement the Equal method.
This affects programs which validate arbitrary certificate chains.
Affected range
<1.24.9
Fixed version
1.24.9
EPSS Score
0.015%
EPSS Percentile
3rd percentile
Description
Due to the design of the name constraint checking algorithm, the processing time of some inputs scale non-linearly with respect to the size of the certificate.
This affects programs which validate arbitrary certificate chains.
Affected range
<1.24.11
Fixed version
1.24.11
EPSS Score
0.009%
EPSS Percentile
1st percentile
Description
An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com.
Affected range
>=1.24.0 <1.24.6
Fixed version
1.24.6
EPSS Score
0.015%
EPSS Percentile
2nd percentile
Description
If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath ("", ".", and ".."), can result in the binaries listed in the PATH being unexpectedly returned.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.025%
EPSS Percentile
6th percentile
Description
The Reader.ReadResponse function constructs a response string through repeated string concatenation of lines. When the number of lines in a response is large, this can cause excessive CPU consumption.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.019%
EPSS Percentile
4th percentile
Description
When Conn.Handshake fails during ALPN negotiation the error contains attacker controlled information (the ALPN protocols sent by the client) which is not escaped.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.029%
EPSS Percentile
8th percentile
Description
Despite HTTP headers having a default limit of 1MB, the number of cookies that can be parsed does not have a limit. By sending a lot of very small cookies such as "a=;", an attacker can make an HTTP server allocate a large amount of structs, causing large memory consumption.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.033%
EPSS Percentile
9th percentile
Description
Parsing a maliciously crafted DER payload could allocate large amounts of memory, causing memory exhaustion.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.025%
EPSS Percentile
6th percentile
Description
The Parse function permits values other than IPv6 addresses to be included in square brackets within the host component of a URL. RFC 3986 permits IPv6 addresses to be included within the host component, enclosed within square brackets. For example: "http://[::1]/". IPv4 addresses and hostnames must not appear within square brackets. Parse did not enforce this requirement.
Affected range
<1.24.8
Fixed version
1.24.8
EPSS Score
0.014%
EPSS Percentile
2nd percentile
Description
tar.Reader does not set a maximum size on the number of sparse region data blocks in GNU tar pax 1.0 sparse files. A maliciously-crafted archive containing a large number of sparse regions can cause a Reader to read an unbounded amount of data from the archive into memory. When reading from a compressed source, a small compressed input can result in large allocations.
Improper Handling of Length Parameter Inconsistency
Affected range
<1.21
Fixed version
1.21
CVSS Score
7.5
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score
0.802%
EPSS Percentile
74th percentile
Description
When reading a specially crafted ZIP archive, Compress can be made to allocate large amounts of memory that finally leads to an out of memory error even for very small inputs. This could be used to mount a denial of service attack against services that use Compress' zip package.
Improper Handling of Length Parameter Inconsistency
Affected range
<1.21
Fixed version
1.21
CVSS Score
7.5
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score
1.437%
EPSS Percentile
80th percentile
Description
When reading a specially crafted TAR archive, Compress can be made to allocate large amounts of memory that finally leads to an out of memory error even for very small inputs. This could be used to mount a denial of service attack against services that use Compress' tar package.
Improper Handling of Length Parameter Inconsistency
Affected range
<1.21
Fixed version
1.21
CVSS Score
7.5
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score
1.893%
EPSS Percentile
83rd percentile
Description
When reading a specially crafted 7Z archive, Compress can be made to allocate large amounts of memory that finally leads to an out of memory error even for very small inputs. This could be used to mount a denial of service attack against services that use Compress' sevenz package.
Excessive Iteration
Affected range
<1.21
Fixed version
1.21
CVSS Score
7.5
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score
0.811%
EPSS Percentile
74th percentile
Description
When reading a specially crafted 7Z archive, the construction of the list of codecs that decompress an entry can result in an infinite loop. This could be used to mount a denial of service attack against services that use Compress' sevenz package.
Loop with Unreachable Exit Condition ('Infinite Loop')
Affected range
>=1.3 <1.26.0
Fixed version
1.26.0
CVSS Score
5.9
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H
EPSS Score
0.018%
EPSS Percentile
4th percentile
Description
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Apache Commons Compress. This issue affects Apache Commons Compress: from 1.3 through 1.25.0.
Users are recommended to upgrade to version 1.26.0 which fixes the issue.
When parsing unknown fields in the Protobuf Java Lite and Full library, a maliciously crafted message can cause a StackOverflow error and lead to a program crash.
Reporter: Alexis Challande, Trail of Bits Ecosystem Security Team [email protected]
Affected versions: This issue affects all versions of both the Java full and lite Protobuf runtimes, as well as Protobuf for Kotlin and JRuby, which themselves use the Java Protobuf runtime.
Severity
CVE-2024-7254High CVSS4.0 Score 8.7 (NOTE: there may be a delay in publication)
This is a potential Denial of Service. Parsing nested groups as unknown fields with DiscardUnknownFieldsParser or Java Protobuf Lite parser, or against Protobuf map fields, creates unbounded recursions that can be abused by an attacker.
Proof of Concept
For reproduction details, please refer to the unit tests (Protobuf Java LiteTest and CodedInputStreamTest) that identify the specific inputs that exercise this parsing weakness.
Remediation and Mitigation
We have been working diligently to address this issue and have released a mitigation that is available now. Please update to the latest available versions of the following packages:
The tokenizer incorrectly interprets tags with unquoted attribute values that end with a solidus character (/) as self-closing. When directly using Tokenizer, this can result in such tags incorrectly being marked as self-closing, and when using the Parse functions, this can result in content following such tags as being placed in the wrong scope during DOM construction, but only when tags are in foreign content (e.g. , , etc contexts).
Misinterpretation of Input
Affected range
<0.36.0
Fixed version
0.36.0
CVSS Score
4.4
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
EPSS Score
0.023%
EPSS Percentile
5th percentile
Description
Matching of hosts against proxy patterns can improperly treat an IPv6 zone ID as a hostname component. For example, when the NO_PROXY environment variable is set to "*.example.com", a request to "[::1%25.example.com]:80` will incorrectly match and not be proxied.
Uncontrolled Recursion vulnerability in Apache Commons Lang.
This issue affects Apache Commons Lang: Starting with commons-lang:commons-lang 2.0 to 2.6, and, from org.apache.commons:commons-lang3 3.0 before 3.18.0.
The methods ClassUtils.getClass(...) can throw StackOverflowError on very long inputs. Because an Error is usually not handled by applications and libraries, a StackOverflowError could cause an application to stop.
Users are recommended to upgrade to version 3.18.0, which fixes the issue.
renovatebot
changed the title
chore(deps): update docker.io/cuelang/cue docker tag to v0.15.1
chore(deps): update docker.io/cuelang/cue docker tag to v0.15.3
Dec 30, 2025
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:
0.13.2→0.15.3Release Notes
cue-lang/cue (docker.io/cuelang/cue)
v0.15.3Compare Source
Evaluator
Fix a panic which could occur when using
ExprafterLookupPathon acue.Value.cmd/cueFix a panic which could occur when using
cue cmdtasks referencing definitions.Fix a panic which could occur when
cue get goencountered a Go enum type with zero named values.Encodings
Fix a bug in the TOML decoder where nested arrays were not being correctly mapped to CUE values.
Full list of changes since v0.15.1
8a91fedget gowhen an enum has zero named values by @mvdan inf544b9c641c64a6d86ce63544f153cb0e2dv0.15.2Compare Source
v0.15.1Compare Source
Evaluator
Fix an evalv3 regression first introduced in
v0.11.0where theandbuilt-in function started evaluating its arguments too eagerly, causing failures incue def.Fix an evalv3 regression where closedness info could be lost when using a comprehension.
Fix a bug where the evaluator would panic on alias cycles with dynamic fields rather than giving a good error.
LSP
Formatting standalone CUE files - either without a package name, or outside of a CUE module - now works correctly.
Fix a bug where trying to use "find references" on a CUE module with nested modules would cause a hang.
Fix a bug where resolving path roots did not work correctly in the presence of struct embeddings.
cmd/cueFix a regression in
v0.15.0wherecue get gono longer skipped generating CUE files without any declarations.Go API
Fix a bug in the
subsumepackage where a struct with a pattern constraint did not subsume a closed struct with a matching field.Rename the
bootstrapbuild tag used in theinternal/filetypespackage tocuebootstrapto avoid conflicts with build tags in other Go modules.Full list of changes since v0.15.0
350755ebcc9a45bf16055e64569ff2076ae6d75085cf6c597andto use Func instead of RawFunc by @mvdan in37e8637de5328ea229275bca0a5594f2f0eget goagain by @mvdan in819474ce61516d2e8e111f81118cv0.15.0Compare Source
Changes which may break some users are marked below with:⚠️
Note that this release no longer includes a
checksums.txtasset; 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
#lspchannels on Discord or Slack.Language
explicitopenexperiment for#A...The
explicitopenper-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.
aliasv2experimentThe
aliasv2per-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
keepvalidatorsglobal experiment is now stable, meaning thatCUE_EXPERIMENT=keepvalidatorsis always enabled.With its proposal accepted, the
structcmpper-file experiment is now stable withlanguage.versionatv0.15.0or later, meaning that the@experiment(structcmp)attribute is unnecessary as it's always enabled.Evaluator
evalv2The old
evalv2evaluator, which previously could be re-enabled viaCUE_EXPERIMENT=evalv3=0, is now deleted. The newevalv3evaluator has been on by default sincev0.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 yamloryaml.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/parsernow 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
@embedattribute has gained anallowEmptyGloboption, to allow glob patterns to match zero files without causing an error.The evaluator now shows all user errors created with the
errorbuiltin 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
evalv2toevalv3have 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.0where 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/cueA new
cue help experimentscommand is introduced to document all available per-file and global experiments.The
cue fix --expflag is introduced to rewrite files or packages to use new and experimental semantics with@experimentattributes.cue mod mirrornow copies OCI referrers between registries, which ensures that artifacts like signatures and attestations which reference modules being mirrored are copied as well.cue mod resolvegains a--depsflag that lists all dependencies of the current module and which registries they resolve to.cue get gogains an--outfileflag to generate exactly one CUE file for a single Go package, which can be useful when integratingcue get gointo build systems like Bazel.Fix a regression introduced in
v0.9.0where loading a qualified pattern like./...:pkgnameno longer filtered files based on the package name given.cue get gonow 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.v3has been replaced bygo.yaml.in/yaml/v3, an active fork now maintained by the YAML organization.cue exp gengotypesis 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.prototo 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
netpackage has gained newAddIPandAddIPCIDRfunctions to add numerical offsets to IP addresses or CIDR networks.The
Atoi,ParseInt, andParseUintfunctions in thestrconvpackage 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/jsongains JSON Pointer APIs, which are already useful in packages likeencoding/jsonschema.cue/astintroducesPostfixExprto support upcoming additions to the language syntax.cue/astintroducesStringLabelNeedsQuotingto determine whether a string label needs to be quoted when used in CUE syntax.cue/astintroducesNewStringLabelto create anast.Labelas either an unquoted identifier or a quoted string, depending on whether the string label needs quoting.tools/fixhas gained new APIs to fix configs to use an active experiment, as well as fixing configs to a newer language version.cueintroduces aPath.Appendconvenience method.cue/build.Instance.Matchis removed, given that it was never set to any value at any point since it was added.cue/tokenis 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.cue/errorsis adjusted so thatPositionsonly collects printable positions, to prevent printing empty positions in the CLI.cue/astdeprecates theFile.Importsfield in favor of theFile.ImportSpecsiterator method. The iterator methodFile.ImportDeclsis also introduced for completeness.cue.ResolveReferencesoption API is now removed.cue/parser.DeprecationError.Versionis deprecated, as tracking CUE language versions via integers has not been used sincev0.4.3, and the mechanism was never properly documented.Full list of changes since v0.14.0
4aad0653b2b9b4f8bf47aa650c53ab19f9827f57975634c58f1cd0d252f26f9020764b7d69171b979ace57c6f9f7e9a83e6ed9b98eca4996083dd0382c321f2e7e5af1bfde52cc3d92d6d58d634ba9572e79d2eabbf6f4fa77e741e5706dbd88bc991e30ed22dcf1d8dea3faa14472bed7a839ba8385f87d0090a15afd5044dba4e93c434c25322ae64182de7dcbdf624300be6feb520cue get go --outfilelogic by @mvdan in64910136c2aa6a9623737852de618972e066543708f4ba49bgo fix -inlineon ImportPathName by @mvdan in1850e9b654b5c0aae1e07bdc39015303c60aba5ee2bfe4aba738e6e4go fix -inlineby @mvdan in70d6a9c279e355b85644fa94cfbc2606457e735c99f0d24a97b65843289580615f2a53de886bcff6f38b3d8e9ea64a5e68d4d62e62b281ea23a328a4d8b1daa25fb94166a8510eb7de78d2909c8df341ba8dce0b3dabab4d92ce18335e4fb098b6d129ad8ee5b42b3833621a62a81d1e947c85c84c673ac356c10fc585925433cb9a6f97a1992c1cd8dce6dc15e67c02536d4f40aa589113d7b9b28a5f328054b0b67010209a0f42d293a17_|_by @rogpeppe in49126bb5c6dd1c4160e88fedcd8785e008d39d559bsiblingsfunction by @rogpeppe in366de4b06d8b912efaae140a9710899a983b4b3d1bb8e385942731c2658608cf79aafe2af8a20b33320ba85df20ef2044eget goby @fionera ina6eaaf677c93c6e58947e577c245930597893c27cc103b1ceff5711dd62b6176f47bbf9b06b4cc60b98a53ace20c486bc314a7236d21fac3d8c663ccue help experimentby @rogpeppe in5432a20ba534b53e1e769a3eb068869b034dc3731daf175eded355b001181e908d34f90010744a73e4cd1f88e1a1bc296cResolveDepin arithmetic by @rogpeppe in37ebf7e8332fd51873f84ec216cfafdde34276bcce7e9543b5944feed4f9bfb5c156429357acf:pkgnameas.:pkgnameby @mvdan in0a41be8:pkgnameCLI argument regression by @mvdan ina880c06632f9b7ab67c05a862f8436bcb3e313e0c1b2a7b29](https://redirect.github.com/cue-lang/cue/commit/b2a7b29cdb775ffaa4c11cf32Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined).
🚦 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.