Commit Graph

18 Commits

Author SHA1 Message Date
Matt Sturgeon
288d25fabf Allow meta.problems while preventing internal use of certain kinds (#533376) 2026-06-26 21:44:52 +00:00
Silvan Mosberger
a90d993610 ci/eval: Allow preventing internal Nixpkgs use of certain problem kinds 2026-06-24 12:26:03 +02:00
Sandro
e00726a075 treewide: fix leftover docbook links (#531477) 2026-06-21 18:03:51 +00:00
Eman Resu
50cf7fe9dc stdenv/check-meta: move to within lib/
This is going to be used in lib.systems, which isn't allowed to import
from outside the lib folder. We don't actually expose this through lib,
though.
2026-06-20 17:05:33 -04:00
Silvan Mosberger
8fcbb35929 meta.problems: Fill out output meta with final list of problems
This ensures that external tooling can also process the problems, and
helps users with debugging.
2026-06-19 18:58:37 +02:00
Silvan Mosberger
eba1d51352 meta.problems: Internal refactoring
Makes future changes easier
2026-06-19 18:58:10 +02:00
Sandro Jäckel
6c0cb2defd treewide: fix leftover docbook links 2026-06-13 23:37:09 +02:00
Eman Resu
85e32af8ef stdenv/problems: don't create pname variable
A package failing an automatic problem (of which there's currently only
one) is rare. A package having meta.problems specified is even rarer.
Inlining the getName call to its two usages saves a thunk in the vast,
vast majority of cases, and I consider it to be worth it.
2026-06-01 23:05:22 -04:00
Eman Resu
0b304744b8 stdenv/problems: make handlerForProblem more performant with partial application 2026-06-01 23:05:13 -04:00
Eman Resu
41bafcbc34 stdenv/problems: reverse parameter order for handlerForProblem
kind and name are more likely to stay the same. Doing this allows us to
cache the kind and name when calling the handler for a problem.
2026-06-01 23:05:13 -04:00
Eman Resu
753e43c931 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!
2026-06-01 23:05:12 -04:00
Eman Resu
5616e3d925 stdenv/problems: use early knowledge of allowBroken and allowBrokenPredicate 2026-06-01 23:05:10 -04:00
Eman Resu
b88fba2fba stdenv/problems: avoid creating manual problems attrset 2026-06-01 23:05:01 -04:00
Eman Resu
5c89ab858d stdenv/problems: only run problem if it's not ignored 2026-05-25 23:59:00 -04:00
Silvan Mosberger
48422decc4 config: Deprecate allowBrokenPredicate in favor of problems.handlers 2026-03-13 19:36:57 +01:00
Silvan Mosberger
2e97caa6d3 stdenv: Use meta.problems for meta.broken underneath
And add tests for it
2026-03-13 19:36:57 +01:00
Silvan Mosberger
764a7dbadf stdenv: Fix handleEvalIssue for error problems
This was an oversight in https://github.com/NixOS/nixpkgs/pull/478539
that became apparent in https://github.com/NixOS/nixpkgs/pull/494416:

If there's a failing problem in Nixpkgs packages, CI will call
handleEvalIssue on it, but the problem error was missing a `.reason`.

Though even if it did have a reason, we need to do more to make sure
we don't break any code that uses it, so the new code uses the problem
kind as the reason, which happens to match with the reason for all
expected problem kinds.
2026-03-02 14:59:30 +01:00
Silvan Mosberger
27dd434480 stdenv.mkDerivation: Initial RFC 127 implementation
See https://github.com/NixOS/rfcs/blob/master/rfcs/0127-issues-warnings.md

Co-Authored-By: piegames <git@piegames.de>
Co-Authored-By: AkechiShiro <14914796+AkechiShiro@users.noreply.github.com>
2026-02-26 14:53:30 +01:00