Skip to content
Compare
Choose a tag to compare

This release includes various bug fixes, including fixing some crashes. It also fixes a memory leak that would cause long-running servers to OOM (see #1418). It also now supports Go 1.18.

It also fixes various builtin extensions.

This release also makes a lot of preparations for the upcoming comprehension rework, which will allow us to do all kinds improvements and performance enhancements.

As a reminder: users can register their projects with unity, our regression and performance testing setup. unity is used to ensure that a project's CUE evaluations do not unexpectedly stop working, or regress in terms of performance. unity continues to catch multiple issues with each release. Adding your project to unity not only guarantees that we will not break your tests (if we do, we will work with you to fix your CUE code), but it also helps to improve the quality of each CUE release. We are in the process of adding support for adding private projects to unity.

Thank you to @benmoss, @cuichenli, @danbison, @emcfarlane, @eonpatapon, @jared-gs, @jdreaver, @jlongtine, @mattmoor, @mvdan, @oncilla, @roidelapluie, @slewiskelly, @xinau, and @yannk for contributing to this release!

Language changes

This release removes all remaining support for quoted identifiers. Although this hasn't been supported for a while, there were still parts of the code that handled them, resulting in cryptic error messages.

Core evaluator

This release sees an overall improvement in error location reporting. These changes are quite substantial but largely, aside from a few resulting bug fixes, do not alter behavior.

Builtins

net

Add CIDR range verification function.

regexp

Add ReplaceAll and ReplaceAllLiteral

time

Fixes a hermeticity issues where a local time zone may be selected. Added FormatString to ultimately replace Format, where Format will first have to be deprecated.

Add FormatString, FormatDuration and Split

tool/file

Add MkdirTemp, RemoveAll

tool/http

Add Support for TLS settings.

Changelog

  • 5c43a87 all: apply Go 1.18's gofmt -s
  • 41ad3a0 all: bump x/text
  • e74624b all: drop golang.org/x/xerrors
  • b6cdc74 all: format .cue files in txtar archives
  • 054cc31 all: move to go1.17-based go.mod
  • f396ea8 all: upgrade github.com/spf13/cobra to v1.4.0
  • f26cc29 all: upgrade go-internals
  • 83a1700 build: fix typo inclduded -> included
  • dc2c9e0 ci: add Go 1.18 and bump action and Go versions
  • f44242c ci: optimize CI build runtimes
  • 256f1f9 ci: update to the latest goreleaser version
  • 935a926 cmd/cue/cmd: make get go work with go 1.18
  • 37cc8ac cmd/cue/cmd: support byte in get go
  • 5127136 cmd/cue/cmd: support uintptr in get go
  • 69e2dcc cmd/cue: make long tests pass with Go 1.18
  • aca00a0 cmd/cue: thread cue.Context throughout calls
  • 583c11e cmd/import: fix typo in doc
  • 89d6078 crypto/ed25519: support signature verification
  • 6b138e4 cue/load: remove some unused code
  • 4136481 cue/tools/flow: allow tasks in hidden fields
  • 699ce65 cue: allow incomplete errors in Fields method
  • 71b43a8 cue: fix doc string for CompileBytes and references
  • 84d3cad cue: fix IsClosed
  • 24c9117 cue: fix TextUnmarshal bug in Decode
  • b1edc14 cue: fix nil pointer deref in BuildInstances
  • a7eda13 cue: remove all support for quoted identifiers
  • 49e295b cue: try harder to find a position for Pos
  • 2eb7d1e doc/ref/spec.md: fix hello world example in spec
  • 1c52d6a doc/spec: specify default constraint is not implemented
  • ba164f5 doc: delete whitespace in README to test master build
  • a6995f5 doc: fix "click" typo
  • eaaf5f0 doc: fix up k8s tutorial
  • 7627c93 doc: mention the commit message hook for --signoff
  • 2020208 doc: remove duplicate GerritHub clone instructions
  • b67dc4d interal/core/adt: improve error locations
  • fa141c2 internal/cmd/qgo: make go 1.18 compatibility
  • 569fcbd internal/core/adt: add nested logging support
  • 09c1ee0 internal/core/adt: adjust error positions
  • 0a4d48d internal/core/adt: change to incomplete error
  • b995f5b internal/core/adt: debug options for sorting arcs
  • 448b94c internal/core/adt: don't yield struct on comprehension
  • 1e45d06 internal/core/adt: fix closedness for API disjunctions
  • 6b37a01 internal/core/adt: get rid of NotExistError
  • e70db24 internal/core/adt: hoist code to prep for comprehension change
  • 8f3c71b internal/core/adt: introduce Comprehension type
  • f045a5a internal/core/adt: make comprehension value an Expr
  • b2d9e16 internal/core/adt: merge if and for comprehension lists
  • e499dae internal/core/adt: pass Conjunct to addVertexConjuncts
  • 28f8d47 internal/core/adt: performance: improve lists disambiguation
  • 49fdab8 internal/core/adt: prepare for field conflict message
  • e0577bb internal/core/adt: prevent state erasure
  • be2ee9b internal/core/adt: prevent state inversion
  • 7cdcc70 internal/core/adt: reintroduce Conjunct.Expr
  • 0e634cf internal/core/adt: report error for integer fields
  • 975f57c internal/core/adt: store Ellipsis instead of Expr in Additional
  • 2421553 internal/core/adt: track positions for incomplete types
  • 8dee602 internal/core/adt: use partial lookup
  • 19782a6 internal/core/dep: prevent crash
  • 195cdf7 internal/core/runtime: don't share import cache
  • c561f1f internal/core: automated rename
  • 28c1adb internal/cuetxar: provide CUE_FORMAT_TXTAR to format .cue files
  • 4cbd2e6 pkg/crypto/ed25519: format generated test case
  • 189de92 pkg/net: add CIDR range verification function
  • 37eb22b pkg/regexp: add ReplaceAll and ReplaceAllLiteral
  • 53a108d pkg/regexp: bring docs more inline with Go equivalents
  • fe20132 pkg/regexp: delete duplicate test case in txtar
  • 08fa1c7 pkg/regexp: reorder for ease of maintenance
  • a15720b pkg/time: add FormatDuration
  • 71e9d03 pkg/time: add FormatString and Split
  • 65ff0f4 pkg/time: fix hermeticity issue
  • e32817a pkg/time: use time.UTC for ParseInLocation
  • 977d353 pkg/tool/cli: Fix Ask task
  • 8dee549 pkg/tool/file: add MkdirTemp, RemoveAll
  • da75cdf pkg/tool/http: add tls settings
  • ffb044f pkg/tool/http: check tls.verify exists
  • 05f74a8 pkg: remove usage of qgo in go generate
  • 04ac666 tools/flow: add Value() to retrieve controller value
  • a03817f tools/flow: fix test race
  • 1b4b7e9 tools/trim: appropriately label vertex
  • 8a2e832 tools/trim: don't remove structs with comprehensions

Full Changelog: v0.4.2...v0.4.3

Docker images

  • docker pull docker.io/cuelang/cue:0.4.3
Compare
Choose a tag to compare
Pre-release

This release fixes a couple of bugs and slight incompatibilities introduced with the last release and adds various documentation fixes.

Changelog

  • 41ad3a0 all: bump x/text
  • f396ea8 all: upgrade github.com/spf13/cobra to v1.4.0
  • 83a1700 build: fix typo inclduded -> included
  • aca00a0 cmd/cue: thread cue.Context throughout calls
  • 583c11e cmd/import: fix typo in doc
  • 2eb7d1e doc/ref/spec.md: fix hello world example in spec
  • ba164f5 doc: delete whitespace in README to test master build
  • ffb044f pkg/tool/http: check tls.verify exists
  • a03817f tools/flow: fix test race

Docker images

  • docker pull docker.io/cuelang/cue:0.4.3-beta.2
Compare
Choose a tag to compare

v0.4.3-beta.1

Pre-release
Pre-release

This release includes various bug fixes, including fixing some crashes. It also fixes a memory leak that would cause long-running servers to OOM (see #1418).

It also fixes various builtin extensions.

This release also makes a lot of preparations for the upcoming comprehension rework, which will allow us to do all kinds improvements and performance enhancements.

As a reminder: users can register their projects with unity, our regression and performance testing setup. unity is used to ensure that a project's CUE evaluations do not unexpectedly stop working, or regress in terms of performance. unity continues to catch multiple issues with each release. Adding your project to unity not only guarantees that we will not break your tests (if we do, we will work with you to fix your CUE code), but it also helps to improve the quality of each CUE release. We are in the process of adding support for adding private projects to unity.

Language changes

This release removes all remaining support for quoted identifiers. Although this hasn't been supported for a while, there were still parts of the code that handled them, resulting in cryptic error messages.

Core evaluator

This release sees an overall improvement in error location reporting. These changes are quite substantial but largely, aside from a few resulting bug fixes, do not alter behavior.

Builtins

net

Add CIDR range verification function.

regexp

Add ReplaceAll and ReplaceAllLiteral

time

Fixes a hermeticity issues where a local time zone may be selected. Added FormatString to ultimately replace Format, where Format will first have to be deprecated.

Add FormatString, FormatDuration and Split

tool/file

Add MkdirTemp, RemoveAll

tool/http

Add Support for TLS settings.

Full Changelog: v0.4.2...v0.4.3-beta.1

Changelog

  • 71b43a8 Fix doc string for CompileBytes and references
  • b6cdc74 all: format .cue files in txtar archives
  • 054cc31 all: move to go1.17-based go.mod
  • f44242c ci: optimize CI build runtimes
  • 89d6078 crypto/ed25519: support signature verification
  • 4136481 cue/tools/flow: allow tasks in hidden fields
  • 699ce65 cue: allow incomplete errors in Fields method
  • 84d3cad cue: fix IsClosed
  • 24c9117 cue: fix TextUnmarshal bug in Decode
  • b1edc14 cue: fix nil pointer deref in BuildInstances
  • a7eda13 cue: remove all support for quoted identifiers
  • 49e295b cue: try harder to find a position for Pos
  • 1c52d6a doc/spec: specify default constraint is not implemented
  • a6995f5 doc: fix "click" typo
  • eaaf5f0 doc: fix up k8s tutorial
  • 7627c93 doc: mention the commit message hook for --signoff
  • 2020208 doc: remove duplicate GerritHub clone instructions
  • b67dc4d interal/core/adt: improve error locations
  • 569fcbd internal/core/adt: add nested logging support
  • 09c1ee0 internal/core/adt: adjust error positions
  • 0a4d48d internal/core/adt: change to incomplete error
  • b995f5b internal/core/adt: debug options for sorting arcs
  • 448b94c internal/core/adt: don't yield struct on comprehension
  • 1e45d06 internal/core/adt: fix closedness for API disjunctions
  • 6b37a01 internal/core/adt: get rid of NotExistError
  • e70db24 internal/core/adt: hoist code to prep for comprehension change
  • 8f3c71b internal/core/adt: introduce Comprehension type
  • f045a5a internal/core/adt: make comprehension value an Expr
  • b2d9e16 internal/core/adt: merge if and for comprehension lists
  • e499dae internal/core/adt: pass Conjunct to addVertexConjuncts
  • 28f8d47 internal/core/adt: performance: improve lists disambiguation
  • 49fdab8 internal/core/adt: prepare for field conflict message
  • e0577bb internal/core/adt: prevent state erasure
  • be2ee9b internal/core/adt: prevent state inversion
  • 7cdcc70 internal/core/adt: reintroduce Conjunct.Expr
  • 0e634cf internal/core/adt: report error for integer fields
  • 975f57c internal/core/adt: store Ellipsis instead of Expr in Additional
  • 2421553 internal/core/adt: track positions for incomplete types
  • 8dee602 internal/core/adt: use partial lookup
  • 19782a6 internal/core/dep: prevent crash
  • 195cdf7 internal/core/runtime: don't share import cache
  • c561f1f internal/core: automated rename
  • 28c1adb internal/cuetxar: provide CUE_FORMAT_TXTAR to format .cue files
  • 4cbd2e6 pkg/crypto/ed25519: format generated test case
  • 189de92 pkg/net: add CIDR range verification function
  • 37eb22b pkg/regexp: add ReplaceAll and ReplaceAllLiteral
  • 53a108d pkg/regexp: bring docs more inline with Go equivalents
  • fe20132 pkg/regexp: delete duplicate test case in txtar
  • 08fa1c7 pkg/regexp: reorder for ease of maintenance
  • a15720b pkg/time: add FormatDuration
  • 71e9d03 pkg/time: add FormatString and Split
  • 65ff0f4 pkg/time: fix hermeticity issue
  • e32817a pkg/time: use time.UTC for ParseInLocation
  • 977d353 pkg/tool/cli: Fix Ask task
  • 8dee549 pkg/tool/file: add MkdirTemp, RemoveAll
  • da75cdf pkg/tool/http: add tls settings
  • 04ac666 tools/flow: add Value() to retrieve controller value
  • 1b4b7e9 tools/trim: appropriately label vertex
  • 8a2e832 tools/trim: don't remove structs with comprehensions

Docker images

  • docker pull docker.io/cuelang/cue:0.4.3-beta.1
Compare
Choose a tag to compare

This patch release largely focuses on bug fixes, but also includes some additions to the cmd/cue cmd tooling layer and builtins. Some of the bug fixes were identified as part of preparing for an upcoming CUE talk at FOSDEM.

Thank you to @brandonbloom, @eonpatapon, @obowersa and @seh for contributing to this release!

Core evaluator

A number of bug fixes relating to edge cases of CUE evaluation. Notably, 1374dc9 fixes some subtle bugs where fields can be missed if patterns are inserted too late.

0aaf4c6 disallows _ as a field label, fixing a bug where the following CUE was previously accepted as valid:

_: 5

This now results in:

cannot use _ as label:
    ./x.cue:1:1

Tooling layer (cmd/cue cmd)

@eonpatapon added Mkdir, MkdirAll to pkg/tool/file. #1502 was raised as a follow-up, a wider review of how the pkg/… API needs to change pre v1.

Spec

@seh contributed to the "Declarations and scope" section, clarifying that top-level let identifiers are scoped to the containing file block.

cmd/cue

@slewiskelly highlighted a regression introduced as far back as aaf6e84 where cmd/cue is used to validate data using a schema. In this regression, CUE inadvertently marks the failures as "fatal", instead of "incomplete" (that is, could be satisfied by making a value more concrete). 04812bf disables schema checking for now whilst we consider a more precise solution.

Builtins

Both pkg/encoding/yaml and pkg/encoding/json now support UnmarshalStream.

Changelog

  • 6bc922c tools/trim: prevent nil-pointer panic
  • 9aeaf70 pkg/encoding/json: implement UnmarshalStream
  • 480b28b pkg/encoding/yaml: implement UnmarshalStream
  • 880863a encoing/json: made independent of pkg/encoding/json
  • 802a852 cmd/cue/cmd: only consider "kind" field for known tasks
  • bd3b6ea cmd/cue: add newline between imported objects
  • 04812bf cmd/cue: fix spurious errors
  • 2fe5251 doc/ref/spec.md: clarify scope of top-level let ID
  • 556f57f doc/tutorial: fix typo in 55_defs.txt
  • f0d03f3 cue/ast: fix typo in docstring
  • f29b460 cmd/cue/cmd: remove stale reference to ::
  • 50d69c9 all: prepare for private repository support in unity
  • 5581d64 doc: fix heading level for div et al builtins
  • 45c54f8 pkg/tool/file: add Mkdir, MkdirAll
  • 34c4f9c Revert "pkg/tool/file: add Mkdir, MkdirAll"
  • 23cc102 pkg/tool/file: add Mkdir, MkdirAll
  • 0aaf4c6 internal/core: disallow _ as field label
  • c1bf550 internal/core/eval: dereference indirections earlier
  • 9f6a40e internal/core/adt: zero-value feature means "invalid"
  • 1374dc9 internal/core/adt: single place for inserting matched patterns

Full Changelog: v0.4.1...v0.4.2

Docker images

  • docker pull docker.io/cuelang/cue:0.4.2
Compare
Choose a tag to compare

v0.4.2-rc.1

Pre-release
Pre-release

This patch release largely focuses on bug fixes, but also includes some additions to the cmd/cue cmd tooling layer and builtins. Some of the bug fixes were identified as part of preparing for an upcoming CUE talk at FOSDEM.

Thank you to @brandonbloom, @eonpatapon, @obowersa and @seh for contributing to this release!

Core evaluator

A number of bug fixes relating to edge cases of CUE evaluation. Notably, 1374dc9 fixes some subtle bugs where fields can be missed if patterns are inserted too late.

0aaf4c6 disallows _ as a field label, fixing a bug where the following CUE was previously accepted as valid:

_: 5

This now results in:

cannot use _ as label:
    ./x.cue:1:1

Tooling layer (cmd/cue cmd)

@eonpatapon added Mkdir, MkdirAll to pkg/tool/file. #1502 was raised as a follow-up, a wider review of how the pkg/… API needs to change pre v1.

Spec

@seh contributed to the "Declarations and scope" section, clarifying that top-level let identifiers are scoped to the containing file block.

cmd/cue

@slewiskelly highlighted a regression introduced as far back as aaf6e84 where cmd/cue is used to validate data using a schema. In this regression, CUE inadvertently marks the failures as "fatal", instead of "incomplete" (that is, could be satisfied by making a value more concrete). 04812bf disables schema checking for now whilst we consider a more precise solution.

Builtins

Both pkg/encoding/yaml and pkg/encoding/json now support UnmarshalStream.

Changelog

  • 6bc922c tools/trim: prevent nil-pointer panic
  • 9aeaf70 pkg/encoding/json: implement UnmarshalStream
  • 480b28b pkg/encoding/yaml: implement UnmarshalStream
  • 880863a encoing/json: made independent of pkg/encoding/json
  • 802a852 cmd/cue/cmd: only consider "kind" field for known tasks
  • bd3b6ea cmd/cue: add newline between imported objects
  • 04812bf cmd/cue: fix spurious errors
  • 2fe5251 doc/ref/spec.md: clarify scope of top-level let ID
  • 556f57f doc/tutorial: fix typo in 55_defs.txt
  • f0d03f3 cue/ast: fix typo in docstring
  • f29b460 cmd/cue/cmd: remove stale reference to ::
  • 50d69c9 all: prepare for private repository support in unity
  • 5581d64 doc: fix heading level for div et al builtins
  • 45c54f8 pkg/tool/file: add Mkdir, MkdirAll
  • 34c4f9c Revert "pkg/tool/file: add Mkdir, MkdirAll"
  • 23cc102 pkg/tool/file: add Mkdir, MkdirAll
  • 0aaf4c6 internal/core: disallow _ as field label
  • c1bf550 internal/core/eval: dereference indirections earlier
  • 9f6a40e internal/core/adt: zero-value feature means "invalid"
  • 1374dc9 internal/core/adt: single place for inserting matched patterns

Full Changelog: v0.4.1...v0.4.2-rc.1

Docker images

  • docker pull docker.io/cuelang/cue:0.4.2-rc.1
Compare
Choose a tag to compare

After an extended break following CUE's migration to cue-lang/cue and multiple pre-releases, the v0.4.1 release mainly focuses on bug fixes. We also renew our pledge to in future release smaller changes more frequently on our way to language stability.

Thank you to @chai2010, @yujunz, @caarlos0, @hrvolapeter, @slewiskelly, @antong, @mvdan, @ameowlia and @palmamartin for contributing to this release!

Project-level changes

  • Create amd64 and arm64 release assets for linux, windows and darwin, with accompanying amd64 and arm64 Docker images and manifests: v0.4.1-beta.6
  • Remove go1.15 from build matrix: v0.4.1-beta.6
  • Improve contribution project contribution guide: v0.4.1-beta.6

Encoders

cmd/cue

  • Support working directory in tool/exec.Run: v0.4.1-beta.6
  • Numerous bug fixes relating to cue eval exporting of let expressions (#1116): v0.4.1-beta.6
  • Fix for cue def bug where multiple list conjuncts resulted in an output containing a {} conjunct: v0.4.1-beta.6

API

Evaluator

  • Fix a number of issues related to the use of aliases in lists by introducing a new scope with list values: v0.4.1-beta.6
  • Fix for issues related to defaults and string and number lists (#1025, #1404): v0.4.1-beta.6
  • Fix for a bug where comprehensions inside a definition resulted in an error (#1404): v0.4.1-beta.6
  • Important fix for bug related to the handling of default values that result in error (#1304 and #1257): v0.4.1-beta.6
  • Various unexpected panics have been fixed, including a panic in the case of circular let declarations (#1042): v0.4.1-beta.6
  • Fix matching of "_" label: v0.4.1-rc.2

Language

This release makes no changes to the language.

Changelog

  • internal/core/runtime: check non-existing builtin packages earlier d4d0f14
  • cue: remove duplicate test code 8fbaf81
  • internal/core/adt: use single return for LoadImport e5c7176
  • internal/core/adt: fix matching of "_" label 3d3f721
  • readme: fix Go version badge 60d6503
  • cue/cuecontext: allow concurrent use 25cfb20
  • gitiles: change logo from SVG to PNG 8a40ef0
  • gitiles: customize navigation bar 28b4257
  • doc: ensure all min Go versions refer to 1.16 79303b6
  • ci: configure GoReleaser to mark prereleases as such 547e5cc
  • ci: only trigger new version events after successful new version 6e68ca4
  • ci: fix GoReleaser arm64 template details 795719e
  • ci: fix target for homebrew tap b68f4c3
  • ci: fix up GoReleaser image template names 02556bc
  • ci: use GoReleaser v1.0.0 e7da62f
  • cue: support ResolveReferences f68e000
  • internal/core/export: keep open lists open d413bb8
  • internal/core/export: fix let exporting 9a040dc
  • pkg: fix default issue for string and numbers lists 910ff4d
  • internal/core/adt: fix regression of dynamic closed fields in definitions 6c30678
  • internal/core/export: treat empty data vertices as structs 9e7d4d6
  • cmd/cue: confirm issues 1152 and 1153 are fixed 4d505e0
  • cmd/cue: get go: ignore anonymous enums eb53c4e
  • internal/core/adt: close open lists for Default b99ce0a
  • cue: auto-unwrap single embedded value in Expr 061e661
  • pkg/internal: compute combined error severity 7922f9b
  • internal/core/export: fix bug with API-generated top-level close c490d4c
  • ci: remove go1.15 from the build matrix e62a95a
  • cue: fix output in ExampleContext f880467
  • internal/core/adt: don't cache incomplete errors for let 9982526
  • cue/testdata: hoist let cycle errors 4f3988f
  • internal/core: use scope for lists 91476ab
  • ci: correct location of unity 718c9a0
  • internal/core/compile: remove unnecessary code f65dd0f
  • cue: fix subsumption bug for disjuntion filtering b89ad85
  • internal/encoding/yaml: upgrade go-yaml.v3 a8b721a
  • encoding/openapi: fix crash in reference 15adb6c
  • cmd/cue/cmd: improve shell arg parsing in tests 4e76bb4
  • internal/core/export: don't add empty temp struct 0e56b82
  • doc/ref/spec.md: include $ in identifier 75c3d6b
  • internal/encoding/yaml: canonicalize non-string map keys c1c2cda
  • encoding/yaml: quote strings more aggressively a83c6c6
  • doc/tutorial/kubernetes: update types b9ac1ea
  • internal/core/adt: fix bound simplification for floats 59bdbb5
  • internal/core/adt: fix disjunction bug 62e876d
  • cue: Expr handles empty lists to or/and builtins 9bb874c
  • cue: define all Op constant values explicitly with that type 72936e4
  • simplify install instructions assuming Go 1.16+ 29a686d
  • doc: revamp contribution guide ahead of contributing live-stream dbf5992
  • ci: update to use go1.17.3 and go1.16.10 9217c4d
  • doc/ref/spec: fix typos and heading anchors 437920e
  • cue: define all Kind constant values explicitly with that type fca61f5
  • spec: Update example with regards to pattern constraints 8031fe7
  • ci: latest Go versions in build matrix ddd96c6
  • feat: update go build matrix 5cf1aa1
  • doc: fix repeated word typos in spec 35c2f3c
  • doc: remove useless whitespace in main README e8550b8
  • doc/contrib: update git codereview change to use -s flag 0f53054
  • cmd/cue: revert version string change ecb17c9
  • ci: improve goreleaser workflow 370fac9
  • doc/tutorial: fix errant use of list operators 38c8f7d
  • ci: tidy up encoding of JSON args to curl a4a38ed
  • ci: re-enable full CI workflows 7d25ee2
  • ci: tidy up quoting of JSON args in workflow commands 59079b1
  • readme: fix top-level CONTRIBUTING guide 5f28bb4
  • readme: link to CoC from main readme and contributing guide 5ab75b8
  • general: use cuelang.org/issues as the general issue link 35c4960
  • github: fix up empty issue template a68df18
  • github: tidy up issue templates 723a7fe
  • general: update unity location 3d9cd71
  • ci: fix Docker workflow 6da50d9
  • all: change references from cuelang/cue to cue-lang/cue 06484a3
  • internal/core/compile: fix let cycle error 20ed9ab
  • ci: fix up new version trigger 0070bb1
  • doc/tutorial/kubernetes: fix invalid user commands aa61ee7
  • doc/tutorial/kubernetes: update k8s version 67bf363
  • cmd/cue: fix up get go docs around "enum" types ec427f9
  • Allow setting working directory for exec.Run 8e053d4
  • interanal/core/runtime: remove commented out fields e8de4b1

Full Changelog: v0.4.0...v0.4.1

Docker images

  • docker pull docker.io/cuelang/cue:0.4.1
Compare
Choose a tag to compare

v0.4.1-rc.2

Pre-release
Pre-release

Changelog

  • 3d3f721 internal/core/adt: fix matching of "_" label
  • 60d6503 readme: fix Go version badge

Docker images

  • docker pull docker.io/cuelang/cue:0.4.1-rc.2

Full Changelog: v0.4.1-rc.1...v0.4.1-rc.2

Compare
Choose a tag to compare

v0.4.1-rc.1

Pre-release
Pre-release

Changelog

  • 25cfb20 cue/cuecontext: allow concurrent use
  • 79303b6 doc: ensure all min Go versions refer to 1.16
  • 8a40ef0 gitiles: change logo from SVG to PNG
  • 28b4257 gitiles: customize navigation bar

Docker images

  • docker pull docker.io/cuelang/cue:0.4.1-rc.1

Full Changelog: v0.4.1-beta.6...v0.4.1-rc.1

Compare
Choose a tag to compare

v0.4.1-beta.6

Pre-release
Pre-release

Bug fixes

After an extended summer break following CUE's migration to cue-lang/cue, this release mainly focuses on bug fixes.

Thank you to @mvdan, @ameowlia, @antong, @slewiskelly, @hrvolapeter, @caarlos0, @yujunz, and @chai2010 for contributing to this release!

Project-level changes

A number of release-related issues that were missed in the migration from cuelang/cue to cue-lang/cue have been fixed. GoReleaser now correctly marks prereleases as such.

The CUE project now uses v1 of GoReleaser and as such we produce both amd64 and arm64 release assets for linux, windows and darwin, with accompanying amd64 and arm64 Docker images and manifests. The homebrew-tap recipe has also been updated to avoid an error message reported via cue-lang/homebrew-tap#1.

As we near the halfway point to go1.18, go1.15 has been removed from the build matrix. The project's policy for previous versions of Go will be formalized in the near future, but is likely to be that each major Go release is supported until there are two newer major releases, with a 3 month grace period following the release of a new major version (3 months being half a 6-month release cycle) before support for the oldest version is dropped. Correspondingly, go install instructions in the README have been updated to drop support for the old-style GO111MODULE form, instead preferring the go install cuelang.org/go@$version form.

Ahead of a live stream focussing on contributing to the CUE project back in November, the contribution guide was updated to provide more detail around the PR workflow. Further improvements will be made to reflect feedback following the livestream.

Encoders

An upgrade to the version of gopkg.in/yaml.v3 used by the CUE project may result in some formatting changes for Yaml output. This new version now also supports better string escaping for YAML v1.1 backwards compatibility support. However, it does not seem to apply these escapes consistently, so for now we added our own implementation (see also #1368 and #1076)

For instance, some unquoted strings might, when consumed by some old YAML parsers, be interpreted as values other than strings (float 60, bool, date-time...). Now:

service: "2222:22" 

is consistently exported to Yaml as:

service: "2222:22" // before RHS was 2222:22

If this more aggressive quoting still proves insufficient, we can consider quoting all string values by default.

cmd/cue

Thanks to @chai2010, a working directory can be set for an exec.Run command in the tooling layer:

import "tool/exec"

command: ls: exec.Run & {
	cmd: "ls"
	dir: "/tmp"
}

cue eval exporting previously resulted in some strange results that involved let expressions (#1116). These bugs have been fixed and corresponding updates made to test expectations in unity. Similarly, a cue def bug where multiple list conjuncts resulted in an output containing a {} conjunct is now fixed (#1284).

API

cue.ResolveReferences has been fixed to work for the KubeVela project, although it is anticipated a better long-term solution is required.

@ameowlia helped fix an issue with a test example for cue.Context.

Various other bug fixes.

Evaluator

91476ab fixes a number of issues related to the use of aliases in lists (#1308), by introducing a new scope with list values. A side effect of this change is that value aliases now work with list values:

y: X = [1, 2, X[0]]   // y: [1, 2, 1]

A long-standing issue with defaults and string and number lists (#1025, #1404) has been fixed such that the following example no longer results in an incomplete-error:

exec cue export

-- x.cue --
package x

import "strings"

#something: {
	image:    string | *"some default"
	toString: strings.Join([image], "")
}

x: #something

A bug where comprehensions inside a definition resulted in an error (#1404) has now been fixed, meaning the following is correctly allowed:

#D: {
	a: foo: 123
	b: {for k, v in a {(k): v}}
}

An important bug related to the handling of default values that result in error has been fixed (#1304 and #1257).

Various unexpected panics have been fixed, including a panic in the case of circular let declarations (#1042).

Language

This release makes no changes to the language.

The CUE spec now correctly defines $ as an identifier (#1264).

Changelog

  • 547e5cc ci: configure GoReleaser to mark prereleases as such
  • 6e68ca4 ci: only trigger new version events after successful new version
  • 795719e ci: fix GoReleaser arm64 template details
  • b68f4c3 ci: fix target for homebrew tap
  • 02556bc ci: fix up GoReleaser image template names
  • e7da62f ci: use GoReleaser v1.0.0
  • f68e000 cue: support ResolveReferences
  • d413bb8 internal/core/export: keep open lists open
  • 9a040dc internal/core/export: fix let exporting
  • 910ff4d pkg: fix default issue for string and numbers lists
  • 6c30678 internal/core/adt: fix regression of dynamic closed fields in definitions
  • 9e7d4d6 internal/core/export: treat empty data vertices as structs
  • 4d505e0 cmd/cue: confirm issues 1152 and 1153 are fixed
  • eb53c4e cmd/cue: get go: ignore anonymous enums
  • b99ce0a internal/core/adt: close open lists for Default
  • 061e661 cue: auto-unwrap single embedded value in Expr
  • 7922f9b pkg/internal: compute combined error severity
  • c490d4c internal/core/export: fix bug with API-generated top-level close
  • e62a95a ci: remove go1.15 from the build matrix
  • f880467 cue: fix output in ExampleContext
  • 9982526 internal/core/adt: don't cache incomplete errors for let
  • 4f3988f cue/testdata: hoist let cycle errors
  • 91476ab internal/core: use scope for lists
  • 718c9a0 ci: correct location of unity
  • f65dd0f internal/core/compile: remove unnecessary code
  • b89ad85 cue: fix subsumption bug for disjuntion filtering
  • a8b721a internal/encoding/yaml: upgrade go-yaml.v3
  • 15adb6c encoding/openapi: fix crash in reference
  • 4e76bb4 cmd/cue/cmd: improve shell arg parsing in tests
  • 0e56b82 internal/core/export: don't add empty temp struct
  • 75c3d6b doc/ref/spec.md: include $ in identifier
  • c1c2cda internal/encoding/yaml: canonicalize non-string map keys
  • a83c6c6 encoding/yaml: quote strings more aggressively
  • b9ac1ea doc/tutorial/kubernetes: update types
  • 59bdbb5 internal/core/adt: fix bound simplification for floats
  • 62e876d internal/core/adt: fix disjunction bug
  • 9bb874c cue: Expr handles empty lists to or/and builtins
  • 72936e4 cue: define all Op constant values explicitly with that type
  • 29a686d simplify install instructions assuming Go 1.16+
  • dbf5992 doc: revamp contribution guide ahead of contributing live-stream
  • 9217c4d ci: update to use go1.17.3 and go1.16.10
  • 437920e doc/ref/spec: fix typos and heading anchors
  • fca61f5 cue: define all Kind constant values explicitly with that type
  • 8031fe7 spec: Update example with regards to pattern constraints
  • ddd96c6 ci: latest Go versions in build matrix
  • 5cf1aa1 feat: update go build matrix
  • 35c2f3c doc: fix repeated word typos in spec
  • e8550b8 doc: remove useless whitespace in main README
  • 0f53054 doc/contrib: update git codereview change to use -s flag
  • ecb17c9 cmd/cue: revert version string change
  • 370fac9 ci: improve goreleaser workflow
  • 38c8f7d doc/tutorial: fix errant use of list operators
  • a4a38ed ci: tidy up encoding of JSON args to curl
  • 7d25ee2 ci: re-enable full CI workflows
  • 59079b1 ci: tidy up quoting of JSON args in workflow commands
  • 5f28bb4 readme: fix top-level CONTRIBUTING guide
  • 5ab75b8 readme: link to CoC from main readme and contributing guide
  • 35c4960 general: use cuelang.org/issues as the general issue link
  • a68df18 github: fix up empty issue template
  • 723a7fe github: tidy up issue templates
  • 3d9cd71 general: update unity location
  • 6da50d9 ci: fix Docker workflow
  • 06484a3 all: change references from cuelang/cue to cue-lang/cue
  • 20ed9ab internal/core/compile: fix let cycle error
  • 0070bb1 ci: fix up new version trigger
  • aa61ee7 doc/tutorial/kubernetes: fix invalid user commands
  • 67bf363 doc/tutorial/kubernetes: update k8s version
  • ec427f9 cmd/cue: fix up get go docs around "enum" types
  • 8e053d4 Allow setting working directory for exec.Run
  • e8de4b1 interanal/core/runtime: remove commented out fields

Docker images

  • docker pull docker.io/cuelang/cue:0.4.1-beta.6
Compare
Choose a tag to compare

In line with our aim to release smaller changes more frequently on our way to language stability, the v0.4.0 release comes just under two months after v0.3.0. It includes one language addition, a fairly significant reshaping of the API and tooling improvements, as well as the usual host of bug fixes, and performance and error message enhancements.

This release includes a more comprehensive implementation of protobuf, supporting textproto and JSON protobuf mappings, and paves the way for binary protobuf support. See the v0.4.0-alpha.1 release notes for more details.

This release also sets the direction for the CUE API, and brings the overall API much closer to where we would like it to go in the run up to v1.0.0. It also prepares the API for the query extension. See the v0.4.0-alpha.2 release notes for more details.

The v0.4.0 minor release follows the pre-v1.0.0 release policy described in the v0.3.0 release notes: it contains backwards incompatible changes discussed below.

As a reminder: users can register their projects with unity. unity is used to ensure that a project's CUE evaluations do not unexpectedly stop working, or regress in terms of performance. We are in the process of adding support for API-based tests, as well as private instances.

Language additions

Tooling

API additions

CUE package additions

Performance and error handling

Backwards incompatible changes

Changelog

b39a2d0 cmd/cue/cmd: avoid roundtrip when printing non-CUE in eval
3b0a537 cmd/cue/cmd: fix bug in resolving builtin package shorthands
cd94426 cue: don't extract embedded values
37bf801 cue: keep sane references for embedded disjunctions in Expr
a4e0f52 encoding/openapi: detect cycles when expanding references