Skip to content

Releases: cue-lang/cue

v0.12.1

03 Apr 19:51
Compare
Choose a tag to compare

Evaluator

Embedding binary files like @embed(file="foo", type=binary) no longer interprets the files as Unicode text, which mangled invalid UTF-8 bytes.

cmd/cue

The release archives are now built with Go 1.24, which should fix cue get go when used with Go installed at version 1.24.

Full list of changes since v0.12.0

v0.13.0-alpha.3

31 Mar 14:38
Compare
Choose a tag to compare
v0.13.0-alpha.3 Pre-release
Pre-release

This release fixes a handful of bugs in the new evaluator and its Go API.

Evaluator

The new evaluator, now enabled by default since v0.13.0-alpha.2, is improved to fix regressions in OpenAPI, our CUE Go API, two panics, and a few other bugs which could lead to incorrect errors. Since the last alpha release, two more projects in Unity are fully working with the new evaluator.

As a reminder, the old evaluator is still accessible via CUE_EXPERIMENT=evalv3=0. If you encounter any errors or other problems, please file an issue with details.

Go API

cuecontext.EvalDefault still pointed to the old evaluator; it now correctly points to the new evaluator, and follows the CUE_EXPERIMENT=evalv3 flag just like cmd/cue and the rest of the Go API.

Mirroring cuecontext.EvalExperiment, the new cuecontext.EvalStable constant is added to track the latest stable version of the evaluator.

Full list of changes since v0.13.0-alpha.2
  • update golang.org/x dependencies by @mvdan in c565c1d
  • cue/cuecontext: fix EvalDefault to follow the default, add EvalStable by @mvdan in ad0442b
  • internal/core/runtime: select evaluator version with specific constants by @mvdan in 1ec46e7
  • all: do not use Default/Dev/Experiment evaluator versions in tests by @mvdan in 07bccba
  • cue/cuecontext: expand TestEvalVersion to test more combinations by @mvdan in 965e7b1
  • internal/core/adt: fix disjunction corruption issue by @mpvl in 917ae0d
  • cue/cuecontext: evalv3 is no longer experimental by @myitcv in 8080ec5
  • internal/core/adt: fix panic due to envDisjunct corruption by @mpvl in 721ca5d
  • internal/core/adt: disable structure sharing for pending arcs by @mpvl in 4fc579c
  • internal/core/adt: add tests for Issue 3849 by @mpvl in 6ade302
  • internal/core/adt: remove insertArcCC by @mpvl in 6654071
  • internal/core/adt: inline structs in schema are not closed by default by @mpvl in 4e7564e
  • internal/core/adt: add test for Issue 3853 by @mpvl in 5348d04
  • pkg/internal/builtintest: remove "and X more errors" stripping for evalv3 by @mvdan in 32d0400
  • internal/core/adt: support Ellipsis in MatchAndInsert by @mpvl in de69f12
  • internal/core/adt: eliminate recursive processing on bottom by @mpvl in 447e98d
  • internal/core/adt: add test for Issue 3851 by @mpvl in d58c804
  • cmd/cue: re-enable cue exp gengotypes testscript by @mvdan in 18b4ba9
  • internal/core/adt: add missing dereference by @mpvl in e22ea96
  • cue: do not unify "accept" schema with result in UnifyAccept by @mpvl in ff654dc
  • cue: prepare TestConjunctDedup for more cases by @mpvl in 2b82584
  • cue: use fmt instead of MarhalJSON in TestUnifyAccept by @mpvl in 6912a11
  • internal/tdtest: support cuetest.Run by @mpvl in 2402ef3
  • internal/ci: simplify login to Central Registry by @myitcv in f4a2424
  • encoding/jsonschema: clean up TestExtX by @mpvl in c0fc59b
  • internal/core/adt: remove diff/todo for fixed issues by @mpvl in 773741f
  • cue: add missing finalization by @mpvl in 4cbb180

v0.13.0-alpha.2

25 Mar 15:51
Compare
Choose a tag to compare
v0.13.0-alpha.2 Pre-release
Pre-release

This release enables the new evalv3 evaluator by default, and introduces initial support for absolute packages.

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

Evaluator

⚠️ The new evaluator is now enabled by default, given that the majority of our test suite and projects in Unity are now working. While a few regressions remain, dozens of bugs are fixed by the new evaluator, and it already shows better performance by orders of magnitude on many projects.

The old evaluator is still accessible via CUE_EXPERIMENT=evalv3=0. If you encounter any errors or other problems, please file an issue with details.

For more information, see our new guide on upgrading from evalv2 to evalv3.

Closedness in evalv3 has been revisited to match the semantics of evalv2 much more closely, while at the same time reducing its overhead for larger configurations. This fixes most "field not allowed" regressions and improves the performance of some configurations by up to 2-5x.

cmd/cue

Initial support for absolute packages is introduced, which allow specifying a remote package at a particular version such as cue export foo.com/data@v1.2.3 or cue vet foo.com/schema@v1.2.3 -d '#schema' data.yaml.

cue get go no longer fails on Go strings containing certain character escape sequences or non-UTF8 bytes.

Encodings

Empty YAML files are now decoded as *null | _ rather than null, allowing them to be unified with struct schemas as if they were an empty struct.

Full list of changes since v0.13.0-alpha.1
Read more

v0.13.0-alpha.1

12 Mar 17:05
Compare
Choose a tag to compare
v0.13.0-alpha.1 Pre-release
Pre-release

This release brings a new cue trim algorithm, a performance fix for field ordering, two new commands, and many fixes.

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

Evaluator

A great deal of work has happened in the new evaluator, which can be used via CUE_EXPERIMENT=evalv3. Marcel recently posted another update on performance progress.

An entirely new algorithm for cue trim and tools/trim has been implemented for CUE_EXPERIMENT=evalv3, which resolves all known bugs when trimming CUE. Give it a try and report any issues you find.

⚠️ The new topological sort algorithm for field ordering has been tweaked to avoid becoming too slow in some cases. This may result in some ordering changes, but we expect them to be relatively small. See the change for more details.

The parser now correctly allows keywords as required field labels such as if!: _, fixing a discrepancy with the spec.

cmd/cue

The new cue refactor imports command rewrites import paths, making it easy to migrate between module locations and major versions.

The new cue mod mirror command copies modules from one registry to another.

cue get go should no longer attempt to import types from the Go standard library as CUE, which caused errors.

Hidden files and files with build tags should now be correctly filtered when loading a single CUE package.

Encodings

Loading binary files, such as via @embed(file="foo", type=binary), no longer requires the input to be valid UTF-8.

⚠️ The JSON Schema decoder now imports schema descriptions as CUE doc comments, which required a change to encoding/jsonschema.Config.DefineSchema.

Go API

⚠️ The long-deprecated cue.Runtime methods Parse, FromExpr, CompileFile, and CompileExpr are now removed.

module.SplitPathVersion and module.ParseImportPath have been deprecated in favor of cue/ast.SplitPackageVersion and cue/ast.ParseImportPath package to consolidate the API.

The new mod/module.Version.Compare method is added in favor of module.Sort, which is now deprecated.

The new mod/modfile.File.ModuleForImportPath function allows resolving a module and default major version for a package without consulting a registry.

The new mod/modregistry.Client.Mirror method implements the logic behind the new cue mod mirror command.

Full list of changes since v0.12.0
  • encoding/jsonschema: support x-kubernetes-embedded-resource by @rogpeppe in 0cd0a0c
  • encoding/jsonschema: initial support for Kubernetes CRDs by @rogpeppe in 0dcaff5
  • cmd/cue: mention --inject-vars/-T flag for injection help by @myitcv in 90c1965
  • cue/load: respect build tags when determining package by @rogpeppe in 58e09ee
  • internal/mod/modimports: exclude hidden CUE files by @rogpeppe in 8f2c89c
  • cmd/cue, internal/mod/modimports: add test cases for issue 3795 by @rogpeppe in 2742aba
  • cue/load: use iterator range by @rogpeppe in 9ba4189
  • mod/module: add Version.Compare by @mvdan in 931fecb
  • all: start making more use of strings.Cut by @mvdan in 7d62514
  • all: unconvert -apply ./... by @mvdan in cbed854
  • internal/ci: update Go and goreleaser by @mvdan in bebbaa9
  • core/toposort: stop trying to order structinfos/structlits by @cuematthew in bc6c485
  • internal/cuetxtar: Append \n to generated txtar file content by @cuematthew in 5d2da07
  • cmd/cue: adjust the detection of Go standard library packages by @mvdan in 153fc8a
  • cmd/cue: actually drop unsupported Go std types in get go by @mvdan in 97cbf7e
  • cmd/cue: add testscript reproducing get go issues with std packages by @mvdan in 9a53c81
  • internal/_e2e: remove unused CUE_REGISTRY_TOKEN env var by @mvdan in 239f3d3
  • encoding/jsonschema: delete code for Go 1.22 by @mvdan in 24e90ed
  • update golang.org/x dependencies by @mvdan in b6618cc
  • update various dependencies unlikely to cause breakage by @mvdan in 66f9e79
  • all: use a few more newer std APIs by @mvdan in 538fb69
  • core/toposort: Do not calculate cycles within an SCC by @cuematthew in d73e690
  • cue/parser: allow if as a label for a required field by @haoqixu in 18367a6
  • encoding/jsonschema: support single schema not at root by @rogpeppe in cdc4123
  • cmd/cue: fix refactor imports over multiple modules by @rogpeppe in 7cc1de3
  • cue.mod: use exp3 curated modules by @myitcv in fca4a5f
  • internal/core/adt: fix counter issue by @mpvl in a0c6dfe
  • internal/core/adt: fix edge case in structural cycles with structure sharing by @mpvl in 966a504
  • internal/core/adt: fix structural cycle stack overflow by @mpvl in a66eaf3
  • internal/core/adt: remove Inline check by @mpvl in 7bb676e
  • internal/core/adt: make inline expressions addressable by @mpvl in 35ec59b
  • encoding/openapi: convert remaining cue->json tests to txtar by @cuematthew in ba1084a
  • encoding/openapi: convert test suite to txtar by @cuematthew in 374c59e
  • internal/core/adt: do not hasNonCycle in one case by @mpvl in 52c02d0
  • internal/core/adt: refactor unifyNode by @mpvl in e55c7a8
  • internal/core/adt: add tests for issue 3634 by @mpvl in 8ed768a
  • internal/encoding: don't interpret files as UTF8 with the binary encoding by @nichtsundniemand in 0b36c4e
  • cue/interpreter/embed: remove obsolete TODOs by @mvdan in 8585568
  • cmd/cue/cmd: show incorrect handling of binary files when embedded by @nichtsundniemand in 073d23c
  • encoding/jsonschema: pass comments to DefineSchema by @rogpeppe in 880023b
  • Revert "encoding/jsonschema: pass comments to DefineSchema" by @mvdan in b6f250e
  • internal/core/adt: propagate default marker in single nested value by @mpvl in 26a698f
  • cmd/cue: stop marking the login command as experimental by @mvdan in 324b3da
  • internal/core/adt: add tests for issue 3779 by @mpvl in 8b80c3d
  • cmd/cue: embed support is no longer experimental by @mvdan in dce7fda
  • encoding/jsonschema: pass comments to DefineSchema by @rogpeppe in 7a3708e
  • cue/parser: allow for as label for required field by @haoqixu in fc8791f
  • mod/modregistrytest: move from internal/registrytest by @mvdan in b14cfde
  • internal/core/adt: fix FromDef by @mpvl in df327a6
  • cmd/cue/cmd: add test for edge case by @mpvl in 587d5a1
  • internal/core/adt: shorten closeContext graph depth by @mpvl in b17ea50
  • all: start using slices.Backward by @mvdan in 66d4c35
  • internal/vcs: use os.CopyFS from Go 1.23 by @mvdan in 873afd5
  • cue: tweak cue.Value.Decode with Go std changes by @mvdan in 4e0cc47
  • internal/core/adt: remove unnecessary clearing of CloseInfo by @mpvl in 3ed6d8d
  • internal/core/adt: hoist feature checking logic by @mpvl in ae5a017
  • internal/core/adt: do not add arc dependencies for some nodes by @mpvl in 98a3f93
  • internal/core/adt: prepare for shortening root by @mpvl in 58b3e7d
  • internal/core/adt: add test for closeContext graph shortening by @mpvl in 0d33c2e
  • internal/core/adt: simplify ellipsis logic by @mpvl in 694d295
  • internal/core/adt: fix bug when merging closing struct with ellipsis by @mpvl in 7822519
  • internal/core/adt: add ...
Read more

v0.12.0

30 Jan 11:54
Compare
Choose a tag to compare

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
  • core/toposort: Correct CloseInfo Decl by @cuematthew in db9cc73
  • cmd/cue: stop help text implying support for globs by @jpluscplusm in 870bfc2
  • core/convert: Correct conversion of array types by @cuematthew in 8dc16dd
  • cue/testdata: update out/eval/stats after concurrent merges by @mvdan in e9ad52f
  • core/convert: Ensure Go -> CUE conversion respects struct field order by @cuematthew in 60c33d8
  • internal/core/adt: force finalizing of shared values by @mpvl in f752335
  • internal/core/adt: add tests for 3648 by @mpvl in 72c7c27
  • internal/core/adt: finalize disjunctions once known by @mpvl in 4f4e4d5
  • internal/core/adt: add test for issue 3699 by @mpvl in 06f2f87
  • cue: clean up how we marshal CUE numbers as JSON by @mvdan in 5cf504f
  • internal/core/adt: fix completion-related counter issue by @mpvl in 98692a5
  • internal/core/adt: fix sharing-related counter issue by @mpvl in 105b8b7
  • internal/core/adt: fix EVAL counter issue by @mpvl in a833722
  • internal/core/adt: fix disjunction counter issue by @mpvl in ad7b84b
  • internal/core/adt: fix disjunction error counter issue by @mpvl in 079442c
  • core/toposort: Stop using RawString by @cuematthew in f53f655
  • internal/core/adt: remove closedness for ToDataAll by @mpvl in 1ac3fe0
  • internal/core/adt: add tests for issue 3694 by @mpvl in f02d1f1
  • enable one more staticcheck check by @mvdan in 17c5d0b
  • update golang.org/x/... by @mvdan in 2efb244
  • internal/ci: update pinned Go for the next release by @mvdan in 775ce67
  • internal/core/adt: fix name of method by @mpvl in ac4c7d0
  • internal/core/adt: several logging improvements by @mpvl in 62b3005
  • internal/core/dep: fix handling sharing in non-rooted nodes by @mpvl in c8170aa
  • all: enable toposort by default by @cuematthew in f8defbb
  • internal/core: search harder for BinExprs in toposort by @cuematthew in 9caec6f
  • cmd/cue: reject login --token="" by @mvdan in 6ada21c
  • cmd/cue: add test for 3646 by @mpvl in 18f0ae8
  • internal/core/adt: prevent e...
Read more

v0.12.0-rc.1

28 Jan 16:04
Compare
Choose a tag to compare
v0.12.0-rc.1 Pre-release
Pre-release

This release fixes more bugs in the new evaluator and toposort, in preparation for a final release.

Evaluator

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 since the last release.

CL 1207714 fixes a closedness issue which resulted in incorrect errors.

CL 1207910 fixes a disjunction issue which could cause incorrect "undefined field" errors.

CL 1207912 fixes a regression which could cause "not properly initialized" errors.

CL 1207715 fixes a panic which could occur in the new topological sorting of fields.

CL 1207908 ensures that conversion 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.

v0.12.0-alpha.2

22 Jan 17:02
Compare
Choose a tag to compare
v0.12.0-alpha.2 Pre-release
Pre-release

This release fixes many bugs in the new evaluator, enables the toposort experiment by default, and introduces cue exp gengotypes.

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

Evaluator

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 1206123, 1206178, 1206284, 1206321, and 1206385 fix a number of disjunction issues leading to incorrect behavior.

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

CLs 1206823, 1207237, and 1207314 fix a number of closedness issues which resulted in missing or incorrect errors.

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

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

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, in preparation for v0.12.0. Topological sorting produces a more principled ordering of fields as produced by cue export and cue eval. The intention 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. An issue for gathering feedback is available.

Go API

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.

cmd/cue

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

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

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

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.

