stdenv/problems: avoid creating manual problems attrset

(cherry picked from commit b88fba2fba)
This commit is contained in:
Eman Resu
2026-05-25 21:22:46 -04:00
committed by github-actions[bot]
parent 2199f6dce9
commit 2fef77700c

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