Hi, I am trying to bring up a tool to analyze NixOS option and automatically detect where options are used. I already made an expression which produce a pdf file (nixos/maintainers/option-usage.nix). I updated it considering the memory consumption in order to benefit from the garbage collector of nix expressions.
Unfortunately, the tryEval primitive has changed since. When I started this script it was catching everything, but now it only catch assertions errors. Sadly, evaluating strictly NixOS configurations can lead to unexpected errors, such as throw, bad types, ... In addition, the strictest function I found is still the "toXML" primitive, the "strict" function in pkgs/lib/debug.nix is not strict enough (even if I enable the recursion in derivations) What I am asking is one of the following: - an "unsafeTryEvalCatchAll" prim-op which could catch all possible error which can be produced by the nix interpreter similar to tryEval. And a "strict" function to avoid serialization made by "toXML". - a "strictEvalStatus" prim-op which return the status of the evaluation and catch any error raised under it. Cheers, -- Nicolas Pierron http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ _______________________________________________ nix-dev mailing list [email protected] https://mail.cs.uu.nl/mailman/listinfo/nix-dev