⚠️ 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.12.0-alpha.1
  • update golang.org/x/... by @mvdan in 2efb244
  • internal/ci: update pinned Go for the next release by @mvdan in 775ce67
  • internal/core/adt: fix name of method by @mpvl in ac4c7d0
  • internal/core/adt: several logging improvements by @mpvl in 62b3005
  • internal/core/dep: fix handling sharing in non-rooted nodes by @mpvl in c8170aa
  • all: enable toposort by default by @cuematthew in f8defbb
  • internal/core: search harder for BinExprs in toposort by @cuematthew in 9caec6f
  • cmd/cue: reject login --token="" by @mvdan in 6ada21c
  • cmd/cue: add test for 3646 by @mpvl in 18f0ae8
  • internal/core/adt: prevent early decrements in comprehensions by @mpvl in bdc2929
  • internal/core/adt: decrement DEFER dependencies in overlay by @mpvl in 6b292d4
  • internal/core/adt: break notification dependency on structural cycle by @mpvl in ae730eb
  • internal/core/adt: fix counter related to close builtin by @mpvl in aa6781f
  • internal/cueexperiment: keep all past experiments around by @mvdan in 74c12e0
  • internal/core/adt: handle dependencies fully in overlay by @mpvl in e34f770
  • internal/encoding/gotypes: ignore definitions or fields via @go(-) by @mvdan in 58a8351
  • internal/encoding/gotypes: better support for CUE versus Go package names by @mvdan in a1d8099
  • internal/core/adt: hoist dependency code by @mpvl in 7d159b3
  • internal/core/adt: split ccArc by @mpvl in 4d3eafa
  • internal/core/adt: prepare to differentiate types of arcs and notify by @mpvl in 44a2e75
  • internal/core/adt: hoist dependency breaking code by @mpvl in ba0639e
  • internal/core/adt: rename cc to dst by @mpvl in 43a313a
  • internal/core/adt: split addDependency by @mpvl in 06f5289
  • internal/core/adt: hoist dependency-related code into dep.go by @mpvl in f3d367a
  • internal/core/adt: hoist closedness related code by @mpvl in db6a8b9
  • internal/core/adt: move block of code by @mpvl in 6a60de5
  • internal/core/adt: hoist dependency code from debug by @mpvl in fc9720c
  • internal/core/adt: split closeContext.arcs by @mpvl in c2ebfdb
  • internal/core/adt: simplify linkNotify by @mpvl in 13f38c9
  • internal/core/adt: fix EVAL counter issue by @mpvl in 9f913e0
  • internal/core/adt: fix counter issue by @mpvl in 0efb5e8
  • internal/core/adt: add disjunction info as blob to debug output by @mpvl in c880efb
  • internal/core/adt: fix constraints deduplication by @mpvl in 053f47b
  • internal/core/adt: add test for 3638 by @mpvl in b1eaedd
  • internal/core/adt: copy sharedID across disjunctions by @mpvl in 635d23b
  • internal/core/adt: add test for 3679 by @mpvl in bdebb8a
  • internal/core/adt: propagate completion signal if disjunction is resolved by @mpvl in 5ce7ba4
  • internal/core/adt: add test for 3681 by @mpvl in 682462a
  • internal/core/adt: always do decrement accounting by @mpvl in 8a73d2b
  • internal/core/adt: add tests for 3672 and 3606 by @mpvl in d57d885
  • internal/core/adt: add disjunction information in log header by @mpvl in fbfff68
  • cmd/cue: fix a regression with cue get go dropping CUE files by @mvdan in b193af0
  • cmd/cue: add a test case to reproduce #3644 by @mvdan in c94fd55
  • internal/encoding/gotypes: disjunctions of many kinds are not TODOs by @mvdan in 4d852c8
  • internal/encoding/gotypes: generate disjunctions of structs as a map by @mvdan in 97b24b2
  • internal/core/adt: hoist logging-related code into separate file by @mpvl in d113c59
  • internal/core/adt: initialize erroneous optional fields in disjunctions by @mpvl in 0ad6826
  • internal/core/adt: remove pattern optimization by @mpvl in 05f5d76
  • internal/core/adt: add test for 3670 by @mpvl in 9ee56f7
  • internal/core/adt: fix validator closedness issue by @mpvl in 9e85cd7
  • internal/core/adt: add tests for 3639 and 3661 by @mpvl in d0564de
  • internal/core/adt: do not free vertex by @mpvl in 393e9fa
  • internal/core/adt: reduce counter issues by @mpvl in ed235a8
  • internal/core/adt: do not force externalDeps for disjunctions by @mpvl in 12437a2
  • internal/core/adt: use explicit hole id by @mpvl in 681ec9f
  • internal/encoding/gotypes: obey @go(,type=) for optional fields by @mvdan in f62bb36
  • cmd/cue: add gengotypes test cases overriding a pointer type by @mvdan in 1b787cd
  • cmd/cue: new command: cue mod rename by @rogpeppe in 416adfc
  • encoding/jsonschema: do not generate defaults by @rogpeppe in fdf92d1...
Read more

v0.11.2

22 Jan 13:01
Compare
Choose a tag to compare

This release includes fixes for bugs which were uncovered and resolved in the last few weeks.

Evaluator

CL 1206279 fixes a regression in the old evaluator which could lead to "conflicting value" errors.

cmd/cue

CL 1207330 fixes a regression where cue get go stopped copying some CUE files from Go package directories.

CL 1207402 fixes a regression where cue def --inline-imports could result in invalid CUE which failed to evaluate.

Full list of changes since v0.11.1
  • internal/cueversion: bump LanguageVersion for the next release by @mvdan in 079dc4a
  • internal/ci: update pinned Go for the next release by @mvdan in b1a57a5
  • internal/core/dep: fix handling sharing in non-rooted nodes by @mpvl in 8d97e7a
  • cmd/cue: add test for 3646 by @mpvl in 815cb30
  • cmd/cue: fix a regression with cue get go dropping CUE files by @mvdan in 5b0e411
  • cmd/cue: add a test case to reproduce #3644 by @mvdan in 801f976
  • internal/core/adt: fix let issue for eval v2 by @mpvl in a1fbeaa
  • internal/core/adt: add tests for 3590 and 3591 by @mpvl in 0ae498f

v0.12.0-alpha.1

19 Dec 15:02
Compare
Choose a tag to compare
v0.12.0-alpha.1 Pre-release
Pre-release

This release fixes many bugs in the new evaluator, enables the embedding experiment by default, and further improves JSON Schema support.

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

Evaluator

CLs 1204365, 1205361, and 1205363 fix a number of closedness issues in the new evaluator, which were spotted thanks to user reports and Unity testing.

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

CL 1205861 enables the Embedding proposal via CUE_EXPERIMENT=embed by default, now that the proposal has been moved to a "likely accept" state for v0.12.

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.

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 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.

Encodings

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.

