Skip to content

Marry meta.broken with meta.problems#494416

Merged
ConnorBaker merged 2 commits intoNixOS:masterfrom
tweag:rfc127-broken
Mar 24, 2026
Merged

Marry meta.broken with meta.problems#494416
ConnorBaker merged 2 commits intoNixOS:masterfrom
tweag:rfc127-broken

Conversation

@infinisil
Copy link
Copy Markdown
Member

@infinisil infinisil commented Feb 26, 2026

  • Make meta.broken use meta.problems.broken underneath.
  • Deprecate config.allowBrokenPredicate in favor of config.problem.handlers

Follow-up on #478539

Things done

  • Fixed a minor problem with meta.problems: Custom package problems [RFC127] #478539, see first commit
  • Added tests for both historical and new behavior of meta.broken
  • Updated Nixpkgs docs
  • Added a deprecation warning to config.allowBrokenPredicate that only triggers after meta.problems is supported in all stable releases

infinisil added a commit to tweag/nixpkgs that referenced this pull request Mar 2, 2026
This was an oversight in NixOS#478539
that became apparent in NixOS#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.
infinisil added a commit to tweag/nixpkgs that referenced this pull request Mar 2, 2026
This was an oversight in NixOS#478539
that became apparent in NixOS#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.
@nixpkgs-ci nixpkgs-ci bot requested review from a team, Ericson2314 and adisbladis March 2, 2026 14:06
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: stdenv Standard environment 8.has: documentation This PR adds or changes documentation labels Mar 2, 2026
@ConnorBaker
Copy link
Copy Markdown
Contributor

@infinisil I'm happy to merge this if you feel it's ready!

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 8, 2026
@infinisil
Copy link
Copy Markdown
Member Author

@ConnorBaker Ready now! Rebased on top of #496156 now :)

@ConnorBaker ConnorBaker added this pull request to the merge queue Mar 24, 2026
@ConnorBaker ConnorBaker self-assigned this Mar 24, 2026
Merged via the queue into NixOS:master with commit b6eb3c4 Mar 24, 2026
29 of 31 checks passed
@github-project-automation github-project-automation bot moved this to Done in Stdenv Mar 24, 2026
Comment on lines +44 to 50
- For permanently allowing broken packages with a specific name to be built, you may add a corresponding `problems.handlers` to your user's configuration file, for example:

```nix
{
allowBrokenPredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "hello" ];
problems.handlers.hello.broken = "warn"; # or "ignore"
}
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This code block doesn't match the description above.

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

Labels

6.topic: stdenv Standard environment 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants