lib: optionAttrSetToDocList: warn instead of throwing on options without descriptions

For convenience, it's not like not having a description is deadly or something.
This commit is contained in:
Jan Malakhovski 2019-02-22 00:05:58 +00:00
parent ca496b194f
commit a53b3ba091

View File

@ -141,7 +141,7 @@ rec {
docOption = rec {
loc = opt.loc;
name = showOption opt.loc;
description = opt.description or (throw "Option `${name}' has no description.");
description = opt.description or (lib.warn "Option `${name}' has no description." "This option has no description.");
declarations = filter (x: x != unknownModule) opt.declarations;
internal = opt.internal or false;
visible = opt.visible or true;