Full list of changes since v0.11.0
  • cmd/cue: remove support for CUE_DEBUG_SORT_ARCS by @mvdan in f2775f8
  • internal/ci: update Go and goreleaser versions for the next release by @mvdan in 962fafa
  • update most dependencies ahead of v0.12.0-alpha.1 by @mvdan in 18669a7
  • internal/cueexperiment: enable embed experiment by default by @mvdan in 1b2d11c
  • encoding/jsonschema: respect Config.PkgName by @rogpeppe in 4f8b741
  • encoding/jsonschema: add test for Config.PkgName by @rogpeppe in d5de8d4
  • encoding/jsonschema: implement Config.DefineSchema by @rogpeppe in 0112a33
  • evaluator: add regression test to lock in evalv3 wrt #3567 by @myitcv in 92b8f6f
  • cmd/cue: fix spelling of CUE_EXPERIMENT for evalv2 by @myitcv in 54c734c
  • encoding/jsonschema: update external test errors by @rogpeppe in c4ef079
  • encoding/jsonschema: refactor reference handling by @rogpeppe in 028c6f3
  • encoding/jsonschema: add structBuilder type by @rogpeppe in ccaee22
  • cue/load: assume that Config.Registry is set when SkipImports is false by @mvdan in 33945a2
  • all: sunset CUE_EXPERIMENT=modules by @mvdan in c8033e9
  • internal/astinternal: add IncludePointers by @rogpeppe in 950f7fb
  • encoding/openapi: fix updating golden files in tests by @rogpeppe in 6e34b9e
  • encoding/jsonschema: define isTop and isBottom functions by @rogpeppe in 5fdf0c2
  • encoding/jsonschema: do not use explicit phase for TODO constraints by @rogpeppe in 9639ed8
  • cue/ast/astutil: ensure imports always start a new section by @rogpeppe in 226aac1
  • cue/ast/astutil: add test for file-level comments joining with imports by @rogpeppe in def8bcf
  • cue/ast: remove outdated docs by @rogpeppe in 1ea52f1
  • internal/mod/modload: sort module versions when adding a new dependency by @mvdan in 2be40ea
  • all: CUE_EXPERIMENT=modules no longer needs to be set in tests by @mvdan in eaea301
  • cue: enable CUE_EXPERIMENT=decodeint64 by default by @mvdan in 0005c22
  • internal/core/adt: remove resolved TODO by @mvdan in 5bf869e
  • cmd/cue: add new CUE_EXPERIMENT and CUE_DEBUG flags to help environment by @mvdan in 4e92634
  • cue: add more godoc links by @mvdan in 0e99c20
  • cue: remove Instance.Doc by @mvdan in 54dc544
  • cue/load: remove Config.BuildTags by @mvdan in 49a53d2
  • README: update version number in installation example by @elzapp in 1f15584
  • internal/core/adt: more pruning in partial disjunction check by @mpvl in a03ed2e
  • internal/core/adt: support simplifying string bounds by @mpvl in 6d15591
  • internal/core/adt: order bound error messages by @mpvl in d298a53
  • internal/core/adt: fix bug in bound simplification by @mpvl in f9e5b6a
  • internal/core/adt: revert recent change by @mpvl in 00fa80a
  • internal/core/adt: patch performance issue related to error reporting by @mpvl in f1ea2ff
  • internal/core/adt: alternative algorithm for splitting trees by @mpvl in 6c86b41
  • internal/core/adt: fix closedness bug with patterns by @mpvl in 4ae75f8
  • internal/core/adt: pass closeContext to openDebugGraph by @mpvl in 8aa5769
  • internal/core/adt: always create new closeContext on reference by @mpvl in 9b61fc0
  • cue: use embedding for UnifyAccept in V3 by @mpvl in d471ca1
  • internal/core/adt: add various closedness tests by @mpvl in cce50f4
  • internal/core/adt: cleanup some todos by @mpvl in 5195004
  • internal/core/adt: also handle __no_sharing for V2 by @mpvl in 06cf5f4
  • internal/ci: use pull_request_target for PR CI jobs by @mvdan in 5149ebd
  • internal/core/adt: fix dropping of field by @mpvl in 432c114
  • internal/core/adt: make Conjuncts type ConjunctGroup by @mpvl in 787d04c
  • cmd/cue: add regression test for #3616 by @myitcv in f99441a
  • internal/core/adt: simplify code by @mpvl in f7d3973
  • internal/core/adt: add test for dropped field issue by @mpvl in 4c7ee01
  • internal/core/adt: allow selectively turning off sharing by @mpvl in dc1ef63
  • cue/parser: always allow predeclared identifiers on RHS by @mpvl in ec9117a
  • cmd/cue: deduplicate the use of CUE_EXPERIMENT=evalv3 by @mvdan in 46c1cb2
  • internal/core/runtime: consistently follow CUE_DEBUG env var flags by @mvdan in d5527cf
  • cmd/cue: add a testscript for CUE_DEBUG=sortfields working with the Go API by @mvdan in 4258e9a
  • internal/core/adt: close previously fixed issue by @mpvl in 5ac1b8a
  • internal/core/adt: add tests for Issue 3535 by @mpvl in 698da05
  • internal/ci: use the new tipdeploy workflow in cuelang.org by @myitcv in 9f217e1
  • cue/errors: simplify printError by @mvdan in 4ce128d
  • cue: use Value.ctx helper method consistently by @mvdan in 5d8f2cd
  • internal/astinternal: make it easier to debug references by @rogpeppe in 0b06bd5
  • encoding/jsonschema: remove isSchema field by @rogpeppe in 781f140
  • enable and fix "value never used" staticcheck rule by @mvdan in 6ef4f68
  • enable and fix "non-generic receiver names" staticcheck rule by @mvdan in 55166dd...
Read more

v0.11.1

18 Dec 15:57
Compare
Choose a tag to compare

This release includes fixes for bugs which were uncovered and resolved in the last few weeks.

Modules

CL 1205761 fixes a crash which could occur when using cue mod get on a module with existing dependencies.

CL 1204614 fixes a regression where loading a CUE package whose directory name ends with .cue was no longer working.

Full list of changes since v0.11.0
  • internal/ci: update Go and goreleaser versions for the next release by @mvdan in f9cb3ee
  • internal/cueversion: bump for v0.11.1 by @mvdan in be16614
  • internal/mod/modload: sort module versions when adding a new dependency by @mvdan in 845f7e2
  • cue/load: support loading a CUE package whose directory ends with .cue by @mvdan in a725c38
  • doc: don't vendor a copy of DCO, as it is under another license by @jas4711 in 971ce58