Skip to content

stdenv/check-meta: route warnings through handleEvalIssue#523892

Open
caverav wants to merge 1 commit into
NixOS:masterfrom
caverav:fix-meta-problems-eval-ci
Open

stdenv/check-meta: route warnings through handleEvalIssue#523892
caverav wants to merge 1 commit into
NixOS:masterfrom
caverav:fix-meta-problems-eval-ci

Conversation

@caverav

@caverav caverav commented May 25, 2026

Copy link
Copy Markdown
Member

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 in ci/eval/default.nix treats any stderr output as a chunk failure, and meta.problems warnings are emitted via lib.warn, which writes to stderr. That's blocking #522364 (gemini-cli deprecation notice).

The change

giveWarning in pkgs/stdenv/generic/check-meta.nix now routes through the existing config.handleEvalIssue hook (the same one the error path already uses), falling back to lib.warn when no handler is set:

if config ? handleEvalIssue then
  builtins.seq (config.handleEvalIssue warning.kind msg) acc
else
  warn msg acc;

To pass the problem's kind (matching how the error path calls handleEvalIssue problem.kind ...), the warning record in pkgs/stdenv/generic/problems.nix now carries kind alongside the existing fields.

CI's existing handleEvalIssue in ci/eval/outpaths.nix already returns true for these kinds (it only aborts/throws for unknown-meta, broken-outputs, broken, unfree, unsupported), so no change to outpaths.nix is needed: the warning simply stops reaching stderr during CI eval. Interactive users (no handleEvalIssue set) still get the warning via lib.warn.

This reuses the existing eval hook rather than adding a new config.handleEvalWarning attribute (the first version of this PR) or overriding problems.matchers.

This follows @infinisil's suggestion to reuse config.handleEvalIssue rather than add a new hook.

Issue linkage

Fixes #523712.
Unblocks #522364.

Note: ChatGPT was used to enhance translations and scaffolding tests.

Things done

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: stdenv Standard environment 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions backport release-25.11 backport release-26.05 Backport PR automatically labels May 25, 2026
@caverav caverav marked this pull request as ready for review May 25, 2026 06:32
@nixpkgs-ci nixpkgs-ci Bot requested review from a team, Ericson2314, adisbladis and infinisil May 25, 2026 06:54

@emilazy emilazy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkgs/stdenv/generic/check-meta.nix Outdated
@@ -0,0 +1,19 @@
{

@emilazy emilazy May 25, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be hooked up anywhere?

Edit: Ah, never mind, I see it's using the existing framework.

Comment thread pkgs/stdenv/generic/check-meta.nix Outdated
@caverav

caverav commented May 27, 2026

Copy link
Copy Markdown
Member Author

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.

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.

@caverav caverav changed the title stdenv/check-meta: route warnings through config.handleEvalWarning stdenv/check-meta: route warnings through handleEvalIssue May 27, 2026
@caverav caverav force-pushed the fix-meta-problems-eval-ci branch from 220e142 to 1a5c514 Compare May 27, 2026 08:29
@caverav

caverav commented May 27, 2026

Copy link
Copy Markdown
Member Author

side note: reason = "problem" on the warning record isn't read anywhere (or I didn't find it), the warning path never branched on it the way the error path does, happy to delete it if you'd prefer

@nixpkgs-ci nixpkgs-ci Bot removed the 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions label May 27, 2026
@caverav caverav requested review from emilazy and infinisil May 27, 2026 08:52
@MattSturgeon MattSturgeon mentioned this pull request Jun 16, 2026
14 tasks

@infinisil infinisil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. backport release-26.05 Backport PR automatically

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Setting meta.problems cause eval CI to fail!

4 participants