Changes which may break some users are marked below with: ⚠️
Language
As a reminder, we have two ongoing language experiments since v0.15; a replacement for struct embedding and a rework of aliases. Please give these a try and report any issues or feedback!
⚠️ else is now part of the try experiment
v0.16.0-alpha.2 introduced the else comprehension clause, available to any module targetting language version v0.16.0 or later without needing to use an experiment.
Thanks to user feedback and design discussions, we have come to realize that the existing design needed tweaking. for comprehensions now use a fallback token rather than else in order to clarify intent, and we have also restricted the use of else in chains of comprehension clauses, which could easily cause confusion.
Given how late in the release cycle we already are, and understanding that we probably will want to make further tweaks to this feature before it's stable, we have decided to put this language feature behind a file experiment after all.
Rather than adding @experiment(else), we have chosen to bundle this with @experiment(try), given that try without else does not make much sense.
For more information on the up-to-date else and fallback clauses, follow our how-to guide, or read the updated spec change patch.
Evaluator
Fix a regression introduced by v0.16.0-alpha.2 where cue cmd could suddenly report undefined or missing fields from data in non-tool CUE files.
cmd/cue
cue exp writefs gains an encoding optional field for regular files, to specify an encoding rather than infer it from the filename extension.
Full list of changes since v0.16.0-alpha.2
exp writefs by @mvdan in d0eca3f
exp writefs with internal/filetypes and internal/encoding by @mvdan in 766668d
exp writefs testscript by @mvdan in 00eddbf