943e2d67

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Carry a codec's comments into the option it generates

A comment written with <?> or <??> was thrown away when a field became a Nix
option, so only the field's own description survived.  That is the wrong half
to keep for a shared type: a field says what it is for where the field is, and
a type says what it means where the type is, and whoever reads the NixOS module
generated from the codec wants both.  Documentation written on a codec reached
the rendered configuration documentation and silently never reached the module.

Both now, the field's description first and then the comments from outermost
in, joined by newlines.  Through a BimapCodec as the option type already is,
because a codec written for one type in terms of another is still that type's
codec.  Through the EitherCodec that maybeCodec is, recognised by one of its
sides being the null codec, because optionalFieldOrNullWith builds its field
that way and a codec made nullable is still that codec.  Not into any other
EitherCodec or into an ArrayOfCodec, whose comments are about something the
option is made of rather than about the option.

A field with a comment and no description of its own now has a description,
where before it had none at all.

Total

44s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 31s 1s 1s 32s 31s
Eval 32s 11s 11s 43s 0s
Build 43s 0s 23s 1m06s 22s
Deploy 1m06s 9s 9s 1m15s 0s
Suite 31s 22s 44s 1m15s 53s

Timeline

Config Eval Build Deploy Compressed gap
0s40s1m10s