fix(deps): update module cuelang.org/go to v0.15.1 #1092
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.11.0->v0.15.1Release Notes
cue-lang/cue (cuelang.org/go)
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 ina880c06632f9b7ab67c05a862f8436bcb3e313e0c1b2a7b2947dab3616118b3880df5b43c8a398561bceget goby @mvdan in91d2572be9298b458b03879e9f722502321Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.