github cue-lang/cue v0.9.0

latest releases: v0.11.0-rc.1, v0.11.0-alpha.5, v0.11.0-alpha.4...
5 months ago

This release includes major changes to Modules and the Evaluator, as well as many other fixes and improvements. A special thanks to Noam Dolovich for numerous contributions to this release!

Modules

Following the Modules proposal v3 being accepted, the modules experiment is now enabled by default in this release. It should no longer be necessary to set CUE_EXPERIMENT=modules, and CUE_EXPERIMENT=modules=0 can be used to disable the experiment. We are not aware of any significant regressions, so please file a bug if you find one.

We have published an FAQ page which should help modules users with the upgrade to v0.9. We will add to this page over the coming weeks to ease the transition into the "new" modules mode.

This release also includes experimental support for the CUE Central Registry at https://registry.cue.works. We have added a cue login command to log into the Central Registry via a GitHub account, and other commands know how to use these credentials when talking to the registry.

To get started with the Central Registry, we have published a tutorial on working with modules and the central registry as well. We will share more details about the Central Registry and support for other login mechanisms in the future. For now, we are looking to get early feedback.

The CUE schema for cue.mod/module.cue is now dictated by the declared language.version value, which is now mandatory. This allows us to change or tighten the schema with future CUE versions without breaking existing users. Use the new cue mod fix command to add the field.

cue mod publish now requires source to publish a module, as described in Proposal 3017. The cue mod init --source flag is added to create a new module with this field.

cue mod publish now includes VCS metadata in published module versions, as described in Proposal 3057.

The cue mod fix command is added, which allows fixing up old cue.mod/module.cue files; see cue help mod fix.

The cue mod edit command is added, which allows some automatic editing of cue.mod/module.cue from the command line; see cue help mod edit.

CL 1193289 teaches $CUE_REGISTRY about a special none registry, causing any matching modules to refuse to fetch or resolve.

CL 1195546 teaches cue mod publish to include a LICENSE file from the VCS repository root if the CUE module subdirectory has none.

CL 1194090 adds the --dryrun, --json, and --out flags to cue mod publish to inspect what would be published as part of a module version.

CL 1194106 adds the cue mod resolve command to show how a module path resolves to a registry in the form of an OCI reference.

CL 1185280 adds cue help modules as a high-level overview of CUE modules.

CL 1194669 restricts the parsing of cue.mod/module.cue files to data-only mode, forbidding any references or comprehensions which may break cue mod commands or cause other issues.

As a reminder, the ongoing and planned work can be seen in the Modules Roadmap.

Evaluator

The new evaluator can now be enabled in the command line via CUE_EXPERIMENT=evalv3, and in the Go API via cuecontext.EvaluatorVersion(cuecontext.EvalV3). The new evaluator already includes a new disjunction algorithm as well as initial structure sharing support; note that structure sharing can be disabled with CUE_DEBUG=sharing=false.

The work is not yet complete, and some known bugs remain, but over 95% of the existing tests are passing and the performance already looks promising. Work on this new evaluator will continue during the next release cycle. We will only turn on the new evaluator by default once we are reasonably confident that there are no significant regressions.

CL 1185458 ensures we detect permanent errors for undefined fields earlier, necessary for the permanent errors fix in tools/flow below.

Subscribe to the Performance umbrella issue for updates, and see the Evaluator Roadmap project for the planned work ahead.

Encodings

The Encodings project was kicked off at a recent CUE Community Update call. As part of this, we now have an #encodings channel on Slack and Discord, as well as an Encodings Roadmap project on GitHub where the ongoing and planned work can be seen.

In this release, the new YAML decoder is available in experimental form and enabled by default, given that all of our tests are already passing. You can disable it via CUE_EXPERIMENT=yamlv3decoder=0. The old YAML decoder will be removed in a future release once we're reasonably confident that no significant regressions are present.

CLs 1193257, 1193394, 1193576, and 1193577 greatly speed up internal/filetypes, used when loading files from disk in cue/load or when encoding/decoding files in cmd/cue.

CL 1193678 teaches cue/load to cache loading files from directories, which avoids repeated work when loading parent directories to form instances.

The changes above, plus cue.Value.IsNull below, should result in a significant speed-up for cmd/cue as well as cue/load when loading many CUE packages or directories. For example, on the main CUE repository, cue fmt ./... went from ~14s to ~0.1s, and cue vet ./... went from ~5s to ~2s.

CL 1193639 teaches internal/filetypes to only load its embedded CUE on first use, allowing any Go programs to skip the ~6ms load time until the first call to a cue/load API, if any.

CL 1195047 fixes the decoding of YAML 1.1 octal numbers so that they no longer result in invalid CUE literals.

cmd/cue

CL 1189314 adds a cue fmt --check flag to list badly formatted files rather than modifying them directly.

CL 1193778 adds a cue fmt --diff flag which displays diffs instead of updating files.

CL 1193962 adds a cue fmt --files flag to interpret the arguments as file paths to walk and recursively format rather than package patterns.

CL 1192180 speeds up cue fmt by ensuring that it only processes each CUE file once, rather than formatting files from parent directories as well.

CL 1185356 tweaks cue/load so that cue fmt is able to format CUE files given directly as arguments even when they belong to different packages.

CL 1193702 ensures that cue get go always generates CUE code from Go time.Duration types and values in a way that is fully compatible with Go's encoding/json library.
CL 1193386 fixes cue fmt --simplify to no longer break complex labels by unquoting string literals within them.

CL 1193934 improves cue fmt so that it does not write to files on disk which are already well formatted.

CL 1194247 tweaks cue help so that it correctly fails when given unknown help topics or commands.

CL 1185473 deprecates the short-form cue somecmd in favor of cue cmd somecmd, as the former caused a number of bugs and slowness when working out which subcommand to execute.

Go API

CL 1193405 adds a cue.Value.IsNull method to mirror cue.Value.Null without constructing error values, making cue.Value.Decode faster in many scenarios, including its use in cue/load via internal/filetypes.

CL 1191227 adds a cue/token.File.Lines getter method, much like go/token.File.Lines was added in Go 1.21.

CL 1193030 ensures that cue/load.Instances always returns instances in a deterministic order, in particular when multiple instances share the same directory.

CL 1194421 fixes a memory leak where using load.Instances to load CUE modules would increase the size of a global cue.Context until the process was terminated.

CL 1187452 teaches tools/flow to fail when a task encounters a permanent error, which were being ignored before.

CL 1191226 teaches cue/literal.ParseNum to support both positive and negative signs for consistency.

CL 1194410 fixes cue/load so that it errors on empty string arguments once again.

CL 1193515 fixes an edge case where cue/format would vertically align fields at different struct levels.

CL 1193585 fixes a bug where cue/format would print trailing commas for list elements after any inline comments, causing broken syntax.

CL 1193759 teaches cue/format to collapse empty lists and structs to a single line for consistent formatting.

CL 1185361 deprecates cue/load.Config.StdRoot, which has not worked as advertised for some time.

CL 1185684 removes the last remaining bits of API which supported quoted identifiers, which had already been deprecated and largely unsupported for years.

Builtins

CL 1193242 teaches encoding/yaml.Unmarshal to reject trailing input, just like encoding/json.Unmarshal already did.

CL 1184631 fixes using math.MultipleOf as a validator function.

CL 1193690 fixes math.MultipleOf as it had an incorrect implementation which could easily return bad results.

CL 1194165 fixes invalid builtin calls so that they correctly result in a "bottom" error.

CL 1194515 fixes structs.MinFields and structs.MaxFields to ignore optional fields, matching the documented behavior.

