Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency cue-lang/cue to v0.12.0 #481

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 30, 2025

This PR contains the following updates:

Package Update Change
cue-lang/cue minor v0.11.2 -> v0.12.0

Release Notes

cue-lang/cue (cue-lang/cue)

v0.12.0

Compare Source

This release fixes dozens of bugs in the new evaluator, enables the embed and toposort experiments by default, further improves JSON Schema support, and introduces cue exp gengotypes.

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

Evaluator

CL 1205861 enables the Embedding proposal via CUE_EXPERIMENT=embed by default, given that the proposal was accepted in late December.

Since v0.11.0, an experimental "topological sorting" of struct fields has been available via CUE_EXPERIMENT=toposort; this release enables the experiment by default. Topological sorting produces a more principled ordering of fields as produced by cue export and cue eval. The intent is to ensure the old and new evaluators order struct fields in the same way, in order to build confidence and ease the transition to the new evaluator.

We encourage all CUE users to update to this release and switch to topological sorting for their CUE outputs. An issue for gathering feedback is available, should you run into any issues.

A great deal of work has happened in the new evaluator, which can be used via CUE_EXPERIMENT=evalv3. Marcel also recently posted another update on performance progress. Below is a selection of particularly relevant changes in the new evaluator.

CLs 1204490, 1204669, and 1205368 resolve a number of significant performance issues spotted in the new evaluator.

CLs 1206123, 1206178, 1206284, 1206321, 1206385, and 1207910 fix a number of disjunction issues leading to incorrect behavior in the new evaluator.

CLs 1206327, 1206383, and 1206384 fix a number of cycle issues leading to incorrect errors in the new evaluator.

CLs 1206823, 1207237, 1207314, 1204365, 1205361, 1205363, and 1207714 fix a number of closedness issues which resulted in missing or incorrect errors in the new evaluator.

CL 1207912 fixes a regression which could cause "not properly initialized" errors in the new evaluator.

CLs 1206926, 1207169, 1207263, 1207545, and 1207715 fix panics which were recently discovered.

CL 1205862 sorts conjuncts in binary expressions to reduce ordering differences between evaluator versions.

CL 1207908 ensures that conversions of Go values to CUE respect struct field order, for the sake of topological sorting.

CL 1207907 ensures that converting Go arrays to CUE uses list.Repeat rather than the now-removed list arithmetic syntax.

CL 1204491 introduces CUE_DEBUG=openinline, enabled by default, which emulates the old evaluator's incorrect closedness behavior in some edge cases. This should help the transition towards the new evaluator, and allow us to fix the behavior of these edge cases in future CUE releases.

CL 1204608 introduces CUE_DEBUG=sortfields which sorts all struct fields lexicographically. This replaces CUE_DEBUG_SORT_ARCS=1, which did not work with the new evaluator.

Go API

⚠️ CL 1205569 enables CUE_EXPERIMENT=decodeint64 by default, causing cue.Value.Decode to choose int64 rather than int as the default Go type for CUE integer values.

CL 1206368 adds a cue/token.Pos.Compare method to allow comparing two positions, for example to sort via slices.SortFunc.

CL 1207007 adds encoding/jsonschema.Config.AllowNonExistentRoot to prevent an error when no value is found at the Config.Root path.

Builtins

CL 1204378 teaches list.UniqueItems to handle incomplete values correctly, fixing a bug in JSON Schema.

CL 1204425 fixes list.MatchN so that it matches final values, like the matchN evaluator built-in, fixing a bug in JSON Schema.

⚠️ CL 1204920 removes the long-deprecated cue.Value.IsClosed method.

⚠️ CL 1205530 removes the long-deprecated cue.Instance.Doc method.

⚠️ CL 1205529 removes the long-deprecated cue/load.Config.BuildTags field.

cmd/cue

CL 1207142 adds the new command cue mod rename to aid in changing the module path of the current module.

⚠️ CL 1206950 fixes an issue where incomplete errors were not being reported by cue eval and cue vet.

CL 1204111 fixes some edge cases where CUE comments were lost or duplicated, particularly with cue def.

CL 1204874 re-enables command suggestions when a user makes a typo like cue exprot.

CL 1206784 fixes an issue where arguments and flags in cue cmd could not be interspersed, unlike other subcommands.

Encodings

The new experimental command cue exp gengotypes allows generating Go type definitions derived from exported CUE schemas. This can be a nice alternative to cue get go for projects developing both CUE and Go, if one wishes to maintain the source of truth for shared schemas in CUE. cue exp gengotypes is generally more reliable than cue get go, given that Go's type system is not as powerful.

JSON Schema spec compatibility is improved further by fixing a number of bugs and adding missing features. Notably, it now supports arbitrary references to internal structure in $ref. JSON Schema's spec test suite has gone from a "pass" rate of 75% to 79% thanks to these efforts.

⚠️ CL 1207146 tweaks JSON Schema to not generate defaults, given that they are annotations rather than constraints, and generating CUE defaults causes various issues.

Full list of changes since v0.11.0

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) January 30, 2025 14:35
@renovate renovate bot force-pushed the renovate/cue-lang-cue-0.x branch 2 times, most recently from 7cbdfa4 to 19d6591 Compare January 31, 2025 05:05
@renovate renovate bot force-pushed the renovate/cue-lang-cue-0.x branch from 19d6591 to b310e1a Compare January 31, 2025 09:27
@renovate renovate bot merged commit 30994e6 into master Jan 31, 2025
5 checks passed
@renovate renovate bot deleted the renovate/cue-lang-cue-0.x branch January 31, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants