stdenv/problems: avoid a lookup for meta.broken
The stats may be lying to me when they say that this saves 1.86% of attrset lookups, and `?` may just not be accurately tracked. But at worst, performance will stay the same, since the check will fail for all non-broken packages. And who knows, maybe it does help, by nature of not checking the value!
This commit is contained in:
@@ -128,9 +128,9 @@ rec {
|
||||
if allowBroken then
|
||||
attrs: false
|
||||
else if config ? allowBrokenPredicate then
|
||||
attrs: attrs.meta.broken or false && !allowBrokenPredicate attrs
|
||||
attrs: attrs ? meta.broken && attrs.meta.broken && !allowBrokenPredicate attrs
|
||||
else
|
||||
attrs: attrs.meta.broken or false;
|
||||
attrs: attrs ? meta.broken && attrs.meta.broken;
|
||||
value.message = "This package is broken.";
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user