Full list of changes since v0.8.0
  • internal/mod/modload: remove debugging panic with sprintf by @mvdan in 889da91
  • cmd/cue: suggest cue mod fix when language.version is missing by @mvdan in a229224
  • cmd/cue: add testscripts for backwards and forwards module compatibility by @mvdan in 2cc2c44
  • cmd/cue: test publishing a module with no major version suffix by @mvdan in d3c72bf
  • cmd/cue: add sanity check that 'cue mod publish' is idempotent by @myitcv in 604c577
  • internal/ci: bump pinnedReleaseGo for v0.9.0 by @mvdan in 4c87ab8
  • cmd/cue: remove CUE_VERSION_OVERRIDE from testscripts by @mvdan in c372c04
  • cue/format: fix incorrect quote removal in fmt -s by @NoamTD in b053780
  • mod/modfile: fix up comments in module.cue schema by @myitcv in 2eab1b7
  • cmd/cue: ensure module is tidy before 'mod publish' publishes by @mvdan in b6278c4
  • cmd/cue: add a test for cue mod publish on a non-tidy module by @mvdan in 0c3a848
  • all: use ocimem in its immutable form in all tests by @mvdan in f23bb9f
  • internal/mod/modload: remove dead language.version check in CheckTidy by @mvdan in ba0047e
  • mod: remove unused parameters from APIs by @mvdan in 3c5d18e
  • internal/mod/modload: rip out language.version logic from Tidy by @mvdan in dd4e28e
  • internal/mod/modload: rewrite "missing dependency" errors in CheckTidy by @mvdan in 8f9fa68
  • cmd/cue: suggest cue mod tidy when --check says "not tidy" by @mvdan in 245837e
  • internal/mod/modload: skip over local module requirements in CheckTidy by @mvdan in ebf7dca
  • internal/mod/modload: test that CheckTidy is happy after Tidy by @mvdan in 753536f
  • cmd/cue: correct spelling of dry run flag by @myitcv in 6bbbb9c
  • cmd/cue: copy LICENSE files from VCS root where non exists in module by @myitcv in 19e990d
  • all: remove the last remnants of the old :: definition syntax by @mvdan in 570b83b
  • mod/modzip: sort files by Path before creating zip archive by @myitcv in 10e9cf1
  • cue/load: remove empty file by @mvdan in 74ec639
  • internal/vcs: refactor to prepare for LICENSE file inclusion by @myitcv in a3b1138
  • cue/load: create test data with broken cue dynamically by @NoamTD in 1ea6c49
  • CONTRIBUTING: tidy up the way CUE authors or contributors are tracked by @mvdan in 7490a3d
  • cmd/cue: rework mod publish with git test by @myitcv in 0a1900c
  • cue/load: consistently use canonical import paths to load packages by @mvdan in 26db19b
  • cmd/cue: do not require source to be set for v0.8 language.versions by @mvdan in 73a1c2d
  • cmd/cue: add test cases for publishing with older language.versions by @mvdan in b03dd62
  • cmd/cue: rewrite help environment to be more explicit by @mvdan in 3e19519
  • mod/modcache: remove unused context parameters by @mvdan in a917c57
  • cmd/cue: do not output digest in mod publish by @myitcv in 6cd7bbf
  • cmd/cue: remove 'experimental' guard on modules (commands) by @myitcv in 70832e6
  • cmd/cue: use a consistent directory structure for the modules cache by @mvdan in 21ae0ad
  • cmd/cue: check the structure of CUE_CACHE_DIR after downloading modules by @mvdan in d94b670
  • cmd/cue: remove unnecessary modules env var lines in testscripts by @mvdan in 4cdaa5d
  • cue: fix up iterator godocs to use links by @mvdan in 55b5122
  • all: replace internal.GetPackageInfo with File.PackageName where possible by @mvdan in 7ab8002
  • internal: stop early in GetPackageInfo by @mvdan in a5e77fe
  • cue/load,cue/build: use ast.File.Imports by @mvdan in 32de475
  • cue/load: avoid nil dereference panic if user.Current errors by @mvdan in 40898fe
  • all: drop '// import' canonical path comments by @mvdan in 9e1ffaa
  • cue/load: cache which directories are missing in importPkg by @mvdan in f3b22ba
  • internal/mod/modpkgload: skip fs.Stat before fs.ReadDir by @mvdan in bc40b03
  • internal/mod/modpkgload: don't use modimports.PackageFiles twice by @mvdan in 58cfc7c
  • internal/mod/modimports: add TODO about the naming of PackageFiles by @mvdan in 02eb538
  • cue/load: evaluate only those packages which are needed by @rogpeppe in 3505253
  • cmd/cue/cmd: add more package pattern wildcard test cases by @mvdan in a7c3e38
  • cmd/cue: add test for issue 3155 by @rogpeppe in 0b4d17a
  • internal/mod/modpkgload: a package with no files is an error by @rogpeppe in 6661949
  • internal/mod/modimports: include files from parent directories by @rogpeppe in b71b72d
  • internal/mod: more tests by @rogpeppe in 9c800db
  • cue/load: move no-package-args logic by @rogpeppe in 1a58708
  • mod/module: improve handling of Qualifier in ImportPath by @rogpeppe in 9d3eae5
  • mod/module: add more tests by @rogpeppe in b88cfcf
  • cmd/cue: add more test cases for package resolution by @rogpeppe in d187b40
  • internal/ci: pin to the latest commit of schemastore GH actions schema by @myitcv in 8192239
  • internal/ci: fix 'hotfix' for GitHub Actions oneof by @myitcv in 927c503
  • internal/encoding/yaml: decode invalid YAML 1.1 octals as strings by @mvdan in 4fe848d
  • internal/encoding/yaml: add test cases for YAML 1.1 and 1.2 octals by @mvdan in c41955b
  • cmd/cue: get the working directory once at init time by @mvdan in 9394167
  • all: resolve unused value and yoda conditionals staticcheck warnings by @mvdan in fca1bcc
  • internal/encoding/yaml: add underlying error to "cannot decode V as T" by @mvdan in 2adcaa6
  • all: tidy up deprecation warnings a bit by @mvdan in a6a7002
  • all: resolve a handful of linter warnings by @mvdan in 3ce48c0
  • cue: add a regression test for a closedness bug fixed in evalv3 by @mvdan in a90aec5
  • cuepls: minimal fix to make compilation work vs Go tip by @myitcv in 7451967
  • cue: add a regression test for a disjunction bug fixed in evalv3 by @mvdan in 4900cfc
  • cue/load: replace readimports with cueimports.Read by @mvdan in 7d49080
  • internal/mod/modimports: use cue/parser.ImportsOnly by @mvdan in 7d93bcc
  • internal/mod/modimports: add more syntax edge cases to testdata by @mvdan in c0d6193
  • all: remove various cue.Value.Lookup usages by @NoamTD in 3818528
  • internal/mod/modimports: avoid extra fs.Stat calls in AllModuleFiles by @mvdan in 97bf1a6
  • pkg: remove usages of cue.Runtime in tests by @NoamTD in 51cd5ca
  • internal/ci: update goreleaser version for v0.9.0 by @mvdan in 27689d2
  • internal/registrytest: satisfy staticcheck and gopls by @mvdan in 05453ff
  • cmd/cue: add a regression test for issue 2704 by @mvdan in 46feda5
  • internal/filetypes: remove unused test.cue file by @mvdan in c3dc2f2
  • cmd/cue: ensure that fmt works outside a module with files too by @mvdan in 11cbcd3
  • encoding/gocode/gocodec: remove cue.Runtime usages by @NoamTD in 078020b
  • encoding/toml: add support for inline tables by @mvdan in 27a0190
  • cue: add another test for a disjunction bug fixed in evalv3 by @mvdan in 3588e1a
  • all: various very small cleanups from gopls and staticcheck by @mvdan in 96f16f0
  • cue/load: treat all absDirFromImportPath errors as PackageErrors by @rogpeppe in fa64c62
  • internal/cueexperiment: flip modules experiment flag default by @rogpeppe in 1ad8c52
  • cue/load: set the absolute file name when setting source by @rogpeppe in 4a27795
  • encoding/protobuf: cope with major version suffixes in module paths by @rogpeppe in b57a20a
  • cue/load: do not scan imports of non-CUE files by @rogpeppe in ac35a40
  • cue/load: add major version suffix to module path in testdata by @rogpeppe in f513a17
  • cue/load: more correct treatment of module paths with major versions by @rogpeppe in 0b70e5b
  • cmd/cue: add mod fix command by @rogpeppe in 4575558
  • mod/modfile: add FixLegacy function by @rogpeppe in 1dee146
  • cue/load: better treatment of files specified on the command line by @rogpeppe in 1591fd8
  • cue/load: factor out syntax cache by @rogpeppe in ef3c0c5
  • cue/load: remove directory argument from addFiles by @rogpeppe in 6804717
  • cue/load: avoid "user:" and "instance:" error prefixes by @rogpeppe in 612837a
  • cue/load: prepare for files package refactor by @rogpeppe in e888508
  • mod/modfile: accept language versions after v0.8.0-alpha.0 by @rogpeppe in 443106f
  • mod/modfile: add custom data field by @rogpeppe in a8693a0
  • mod/modfile: parse module.cue in data-only mode by @rogpeppe in 21a5c8b
  • encoding/openapi: link to correct upstream doc by @jpluscplusm in a861376
  • encoding/toml: check parser errors and reject duplicate keys by @mvdan in eacde77
  • encoding/gocode: remove unused test.cue file by @mvdan in abd5778
  • encoding/toml: validate the resulting value against toml.Unmarshal by @mvdan in adf84fd
  • cue/scanner: remove go-fuzz testing code and data by @mvdan in 5472c4b
  • internal/cmd/cue-ast-print: do not panic on invalid values by @mvdan in c789d3e
  • cue/literal: use Label for labels consistently by @mvdan in 97695d0
  • cmd/cue: move Dockerfile to the main package directory by @mvdan in e801994
  • cue/parser: switch from go-fuzz to native fuzzing by @mvdan in 43da0b0
  • internal/ci: bump goreleaser and Go ahead of the next release by @mvdan in 7248da6
  • internal/core/export: allow exporting snippets by @mpvl in e775398
  • internal/pkg: make Len ignore optional fields by @NoamTD in afe322d
  • all: remove last usages of ast.Node.{Comments,AddComment} by @NoamTD in 4ae7530
  • cue: add regression test for a disjunction fix in evalv3 by @mvdan in b3006ad
  • internal: remove some deprecated type/method usages by @NoamTD in 84fe1b9
  • cuego: remove deprecated cue.Instance usage by @NoamTD in 1dcd350
  • all: add language.version to module.cue files by @rogpeppe in 690add3
  • cmd/cue: repurpose exitOnErr into printError by @mvdan in e9bf33c
  • mod/module: add qualifier in ImportPath when necessary by @rogpeppe in 64baa18
  • internal/core/adt: fix attribute processing by @mpvl in 185426f
  • internal/core/export: fix dereferencing bug by @mpvl in efd38e6
  • internal/cuetxtar: allow inline archives by @mpvl in 645d586
  • internal/core/export: update error todos by @mpvl in 22b8c74
  • cmd/cue: add cue fmt --files mode by @NoamTD in 336a991
  • internal/core/export: fix test by @mpvl in 07d485c
  • tools/flow: enable matrix tests by @mpvl in 5f8930a
  • internal: replace and remove PackageInfo by @NoamTD in a49ee92
  • internal/filetypes: remove deprecated API usage by @NoamTD in 9a0cae9
  • cue/ast/astutil: remove deprecated API usage by @NoamTD in 64bbf1b
  • doc/ref: the subsumption relation for fields was backwards by @mvdan in b83ae37
  • cmd/cue: replace most fatal exitOnErr calls with error returns by @mvdan in 6c5f6e7
  • internal/ci: upgrade GH actions JSON Schema by @myitcv in a246bdd
  • pkg/encoding: add test cases for {json,yaml}.Validate by @NoamTD in 00a747c
  • mod/modregistry: treat all 404 errors as not-found by @rogpeppe in bf75699
  • pkg/struct: add tests for MinLength and MaxLength by @NoamTD in a169ae2
  • encoding/toml: first decoder implementation by @mvdan in a35caed
  • cmd/cue: an empty string is neither a valid package nor file by @mvdan in a7bdc24
  • internal/vcs: only consider actual sub-directory for status checks by @rogpeppe in cf3cf2f
  • cmd/cue: no need to buffer an error to print to stderr by @mvdan in d5802f6
  • cmd/cue: remove TestHelp in favor of testscript by @mvdan in 3977e0c
  • cue/errors: use fmt.Fprintf in writeErr directly by @mvdan in 22d5530
  • cmd/cue: improve cue vet examples' argument order by @jpluscplusm in fbe004d
  • cue/load: empty or absolute paths are not std import paths by @mvdan in fdebcd9
  • mod/modfile: do not reuse a global cue.Context in Parse and ParseLegacy by @mvdan in 91eec1b
  • cmd/cue: expand cmd_filetypes.txtar with more edge cases by @mvdan in 72319e4
  • cmd/cue: refer to 'workflow commands' instead of 'commands' by @myitcv in 65ed76d
  • internal/core/adt: eliminate non-rooted indirections by @mpvl in a651ed4
  • internal/core/dep: dereference non-rooted values by @mpvl in 68efe82
  • mod/modzip: use filepath.WalkDir by @mvdan in 9518dae
  • internal/core/adt: unwrap ConjunctGroup in EnvExpr by @mpvl in a8ec4b7
  • internal/core/adt: unwrap ConjunctGroups in ToExpr by @mpvl in d281a75
  • all: tidy up a number of leftover Go mentions by @mvdan in 495feee
  • cue: fix godoc links by @mvdan in 4ed59e7
  • cue/load: don't load from $PWD in the integration tests by @mvdan in bd9e49f
  • internal/core/adt: remove direct access to BaseValue by @mpvl in 91223e3
  • internal/core/adt: propagate structural cycle up by @mpvl in 9efad90
  • internal/core/adt: fix let bug by @mpvl in 576a3ed
  • internal/diff: add matrix test by @mpvl in 4c60191
  • internal/core/export: fix dropping of optional field by @mpvl in a080c35
  • internal/core/subsume: pass tests for new evaluator by @mpvl in c023c4a
  • internal/core/adt: make invalid builtin call resolve to bottom by @NoamTD in 76f656a
  • cue: remove matrix_test.go by @mpvl in cd43871
  • cuecontext: add options to set version and debug flags by @mpvl in f0cd02b
  • cue/load: restore the error result on an empty string argument by @mvdan in 5e9aa4e
  • cue/load: simplify logic around build.LoadFunc by @mvdan in 3ebadf1
  • cue/load: remove the now-unused moduleschema.cue file by @mvdan in 7614463
  • update golang.org/x/... dependencies for v0.9.0 by @mvdan in b3a7fea
  • internal/core/debug: append to []byte rather than using io.Writer by @mvdan in 0bf573f
  • internal/core/adt: don't allocate when asserting in Environment.up by @mvdan in 9ecd7a0
  • internal/core/debug: simplify label code following a TODO by @mvdan in c445c7d
  • internal/core/debug: allow io.WriteString to be efficient by @mvdan in 51209a5
  • internal/core/adt: avoid creating closures for adt.Config.Format by @mvdan in e284eef
  • internal/core/adt: fix some typos by @NoamTD in af36efd
  • cmd/cue: fail when requesting a missing help topic by @mvdan in 1be0b0f
  • tools/flow: disable (part of) flaky test by @mpvl in dff77a6
  • tools/flow: use matrix for tests by @mpvl in fc7d3f3
  • tools/trim: prepare for using test matrix by @mpvl in 926f060
  • pkg: update tests to use matrix by @mpvl in a983b19
  • internal/core/validate: use matrix in test by @mpvl in 4706840
  • internal/core/subsume: use matrix for tests by @mpvl in b5321de
  • internal/core/export: use matrix for TestValue by @mpvl in f418fc3
  • internal/core/export: use matrix for SelfContained by @mpvl in 3f52195
  • internal/core/export: assign a name to TestSelfContained by @mpvl in 78e9e12
  • internal/core/export: use matrix for TestExtract by @mpvl in 9d3d545
  • internal/core/export: use matrix for TestGenerated by @mpvl in e5f8e0e
  • internal/core/dep: add in tests for new evaluator by @mpvl in cb2410c
  • internal/cuetdtest: introduce test matrix by @mpvl in 1e843cb
  • cmd/cue: use cue/parser and cue/format directly in fmt by @mvdan in 6d50092
  • cmd/cue: add tests that cover fmt on various filetypes by @mvdan in 7e0fbec
  • all: apply cue fmt as of v0.9.0-alpha.4 by @mvdan in b2dd75a
  • cue: add regression test for issue 3042 by @mvdan in 612f1ae
  • cue: remove TODO for TestExpr by @mpvl in 21b0039
  • internal/core/adt: delay dereferencing in lookup by @mpvl in 7dd29f1
  • internal/core/export: handle ConjunctGroups by @mpvl in 8935df9
  • cue: exempt test for DisallowCycle by @mpvl in 1259cf9
  • cue: fix some matrix tests by @mpvl in d3ed229
  • internal/core/adt: disable dereference for new evaluator by @mpvl in aa42655
  • internal/core/adt: move and rename Indirect by @mpvl in 759f26e
  • cmd/cue: fail cue fmt if arg import path doesn't exist by @NoamTD in d9c5ae0
  • cmd/cue: document -ldflags for local release builds by @mvdan in f9c2de9
  • all: remove some unused code and other minor cleanups by @mvdan in 6132343
  • cmd/cue: new "mod resolve" command by @rogpeppe in 59a0d3c
  • internal/core/adt: fix missing dereference for equal by @mpvl in bc3e24c
  • cue: fix Allows for new evaluator by @mpvl in 6e48c0d
  • cmd/cue: add dry run flag to cue mod publish by @rogpeppe in 82bcda5
  • internal/core/adt: fix missing field error message by @mpvl in b6a2637
  • cue: ignore some tests for TestPos by @mpvl in 71220e6
  • cue: set DynamicLabel by @mpvl in fa3bf5f
  • cue/ast: move WalkVisitor and Visitor to astutil and unexport them by @mvdan in 05640c2
  • cue/ast: don't walk comments twice by @mvdan in fd64550
  • cue/ast: implement Visitor walking in terms of func walking by @mvdan in 30f7d28
  • internal/cueversion: construct pseudoversion when possible by @rogpeppe in caa1e98
  • internal/cueversion: split language and module versions by @rogpeppe in 2f90f54
  • ast/astutil: use more generics to reduce duplication by @mvdan in d696e44
  • cue/ast: add WalkVisitor to share with cue/ast/astutil by @mvdan in bf733fb
  • internal/core/adt: fix matchPattern by @mpvl in 72ba528
  • cue: fix IsClosed for new evaluator by @mpvl in 9cf30f1
  • cue: fix default handling for new evaluator by @mpvl in 4a8a873
  • cue/ast/astutil: remove quoted identifiers remnant by @mvdan in b3f170a
  • internal/core/adt: do not dereference for newChildValue by @mpvl in adea575
  • internal/core/adt: dereference default by @mpvl in 14e1ef2
  • internal/core/debug: omit ConjunctGroups in compact mode by @mpvl in c6701b4
  • internal/core/adt: enable matrix testing by @mpvl in 8b6705c
  • cue: allow a tests to run with a variety of options by @mpvl in 548dd7c
  • mod/modfile: better error message when disallowed field is used by @rogpeppe in fdf75f5
  • cue/cmd: always write stdin to stdout in cue fmt by @NoamTD in 70cc402
  • cue: change getInstance to getValue by @mpvl in ebcf2f5
  • internal/core/adt: avoid loops in debug printing by @mpvl in bae8bbf
  • internal/core/adt: clean up indirects and mark disjuncts by @mpvl in 831374c
  • internal/core/adt: avoid hang with let processing by @mpvl in 382e4be
  • internal/core/adt: introduce new cycle detection mechanism by @mpvl in fb37710
  • cue/token: relative positions apply before, not after, a token by @mvdan in 1dda583
  • cue/cmd: avoid overwriting formatted files in cue fmt by @NoamTD in fb9961a
  • cmd/cue: add cue fmt --diff flag by @NoamTD in fcae10b
  • cmd/cue: use fmt --check in the fmt_multi testscript by @mvdan in 68cd040
  • cmd/cue: improve stdin input handling in cue fmt --check by @NoamTD in f254cc3
  • cmd/cue: make cue fmt --check print files immediately by @NoamTD in 9e121cb
  • cue/load: clean up some var names and code organization by @NoamTD in 41063b7
  • encoding/protobuf: include annotations heading by @jpluscplusm in 35af5a1
  • cue/testdata: update todos on various tests by @mpvl in de5d0cf
  • internal/core/adt: do not share "inlined" structs by @mpvl in 1711c14
  • internal/core/adt: prevent cyclic printing by @mpvl in 1860e39
  • internal/core/adt: disable panic with TODO by @mpvl in 52c4c32
  • mod/modregistry: allow RegistryResolver to return ErrRegistryNotFound by @rogpeppe in 89ae7d7
  • pkg/math: fix MultipleOf algorithm by @NoamTD in c8cc462
  • cue/math: add tests for MultipleOf by @NoamTD in 1f4927c
  • all: don't use XXX strings unnecessarily by @mvdan in 506a0e8
  • cue/format: collapse empty structs/lists to single line by @NoamTD in 53d5ab3
  • all: prevent duplicate filenames in testscripts by @jpluscplusm in a835fb5
  • internal/cueversion: bump fallbackVersion for v0.9.0-alpha.3 by @mvdan in 797d6f4
  • Revert "cmd/cue: rip out cue.Instance and cue.Merge from 'cue cmd'" by @mvdan in 3519740
  • Revert "cue: remove Merge" by @mvdan in 7195817
  • cue/load: avoid repeatedly loading parent directories by caching by @NoamTD in d9c6c75
  • cmd/cue: include metadata when publishing modules by @rogpeppe in b7c5800
  • mod/modregistry: metadata support by @rogpeppe in cf2551f
  • internal/mod/modload: retain source field when tidying by @rogpeppe in f2980b7
  • cue: remove Merge by @mvdan in 1864214
  • cmd/cue: rip out cue.Instance and cue.Merge from 'cue cmd' by @mvdan in 7422d00
  • cmd/cue: add regression test for 'cue cmd' with many packages by @mvdan in 994a15d
  • cue/testdata: reorder files in txtar by @mpvl in a16a054
  • internal/core/adt: unshare once Pending arc is known by @mpvl in 61c1814
  • internal/core/adt: enable comprehension.txtar by @mpvl in b3cb6e0
  • cmd/cue: ensure 'get go' with time.Duration is compatible with encoding/json by @mvdan in 1c3f536
  • cmd/cue: correctly extract transitive dependencies in 'get go' by @mvdan in b90a5eb
  • cmd/cue: add failing tests for 'cue get go' transitive deps regression by @mvdan in 81f5a20
  • internal/core/adt: add tests for structure sharing by @mpvl in 3a90b84
  • internal/core/adt: catch nil parent by @mpvl in 8087ff7
  • cmd/cue: implement cue mod init --source by @rogpeppe in 2ff5afa
  • internal/core/adt: match decrement for nested comprehension arcs by @mpvl in edda26d
  • internal/core/adt: add Sharing option in CUE_DEBUG by @mpvl in d900867
  • cmd/cue: factor cue mod init source to its own file by @rogpeppe in 891a8a0
  • internal/cuedebug: usurp some evaluator debug flags by @mpvl in 4280d65
  • internal/cuedebug: define type for debug flags by @mpvl in 9c5c3c0
  • internal/core/adt: prepare to move DebugFlags to cuedebug by @mpvl in f2e17b1
  • internal/core/adt: move debug flags into struct by @mpvl in cb96718
  • internal/core/adt: weave OpContext to more operations by @mpvl in 7ada2dd
  • internal/filetypes: lazily load types.cue by @mvdan in 2cc7b65
  • internal/filetypes: discard unknown file extensions quickly by @mvdan in f891103
  • internal/filetypes: fill build.File.Filename in toFile in Go by @mvdan in 4da59d6
  • internal/filetypes: simplify some of the CUE logic by @mvdan in a21e2df
  • internal: remove MakeInstance by @mvdan in 25e8713
  • internal/filetypes: add test coverage for FromFile unifying forms by @mvdan in c16bac7
  • internal/filetypes: File.Default is indeed not unused by @mvdan in 7b2f27e
  • cue: add IsNull for Decode by @mvdan in 6169eed
  • cue/format: fix comments formatting in lists by @NoamTD in fdbd563
  • internal/filetypes: use cue.Value.LookupPath by @mvdan in f912da6
  • all: cue fmt by @mvdan in 058ab7c
  • internal/encoding: resolve all deprecation warnings by @mvdan in 6f8cbb0
  • cue/format: don't indent fields on same line as lbrace by @NoamTD in 0177234
  • cue/format: add test for incorrect formatting by @NoamTD in 9839112
  • cue/format: fix string literal replacement in labels by @NoamTD in 2d72477
  • internal/_e2e: actually add source field in e2e tests by @rogpeppe in 5ea4e50
  • internal/pkg: make CallCtxt.Decimal support *adt.Vertex by @NoamTD in 243df63
  • cmd/cue: more resilient mod init version by @rogpeppe in a1dec7d
  • internal/_e2e: fix end to end tests to set source by @rogpeppe in 7f3e9cf
  • cmd/cue: fix mod edit --source self by @rogpeppe in 4997dff
  • internal/vcs: use limited environment when executing git in tests by @rogpeppe in dc78c66
  • internal/ci: support running e2e tests on pushes to ci/test by @rogpeppe in f0f56f8
  • cue: fix small typo in function documentation by @NoamTD in 731b2af
  • modresolve: support special registry "none" by @rogpeppe in d1068c4
  • mod/modfile: parse module.cue according to language.version by @rogpeppe in 73b3df2
  • cmd/cue: add mod edit command by @rogpeppe in b7c1a0d
  • cmd/cue/cmd: require source when running cue mod publish by @rogpeppe in 0616149
  • internal/vcs: new package by @rogpeppe in 87352e8
  • internal/encoding/yaml: reject trailing input in Unmarshal by @mvdan in 25af2e8
  • pkg/encoding: add tests that Unmarshal rejects trailing input by @mvdan in e063155
  • internal/encoding/yaml: use cue/literal to quote string scalars by @mvdan in 16edd40
  • internal/filetypes: avoid unifying with the top-level value by @mvdan in ff533f4
  • internal/cueconfig: validate logins.json on load by @rustyx in aadc5ad
  • internal/cueversion: bump for v0.9.0-alpha.2 by @mvdan in f8d0998
  • internal/core/adt: fail earlier on incompatible types by @mpvl in 6728bb2
  • cue/testdata: add variants of issue1684 by @mpvl in 517f611
  • mod/modfile: add support for "source" field by @rogpeppe in 8d043e7
  • internal/core/adt: introduce structure sharing by @mpvl in 4c7fe24
  • internal/core/adt: hacky alternative for cyclicReferences by @mpvl in 80d681b
  • internal/core/adt: pre-evaluate pattern constraints by @mpvl in 25db081
  • internal/core/adt: finalize let value by @mpvl in 4abbb53
  • internal/core/adt: record stats for new evaluator by @mpvl in d323ba5
  • cue/testdata: add benchmark for billion laughs by @mpvl in 416eecf
  • cmd/cue/cmd: expose evalv3 experiment by @mpvl in d65019d
  • internal/core/adt: implement pattern matching for new evaluator by @mpvl in ca87216
  • internal/cueexperiment: enable CUE_EXPERIMENT=yamlv3decoder by default by @mvdan in f03aaa1
  • internal/envflag: add support for key-values and defaults by @mvdan in b92ad55
  • internal/encoding/yaml: add the new Decoder by @mvdan in 9fba4fa
  • internal/encoding/yaml: add even more test cases by @mvdan in b508b29
  • internal/core/adt: fix default handling by @mpvl in 5e896e0
  • internal/core/adt: fix task completion across disjunction boundaries by @mpvl in 8c6738a
  • internal/core/adt: fix closedness issue with pattern constraints by @mpvl in b944429
  • internal/core/adt: fix path in error messages by @mpvl in 4cb3889
  • internal/core/adt: patch old status mechanism by @mpvl in 709cdc5
  • tools/trim: update for new evaluator by @mpvl in 416c163
  • internal/core/adt: add methods for accessing Conjuncts by @mpvl in 4fcfdbf
  • internal/core/adt: remove unnecessary code by @mpvl in bc2672f
  • internal/core/adt: task is not always defined by @mpvl in 4a5ba90
  • internal/core/adt: initialize nodeContext in two phases by @mpvl in 149b248
  • internal/encoding/yaml: add more decoder tests by @mvdan in 21abb7f
  • internal/encoding/yaml: copy decode_test.go from internal/third_party/yaml by @mvdan in c8d4c3a
  • internal/core/adt: remove unnecessary code by @mpvl in 97daa8f
  • cue/load: make a note about importPkg redoing lots of work by @mvdan in a220cfb
  • cmd/cue: add global cpuprofile and memprofile flags by @mvdan in 7e061f5
  • cue/load: ensure load.Instances sorts instances deterministically by @NoamTD in f736827
  • internal/core/adt: add task deprecation by @mpvl in bb20494
  • internal/core/adt: set list type as soon as known by @mpvl in 1e01bd6
  • internal/core/adt: also check closedness for list in Equal by @mpvl in 30c5f27
  • internal/core/adt: match patterns only if type matches by @mpvl in 8e58091
  • pkg/list: make Sort work for new evaluator by @mpvl in 50989f0
  • internal/core/adt: guard visual debugger from opening too many tabs by @mpvl in 73611fd
  • internal/core/adt: keep arcTypes per closeContext by @mpvl in 03de5ae
  • internal/core/adt: forward cloned disjunct by @mpvl in e4aae72
  • cmd/cue: avoid calling os.Exit directly by @mvdan in f047aa0
  • internal/core/adt: compute kind differently for new evaluator by @mpvl in 87ad2e4
  • internal/core/adt: validate alignment of closeContext by @mpvl in fe85022
  • internal/ci: we no longer need to set CUE_LONG=true by @mvdan in 6e690fd
  • cmd/cue: make fmt process each file exactly once by @NoamTD in 943dd16
  • internal/core/adt: fixed closedness issue for embeddings in files by @mpvl in bdba8ed
  • internal/core/adt: do not use NOTIFY arcs for closedness checking by @mpvl in c89d040
  • internal/core/adt: allow definitions in structs by @mpvl in ad9a305
  • internal/core/adt: add edge cases for disjunctions by @mpvl in d42ee67
  • internal/core/adt: compare nodes based on underlying by @mpvl in e1406c6
  • internal/cuetxtar: automatically clean up once diff is gone by @mpvl in f4aa801
  • internal/core/adt: enable disjunction tests for alpha evaluator by @mpvl in 87de98e
  • internal/core/adt: first implementation of disjunctions by @mpvl in cfd4e37
  • internal/core/adt: use Vertex.Indirect in more places by @mpvl in cc2075b
  • README: fix broken links to tour and k8s tutorial by @NoamTD in 924178c
  • internal: teach ToFile to not drop StructLit comments by @mvdan in f9032a0
  • cue/token: add a File.Lines getter method by @mvdan in 637939e
  • cue/literal: allow a leading positive sign in ParseNum by @mvdan in 060645a
  • internal/registrytest: ensure that 401 errors have a Www-Authenticate header by @rogpeppe in 41e8686
  • cue/testdata: polish test before implementing disjunctions by @mpvl in 20b1c3a
  • internal/core/adt: add benchmark for exponential behavior by @mpvl in 9cdee62
  • internal/ci: bump to macos-14 and Go 1.22.2 by @mvdan in d8e6953
  • doc: remove the kubernetes tutorial by @myitcv in 8985d19
  • doc: remove the tour by @myitcv in 7d10fbd
  • mod/modregistry: treat "forbidden" as "not found" by @rogpeppe in d8067eb
  • cmd/cue: print paths relative to the current directory in fmt --check by @NoamTD in 79ded70
  • cmd/cue: print relative paths in fmt --check by @NoamTD in fc836b1
  • cmd/cue: replace MainTest entrypoint with testing.Testing by @mvdan in b40ccea
  • update github.com/google/uuid by @mvdan in da9e386
  • cmd/cue: test cue and cue cmd via testscript by @mvdan in 39d2707
  • all: replace sort.Sort and sort.Slice with slices.SortFunc by @mvdan in b545df2
  • cmd/cue: disable the wasm interpreter by default for now by @mvdan in abeea94
  • internal/filetypes: replace encoding/gocode with go:embed by @mvdan in 3a9199f
  • cmd/cue: get go: support time.Duration by @gdvalle in 1b9b079
  • cmd/cue: add a fmt --check flag to list badly formatted files by @NoamTD in 4db4481
  • cue/load: remove support for cue.mod files by @mvdan in 2887786
  • all: remove a few uses of fmt.Sprint by @mvdan in 65b948a
  • internal/mod/mvs: avoid using reflect.DeepEqual by @mvdan in 338ab6e
  • internal/source: add Open, moving from internal/encoding by @mvdan in 6c3c377
  • internal/third_party/yaml: remove last bits of reflect by @mvdan in 61db61c
  • internal/third_party/yaml: deduplicate source.Read by @mvdan in b6516c5
  • mod/modconfig: swap os.ReadFile and os.Rename with robustio by @mvdan in b0257fa
  • cmd/cue: lock the logins.json during an update by @rustyx in 71a12cf
  • all: remove manual work via //go:generate stringer by @mvdan in 64c9b62
  • tools/flow: return permanent errors from tasks by @nickfiggins in 2137bea
  • internal/core/adt: detect permanent errors for undefined fields earlier by @nickfiggins in 3c886e0
  • cue: adjust Environment for comprehensions by @mpvl in 3e6a8be
  • cue/load: fix doc comment typo by @rogpeppe in 9b83404
  • cue/load: treat stdlib-like import on command line as error by @rogpeppe in 2aec394
  • cue/load: consistent error message quoting by @rogpeppe in 4202a47
  • cue/load: deprecate Config.StdRoot by @rogpeppe in e675eb7
  • cue/load: change stdlib import test case by @rogpeppe in 09394f3
  • cmd/cue: add refresh tokens support by @rustyx in 25ed954
  • cmd/cue: use fewer go/types.Type.String calls by @mvdan in e4e6d68
  • internal/core/adt: add a little more detail to Environment.up panics by @mvdan in abc8bb1
  • internal/cueversion: bump fallbackVersion for v0.9.0-alpha.1 by @mvdan in 74fb5cf
  • cue/ast: remove ParseIdent and support for quoted identifiers by @mvdan in f8ec1f4
  • cue/ast/astutil: stop using the deprecated ast.ParseIdent by @mvdan in 35acbf4
  • cmd/cue: deprecate cue somecmd in favor of cue cmd somecmd by @mvdan in e8ecf23
  • internal/_e2e: rename CUE_LOGINS to CUE_TEST_LOGINS by @myitcv in ec655a5
  • cue/load: obey "all packages" mode when loading files by @mvdan in 623b6a8
  • cmd/cue: ignore errors on empty package directories in fmt by @mvdan in 7fcae93
  • Revert "tools/flow: check and return errors from task values" by @rogpeppe in ea385fd
  • cmd/cue: more modules help by @rogpeppe in cb121f5
  • cmd/cue: un-hide login command and update docs by @mvdan in 50ed912
  • internal/ci: do not trigger build of tip.cuelang.org by @myitcv in 4aaa2db
  • cmd/cue: find packages by canonical path in get go by @uhthomas in b648cf4
  • remove unneeded dockerignore file by @mvdan in 5489392
  • cmd/cue: various minor cleanups by @mvdan in c248f4e
  • cue: remove op type and op-token maps by @mvdan in 93b1a79
  • internal/cueversion: bump to v0.9.0-0.dev by @mvdan in a2d2085

Don't miss a new cue release

NewReleases is sending notifications on new releases.