v0.11.0-alpha.5
Pre-releaseThis release introduces a new toposort
evaluator experiment, fixes multiple bugs with the embed
experiment, and includes more JSON Schema improvements.
Changes which may break some users are marked below with:
Evaluator
A new experiment is introduced via CUE_EXPERIMENT=toposort
which enables a more principled ordering of CUE fields as produced by cue export
and cue eval
. The intention is to ensure the old and new evaluators order fields of structs in the same way, in order to build confidence and ease the transition to the new evaluator. There are still a few wrinkles to work out, and the question of iteration order in comprehensions over structs remains to be tackled. An issue for gathering feedback is available.
CL 1202746 teaches CUE_STATS_FILE
to start reporting the evaluator version being used, which is useful information when looking at performance stats.
CL 1203264 fixes a bug where CUE_EXPERIMENT=embed
would work when outside of a CUE module, which should not work as it can lead to security risks.
CL 1203267 fixes a bug where CUE_EXPERIMENT=embed
would not work with attributes attached to quoted field names.
CL 1203528 fixes a bug where CUE_EXPERIMENT=embed
would not work with the cue cmd
subcommand at all.
Go API
CUE_EXPERIMENT=decodeint64
which causes cue.Value.Decode
to default to int64
rather than int
when decoding CUE integer values. This ensures consistent behavior with 32-bit architectures.
cue.Index
so that it accepts int64
as well as int
for consistency with 32-bit architectures.
CL 1202744 tweaks cuecontext.EvalVersion
so that the zero value is not a valid evaluator version, as that could lead to unintentional behavior.
cmd/go
cuepls
to cue lsp
, enabling users to install one binary rather than two, and avoiding potential version discrepancies.
Encodings
JSON Schema spec compatibility is improved further by fixing a number of bugs and adding missing features.
Full list of changes since v0.11.0-alpha.4
- internal/core/adt: shorter validator error message by @rogpeppe in af459f1
- update to use latest published githubactions schema by @rogpeppe in 93c1d7e
- internal/core: expose topological sorting API by @cuematthew in 8ff9db9
- encoding/jsonschema: check regexp syntax up front by @rogpeppe in 1476fc7
- encoding/jsonschema: better constraints for
additionalProperties
andpatternProperties
by @rogpeppe in 85f5ca8 - encoding/jsonschema: add test for field with regexp metacharacters by @rogpeppe in 1300a2d
- encoding/jsonschema: add test case for empty field by @rogpeppe in 8850ea7
- encoding/jsonschema: check regressions on a per-version basis by @rogpeppe in 47c1559
- encoding/jsonschema: better treatment of arrays by @rogpeppe in fc9a5a5
- internal/core: add explicit txtar test by @cuematthew in b780c0a
- all: enable new sorting algorithm by @cuematthew in edad6fc
- cue: Keep Vertex if returned from conversion of Go to CUE by @cuematthew in dbef7c5
- internal/core: add support for toposort to evalv2 by @cuematthew in c374e6c
- internal/core: extract sorted features from Vertex by @cuematthew in 65a15e2
- internal/core: sort graph topologically by @cuematthew in c6feea9
- internal/core: calculate elementary cycles by @cuematthew in 9ddb0ec
- internal/core: build graphs of Features by @cuematthew in 5855903
- cue: polish Go docs further by @mvdan in b3eed8b
- cue: teach old cue.Instance APIs to support
@embed
by @mvdan in deed7d5 - cue: improve docs around AnyIndex and AnyString by @mvdan in 73d4e25
- cue/testdata: add regression test for a cycle bug fixed in evalv3 by @mvdan in b96d6c1
- internal/core/runtime: external attributes can use any concrete field name by @rogpeppe in 0f6c51b
- internal/ci: run most tests on 32 bits too by @mvdan in 0516cc6
- cue: add experiment to default to int64 in Value.Decode for integers by @mvdan in 00bd25b
- cmd/cuepls: remove by @myitcv in dd85ce4
- cmd/cue: add hidden lsp command by @myitcv in 9faab39
- update golang.org/x deps for v0.11.0-alpha.5 by @mvdan in e83de3e
- cmd/cue,README: revamp introductory text by @mvdan in c20ee10
- cue/interpreter/embed: error when embed is not in a module by @rogpeppe in edef548
- cue: add test for embedded file not in a module by @rogpeppe in 06d0c73
- cue: support Index calls with int64 by @mvdan in 8b2affe
- cue/stats: start reporting which CUE evaluator version was used by @mvdan in 956d746
- internal/core/adt: catch if OpContext.Version is unset by @mvdan in 52c4418
- internal: separate the zero EvaluatorVersion value from EvalV2 by @mvdan in f17356d