mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
lib/options: Add hint for debugging infinite recursion in docs
This commit is contained in:
parent
49237015d6
commit
4a8bc4fd07
1 changed files with 2 additions and 0 deletions
|
@ -242,6 +242,8 @@ rec {
|
||||||
in if ss != {} then optionAttrSetToDocList' opt.loc ss else [];
|
in if ss != {} then optionAttrSetToDocList' opt.loc ss else [];
|
||||||
subOptionsVisible = docOption.visible && opt.visible or null != "shallow";
|
subOptionsVisible = docOption.visible && opt.visible or null != "shallow";
|
||||||
in
|
in
|
||||||
|
# To find infinite recursion in NixOS option docs:
|
||||||
|
# builtins.trace opt.loc
|
||||||
[ docOption ] ++ optionals subOptionsVisible subOptions) (collect isOption options);
|
[ docOption ] ++ optionals subOptionsVisible subOptions) (collect isOption options);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue