check-meta: fix 'hasNoMaintainers'#412184
Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom Jun 12, 2025
Merged
Conversation
45ea1e2 to
7c4327a
Compare
7c4327a to
c0c6b19
Compare
13 tasks
broken in 650eb61 Previously, if any of `meta.teams` or `meta.maintainers` was undefined, `hasNoMaintainers` would return false, suggesting e.g. bash had a maintainer - it does not. The old logic before meta.teams was: ```nix hasNoMaintainers = attrs: attrs ? meta.maintainers && (length attrs.meta.maintainers) == 0; ``` This meant a package that did not define `meta.maintainers` would appear maintained by this check, while a package with `meta.maintainers = []` would be listed as unmaintained. This might have been a bug. If it was not, that logic could be restored by prepending an extra check to the condition: ```nix (attrs ? meta.maintainers || attrs ? meta.teams) && (attrs.meta.maintainers or [] == []) && (attrs.meta.teams or [] == []) ``` I believe this makes little sense though. if no maintainer is listed, a package should be considered unmaintained. If really desired, this can still be bypassed by setting `meta.maintainers = null;` or something.
c0c6b19 to
1ae214f
Compare
wolfgangwalther
approved these changes
Jun 12, 2025
Member
|
After trying out And we really have a lot of packages without maintainers at the moment! We should resolve this situation sooner. |
This was referenced Jun 12, 2025
13 tasks
Member
|
Backporting since this is also broken on stable (and I was very confused when I tried it out after being reminded that this exists and getting zero results). |
Contributor
|
Successfully created backport PR for |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
broken in 650eb61
Previously, if any of
meta.teamsormeta.maintainerswas undefined,hasNoMaintainerswould return false, suggesting e.g. bash had a maintainer - it does not.The old logic before meta.teams was:
This meant a package that did not define
meta.maintainerswould appear maintained by this check, while a package withmeta.maintainers = []would be listed as unmaintained.This might have been a bug.
If it was not, that logic could be restored by prepending an extra check to the condition:
I believe this makes little sense though. if no maintainer is listed, a package should be considered unmaintained. If really desired, this can still be bypassed by setting
meta.maintainers = null;or something.Analogous to #357674, but adjusted for
meta.teamsas the logic now fully broke for anything not defining bothteamsandmaintainers.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.