stdenv/problems: avoid creating manual problems attrset

This commit is contained in:
Eman Resu 2026-05-25 21:22:46 -04:00
commit b88fba2fba

View file

@ -475,7 +475,6 @@ rec {
attrs:
let
pname = getName attrs;
manualProblems = attrs.meta.problems or { };
in
if
# Fast path for when there's no problem that needs to be handled
@ -486,10 +485,10 @@ rec {
) automaticProblemsConfigCache
&& (
# No manual problems
manualProblems == { }
!attrs ? meta.problems
# Or all manual problems are ignored
|| all (name: handlerForProblem pname name (manualProblems.${name}.kind or name) == "ignore") (
attrNames manualProblems
|| all (name: handlerForProblem pname name (attrs.meta.problems.${name}.kind or name) == "ignore") (
attrNames attrs.meta.problems
)
)
then