stdenv/check-meta: route warnings through handleEvalIssue#523892
stdenv/check-meta: route warnings through handleEvalIssue#523892caverav wants to merge 1 commit into
Conversation
emilazy
left a comment
There was a problem hiding this comment.
Yeah, this needs to be solved for us to start making full use of the problems machinery.
I see you haven't ticked the automation policy box in the PR checklist - have you looked over it? All contributions are required to follow it.
| @@ -0,0 +1,19 @@ | |||
| { | |||
There was a problem hiding this comment.
This doesn't appear to be hooked up anywhere?
Edit: Ah, never mind, I see it's using the existing framework.
hey @emilazy, sorry for the slow response and thanks for the review, i'm currently on vacation and didn't notice the new policy reference, my bad on missing the checkbox, going to read through the automation/AI policy properly and make sure this complies. |
220e142 to
1a5c514
Compare
|
side note: |
There was a problem hiding this comment.
While the code here looks fine, this would break channel updates, because those require no warnings to be generated. See #371223 for more context.
Specifically nix-build pkgs/top-level/release.nix -A release-checks (defined here) fails if there's any package that has a problem.
I'll think about other potential approaches, but blocking this for now.
Edit: See #523712 (comment)
Summary
Fixes #523712.
meta.problems(from #494416) currently can't be used on any package: the moment a maintainer adds e.g.meta.problems.removal.message = "...", the Eval CI job aborts on every system. The eval driver inci/eval/default.nixtreats any stderr output as a chunk failure, andmeta.problemswarnings are emitted vialib.warn, which writes to stderr. That's blocking #522364 (gemini-cli deprecation notice).The change
giveWarninginpkgs/stdenv/generic/check-meta.nixnow routes through the existingconfig.handleEvalIssuehook (the same one the error path already uses), falling back tolib.warnwhen no handler is set:To pass the problem's kind (matching how the error path calls
handleEvalIssue problem.kind ...), the warning record inpkgs/stdenv/generic/problems.nixnow carrieskindalongside the existing fields.CI's existing
handleEvalIssueinci/eval/outpaths.nixalready returnstruefor these kinds (it only aborts/throws forunknown-meta,broken-outputs,broken,unfree,unsupported), so no change tooutpaths.nixis needed: the warning simply stops reaching stderr during CI eval. Interactive users (nohandleEvalIssueset) still get the warning vialib.warn.This reuses the existing eval hook rather than adding a new
config.handleEvalWarningattribute (the first version of this PR) or overridingproblems.matchers.This follows @infinisil's suggestion to reuse
config.handleEvalIssuerather than add a new hook.Issue linkage
Fixes #523712.
Unblocks #522364.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.