github cue-lang/cue v0.15.0-rc.1

pre-release23 hours ago

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

Note that this release no longer includes a checksums.txt asset; GitHub now provide digests natively.

cmd/cue

cue mod resolve gains a --deps flag that lists all dependencies of the current module and which registries they resolve to.

LSP

The LSP now supports finding references to a declared name, which can be thought of as the opposite of "go to definition". Using the same underlying mechanism, the LSP now also supports the "rename" operation.

A number of bugs have been fixed, such as package imports not working in standalone files when inside a valid CUE module.

Go API

The new encoding/yaml.Decoder API allows decoding a stream of YAML documents, given that existing APIs did not support streams of multiple YAML documents.

⚠️ The cue/token.Pos.Before method is now rewritten to match cue/token.Pos.Compare, given that it always returned "false" for positions from different files. The method is now deprecated as well.

Full list of changes since v0.15.0-alpha.3
  • cue/load: ensure that Config.ModuleRoot is clean, like Config.Dir by @mvdan in 14472be
  • cue/load: correctly handle the filesystem root as Config.ModuleRoot by @mvdan in d7a839b
  • encoding/jsonschema: avoid redundant patternProperties in Generate by @rogpeppe in a8385f8
  • cmd/cue: update help text to reflect renamed experiment by @jpluscplusm in 7d0090a
  • cmd/cue/cmd: add --deps flag to 'cue mod resolve' by @rogpeppe in 15afd50
  • cue/load: add test case showing an error when Config.ModuleRoot=="/" by @mvdan in 44dba4e
  • internal/ci/goreleaser: actually disable checksum generation by @mvdan in 93c434c
  • all: remove two obsolete and commented-out APIs by @mvdan in 25322ae
  • lsp/definitions: call pos.Offset() directly by @cuematthew in 64182de
  • internal/lsp: support standalone files with imports in modules by @cuematthew in 7dcbdf6
  • internal/lsp: add support for rename by @cuematthew in 24300be
  • internal/lsp: support references with definitions by @cuematthew in 6feb520
  • cmd/cue: adjust cue get go --outfile logic by @mvdan in 6491013
  • cue/token: rewrite Pos.Before in terms of Pos.Compare by @mvdan in 6c2aa6a
  • cue/token: don't unpack line info in Pos.Compare by @mvdan in 9623737
  • cue/token: remove unnecessary Pos.file nil checks by @mvdan in 852de61
  • cue/token: don't unpack line info in Pos.Offset by @mvdan in 8972e06
  • cue/token: don't unpack line info in Pos.Filename by @mvdan in 6543708
  • cue/token: reuse File.Offset in File.position by @mvdan in f4ba49b
  • cue/ast/astutil: use go fix -inline on ImportPathName by @mvdan in 1850e9b
  • internal/core/layer: rudimentary implementation of layers by @mpvl in 654b5c0
  • internal/core/adt: set t.id only once by @mpvl in aae1e07
  • internal/lsp: wire UsagesForOffset into the LSP by @cuematthew in bdc3901
  • lsp/definitions: implement UsagesForOffset by @cuematthew in 5303c60
  • lsp/definitions: add ability to reset definitions analysis by @cuematthew in aba5ee2
  • lsp/rangeset: add String methods by @cuematthew in bfe4aba
  • encoding/yaml: add Decoder for streaming YAML documents by @mpvl in 738e6e4
  • all: start leveraging go fix -inline by @mvdan in 70d6a9c
  • all: go fix -inline ./... by @mvdan in 279e355

Don't miss a new cue release

NewReleases is sending notifications on new releases.